Mellow protocol Vaults design

Featured highlights

  1. Permissionless — anyone can create a new vault and deploy strategies to manage it;
  2. Strategist friendly — strategists should be incentivized to create new strategies by earning fees;
  3. Multitoken — strategies can manage multiple ERC-20 tokens at once;
  4. Cross-protocol — liquidity can be routed to different DeFi protocols on Etheruem mainnet and on L2/sidechains;
  5. Liquidity-mining enabled — liquidity in the Vault could be used to participate in liquidity mining programs thus earning additional yield for Mellow liquidity providers;
  6. Strategy trustless — strategy should only be able to perform minimal actions that only allow to rebalance liquidity between protocols and tokens, not diverge it somewhere else. Thus it’s possible to deploy the Strategy both as a smart contract and as an off-chain management system;
  7. Oracle adverse — reduce the number of oracles to a minimum since many DeFi hacks used oracle manipulation.

How it works

Fig. 2 Deposit / Rebalance / Withdraw flow
  1. Liquidity provider deposits ERC-20 tokens into LP Issuer;
  2. LP Issuer mints LP tokens to the liquidity provider;
  3. ERC-20 tokens get transferred into the Gateway Vault, then it redistributes them into Integration layer vaults on a pro-rata basis;
  4. Integration layer vaults put liquidity into DeFi protocols.

Vault system architecture

Mellow Permissionless Vaults smart contracts architecture
  1. Protocol contracts (pink color) — these are the protocol contracts that are deployed in one instance;
  2. Vault contracts (purple color) — these are the contracts deployed by users (vault owners/strategists) by using protocol contracts. Essentially everyone can create a set of Vault contracts.
  1. Deploy a new vault via a VaultGovernance#deployVault method
  2. Manage governance params for specific vaults

Strategists unite!

  • Vault#push — pushes the ERC-20 tokens from the Vault balance to the underlying DeFi protocol;
  • Vault#pull — pulls the ERC-20 tokens from the Underlying DeFi protocol to some other Vault of the Vault System;
  • Vault#claimRewards — claim liquidity mining rewards for the Vault (if any are assumed by the underlying DeFi protocol). Note that contracts with the liquidity mining rewards should be whitelisted in the Protocol Governance.

Next steps

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store