Header | Content |
---|---|
Author | Edson Ayllon (@relativeread) |
Created | 2022-5-4 |
Status | Completed |
Motivation
The main motivation for adding Arrakis is taking advantage of the yield farming opportunities it provides. While dHEDGE already provides Uniswap V3 liquidity management, and with multiple Uniswap LPs in a single contract, Arrakis is providing rewards on Uniswap V3 pools.
Description
Arrakis Finance is a protocol for managing Uniswap V3 liquidity built with Gelato. Liquidity provided auto compounds, which Uniswap LPs don’t do by default. Arrakis positions also rebalance, keeping LPs in range to earn fees, as Uniswap LPs that go out of range don’t earn fees.
If this proposal passes, all Arrakis LP position ERC20s are to be whitelisted, and Arrakis as a dapp is to be whitelisted on any chain Arrakis Uniswap management is deployed on. Arrakis is currently only deployed on Polygon.
Implementation
Arrakis will be integrated by writing and testing a contract guard that whitelists Arrakis contracts and functionality.
Contract guard functions include:
-
addLiquidityAndStake
- Can only have a maximum of 2 liquidity positions / gauges at any one time
- Can only have liquidity positions for whitelisted gauges
- Ensure that the LP underlying tokens (eg USDC & miMATIC) are supported by the pool
- Ensure the receiver is the dHEDGE pool
removeLiquidityAndUnstake
-
claim_rewards
- Ensure receiving address is the dHEDGE pool
- Check that the reward tokens are enabled
-
getBalance
- The balance will be similar to the UniswapV3AssetGuard, where we would calculate the value of the position in USD terms
-
withdrawProcessing
- On withdrawal processing, it should call claim_rewards for all the active claim_tokens to claim any rewards to the pool
Individual pools can be whitelisted in the assets guard.