Overview
Automated Liquidity Management Vaults on top of concentrated liquidity AMMsOur AMM vaults provide infrastructure for market makers, trading partners to run a wide array of strategies on top of concentrated liquidity AMMs.The currently supported AMMs are -
1.Uniswap v3
2.Pancakeswap v3
3.Quickswap v3
The following is an overview of the core contracts-
AutoRouterFactory.sol contract that allows creating of AutoRouter vaults. It creates
ERC1967
proxies in front of provided implementation contracts.AutoRouterVault.sol contract that allows AMM liquidity provision through
mint
andaddLiquidity
functions. It's an upgradeable contract and implements Openzeppelin'sUUPSUpgradeable
proxy pattern.AutoRouterVaultStorage.sol contract for storing storage variables for AutoRouter
Vault
contract.Ownable.sol contract for managing the
manager
role.
AutoRouter operates as follows:
A factory contract is deployed by a Factory Manager.
The factory manager creates a vault for Uniswap V3 pair providing
token0
,token1
andfee
for the pair along with theimplementation
and initialize data specific to implementation.The minting on the vault contract is not started until the vault manager calls
updateTicks
on the vault and provides the tick AutoRouterfor liquidity provision.Updating the ticks starts the minting process and changes pool status to
inThePosition
.Anyone wanting to mint calls
getMintAmounts
withtoken0
andtoken1
they want to provide liquidity with and the function returns themintAmount
to be provided tomint
function for liquidity into the vault's current ticks. This mints fungible vault shares to mint representing their share of the vault.Anyone wanting to exit from vault can call
burn
function with the amount of owned vault shares they want to burn. This burns portion of active liquidity from Uniswap V3 pool equivalent to user's share of the pool and returns user the resulting token amounts along with the user's share from inactive liquidity (fees collected + provisioned liquidity) from the vault.At the times of high volatility, vault manager can remove liquidity from current tick AutoRouter making all the vault liquidity inactive. The vault's status is changed to
out of the position
yet minting continues based on thetoken0
andtoken1
ratio in the pool and users are minted vault shares based on this ratio. If the total supply goes to zero while the pool isout of the position
then minting is stopped since at that point there will be no reference ratio to mint vault shares based upon. The vault must update the ticks to start accepting liquidity into a newer tick AutoRouter.Vault manager can perform swap between
token0
andtoken1
to convert assets to a specific ratio usingswap
function for providing liquidity to newer tick AutoRouter throughaddLiquidity
function.Part of collected fee from Uniswap V3 pool is provided to vault manager as performance fee and part of notional amount is deducted from redeeming user as managing fee.
Vault manager can update the managing and performance fee managing fee is capped at 1% and performance fee is capped at 1%.
Vault manager can pause and unpause the mint and burn function of the vault contract.
Last updated