Silos Launch — DeFi 3.0 — The Next Leap Forward

Gravity Finance
6 min readApr 17, 2023

--

It is with great pleasure that we are officially announcing the launch of ‘Silos’, our flagship product. The product is live now and can be found here: https://gravityfinance.io/silos/strategies

For the last 16+ months the Gravity Finance team have worked tirelessly on this DeFi Automation and Risk Management tool. We are incredibly grateful and thankful to all of the different projects that we have been able to work with whilst building this product and we look forward to a long and prosperous relationship with all of them.

A BIG thanks to the projects we have worked with;

Chainlink Labs Automation Team who have been extremely helpful throughout the entire development process, helping with advice on how to make our Automation calls more efficient, working closely with us to make Automation more cost-effective for users on Polygon and making it easier for us to deploy and test our Silo managers.

QiDAO, QuickSwap, KyberSwap and Gamma who we have conversed with at various times in order to build and refine our Beta-testing and Public-release strategies, and the various other projects and platforms who we look forward to working closely with in the coming weeks and months to build even more strategies and automation tasks.

So what is “Silos”?

Silos allow users to deploy personalised and fully automated DeFi tasks in seconds. Users can deploy a Silo (Smart Contract) from a catalogue of predefined strategies.

Great, so what does that actually mean?

The Gravity team have built various DeFi tasks and complex strategies into one-button deployments.

These one-button deployments are pre-programmed with all of the necessary steps to approve, execute, automate and manage various tasks.

When a user deploys a strategy they have the option to alter various parameters on the user interface to further personalise and customise some of the actions, such as scheduling when tasks will execute.

The pre-built strategy, along with the users personalised settings are then deployed on-chain as a new Smart Contract (ERC-721). These ERC-721 strategies are essentially code-containers that contain all of the code to function, but they are also able to hold different types of tokens, such as ERC-20 tokens, other ERC-721 tokens and ERC-1155 tokens, some of which are commonly used by “V3 DEXs” and yield farms for liquidity positions.

Documentation

To learn more about please have a look through the Silos documentation: https://inthenextversion.gitbook.io/gravity-finance-silos/

There are also some helpful videos you can see and a quick-start guide on using Silos.

Examples?

Since the concept is perhaps not the easiest to visualise maybe a couple of examples would help.

Time-Weighted Swaps

Named “Swap and Claim” on the Silo catalogue;

A user can select “Token A” (the token they want to deposit and spend), and “Token B” (the token they want to purchase).

Once the two tokens are selected, we use Kyberswap API to find the best swap-path to maximise the output token to give the user the most cost effective swap and ensure they get the most out of the swap.

The user can then set how often they would like the Silo to make the swap and how much “Token A” they would like to spend each time. It is also possible at this time to decide what happens with the purchased “Token B” after it has been purchased.

Lets assume Token A is USDC and Token B is GFI token (the Gravity Governance Token), and lets assume the Silo is set to spend $50 worth of USDC every 3 hours and the GFI are set to be sent to a wallet address to be kept in a wallet.

When the user deploys the Silo they can deposit USDC into it. So lets assume $1000 is deposited into the Silo.

Every 3 hours, $50 worth of USDC will be used to purchase as much GFI as possible. Every time the Silo purchases GFI tokens, they will then be sent to the users wallet address that they entered when deploying the Silo.

This time-weighted swaps strategy is quite simple, not many moving parts and easy to execute. A user could easily do this manually but using a Silo takes all the effort away for the user.

Ok, so how about something more complicated?

Collateralised Lending

Named “Borrow to Farm” on the Silo catalogue.

A Collateralised Lending Silo, or “Borrow to Farm”, automates the process of depositing a collateral token into a lending platform, borrowing another token and then using that borrowed token in a yield farm to earn interest.

A user who wants to deploy a Borrow to Farm Strategy would look through the catalogue to find a suitable Silo for their needs, usually a Strategy that can use a collateral-token that the user already owns, such as wETH, wBTC or wMATIC.

The current borrow to farm strategies all employ QiDAO over-collateralised loans. After deploying the Silo and adding the collateral token, the Silo executes a range of different functions on chain, I detail below;

  • Create a QiDAO Vault for the specifc collateral type,
  • Approve spending of the collateral token that has been sent to the silo,
  • Deposit the collateral token into the QiDAO vault,
  • Calculate how much debt (MAI token) can be safely borrowed from QiDAO,
  • Borrow MAI token (debt) from QiDAO,
  • Approve spending of the MAI token (debt) at QuickSwap,
  • Swap approximately 50% of the borrowed MAI to USDC at QuickSwap,
  • Approve spending USDC and MAI to provide liquidity at QuickSwap,
  • Create/Add USDC-MAI Liquidity to QuickSwap V3,
  • Receive a QS V3 LP token,
  • Approve spending QS V3 LP token at GAMMA,
  • Deposit the QS V3 LP into a GAMMA Farm,

As you can see, if a user were to do this manually, they would need to know exactly what websites to visit, execute many transactions on chain, wait for confirmations between each step etc. Manually, this process can take more than 20 minutes to complete and requires the user to visit no fewer than 3 websites and 4–5 different web pages and also requires the user to understand collateral to debt ratios, liquidations, and V3 Concentrated Liquidity Pairs and constantly monitor their collateral and debt to ensure they do not get liquidated in the event of the collateral token value dropping on the market to a liquidation point on the lending platform.

Using a Silo, all of the above tasks are bundled together and executed sequentially in one transaction, this takes on average 2–4 seconds to execute and confirm on chain.

Harvest Schedule & Harvest Rules

In the Borrow to Farm Strategies, all of the following actions are also automated and many can be pre-set by the user and altered any time using the Gravity Silo UI.

Harvest Schedule: The user can pre-set how often the yield farming rewards are harvested by the Silo, anywhere from hourly to monthly.

Harvest Rules: A user can pre-set how the harvested yield rewards are used after they are harvested. Options include “Compounding” (selling the reward token and buying more of the Collateral token), “Send to Silo” (send reward tokens to another silo, which can then be used in another strategy) and “Send to Address” (Sending the rewards to a Polygon Address).

Active Risk Management (ARM)

Possibly one of the most important parts of how many Silos work is the Active Risk Management (ARM) and Active Monitoring.

Strategies that employ ARM have certain parameters within the Silo code that is constantly checked by Chainlink Automation Nodes and if needed specific functions within the contract can be executed on chain.

For Borrow to Farm strategies these ARM parameters include checking a loans Collateral to Debt (CTD). If the CTD should fall outside of a specific range within the Silo strategy code, the strategy is designed to automatically rebalance the users loan by removing some of the farm position, removing some of the liquidity position and paying back some of the debt. This repayment brings the loan back to a healthy balance and avoids liquidation. ARM checks the Silo CTD every block and can execute a rebalance within a couple of seconds.

The Future

We look forward to working with many other platforms and projects to build all types of new automated trading strategies and DeFi tasks around their products. The possibilities of what Silos can do is really endless, we have said for quite some time that “we can automate any manual defi task”, so if you have complex trading strategies or mundane tasks that you feel could benefit from being automated please get in touch with the Gravity team to discuss! You can find us mostly on Discord or Twitter, see links below.

--

--

No responses yet