================ MeroBiCvx ================ .. note:: Strategies rely on external protocols and come with their own risks. Users should carefully evaulate the strategy design and the risks associated with any protocol that a strategy interacts with. While strategies are designed to be robust and secure, users may still be exposed to the risks of external protocols. General info ============= * **Name:** BI-CVX * **Underlying (asset to farm):** [Any asset that has a Curve Pool with two underlying tokens] * **Reward tokens:** CVX, CRV * **Support other reward tokens:** True * **Description:** This strategy provides single sided liquidity to a given Curve pool with two underlying tokens, then stakes the Curve LP Token in Convex. The strategy receives CRV and CVX rewards and sells these for the underlying. Contracts ========== Here is an overview of which contracts this strategy interacts with and how each contract is used (on a high level). ERC20 tokens used: -------------------- - **CVX**: 0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B - Native token of Convex - **CRV**: 0xD533a949740bb3306d119CC777fa900bA034cd52 - Governance token of Curve - **WETH**: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 - Wrapped ETH (ERC20 compatible) - **Underlying**: *[set per strategy]* - Deposited into Curve pool as single sided liquidity - **Curve LP Token**: *[set per strategy]* - Minted by depositing into Curve Pool - Deposited in Convex Booster contract - Burned to redeem underlying AMMs used: ----------- * **Uniswap**: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D - Swap coin X for Y if AMM is set as default * **SushiSwap**: 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F - Swap coin X for Y if AMM is set as default * **Curve CVX/ETH Pool**: 0xB576491F1E6e5E62f1d8F26062Ee822B40B0E0d4 - Swap CVX rewards for WETH * **Curve CRV/ETH Pool**: 0x8301AE4fc9c624d1D396cbDAa1ed877821D7C511 - Swap CRV rewards for WETH Curve contracts used: ---------------------- - **Curve Pool**: *[set per strategy]* - Deposit underlying to mint LP Token - Burn LP Token to redeem underlying Convex contracts used: ----------------------- - **Booster**: 0xF403C135812408BFbE8713b5A23a04b3D48AAE31 - Deposit and Withdraw Curve LP Token - **Rewards**: *[set per strategy]* - Stake Convex LP Token to earn CRV, CVX and other rewards Convex Background ================= `Convex Finance `_ is a protocol built around Curve, which essentially allows Curve LPs to receive a higher boost on CRV rewards by staking Curve LP tokens on Convex and not directly on Curve. Furthermore, CRV holders can lock their CRV on Convex for veCRV and in exchange receive cvxCRV, which is essentially tokenized veCRV. Note that once CRV is deposited on Convex, it cannot be withdrawn. However, Convex incentivizes LPs of Sushiswap pools for CRV-cvxCRV pools, by rewarding these LPs with CVX tokens. Additionally, `CVX `_ rewards get minted on a per rata basis as CRV rewards are received by Convex LPs. A platform fee is charged by Convex on CRV rewards, which goes in part to users that lock CRV for cvxCRV (and stake cvxCRV), as well as CVX stakers. Stakers of cvxCRV also receive 3CRV rewards, which are the governance fees paid by Curve on a weekly basis. Overall there are three roles a user can have on Convex to earn rewards: 1. **Liquidity provider (stake Curve LP tokens):** - Claim CRV rewards from Convex - Claim CVX rewards from Convex 2. **CRV depositor (lock CRV for cvxCRV; stake cvxCRV):** - Receive 3CRV (Curve trading fees) - Receive CVX - Receive CRV (Convex platform fees) 3. **CVX staker:** - Receive cvxCRV (platform fees) Strategy Details ================= The BI-CVX strategy has the following core components. Deposits -------- By calling ``strategy.deposit()``, all available underlying held by the strategy will be provided as single sided liquidity into the Curve Pool. The Curve LP Token will then be deposited into the Convex ``Booster`` contract (`details here `_). Finally the Convex LP Token is staked for CRV and CVX rewards in the Convex ``Rewards`` contract. Reward Claiming --------------- The Convex reward pools all implement the ``IRewardStaking`` interface. You can find the implementation of these reward pools `here `_. Rewards are claimed by calling the ``getReward()`` method on the ``Rewards`` contract. There may be a situation whereby a Curve pool is incentivized, i.e. LPs of the pools receive additional reward tokens for depositing funds. These extra rewards would be also be claimed through Convex on ``getReward()``. In order to be able to process these on the strategy side, the strategy contains a list of all the possible ``rewardTokens`` in which it may hold funds. New tokens can be added to this list by the admin. When funds are liquidated, the reward tokens are liquidated for the underlying. Harvesting ---------- When ``strategy.harvest()`` is called (by the vault), any CRV that is earned will be sold off for the underlying. All CVX rewards earned by the strategy are first taxed, where the taxed amount goes to the `Mero CVX reserve `_ and gets vote locked on Convex. The net CVX rewards earned are all sold off for the underlying. .. note:: ``harvest()`` does not automatically redeposit underlying into Convex (reduce gas costs). Balance ------- The balance of the strategy includes idle undelrying, idle Curve LP Tokens and staked Curve LP Tokens. Any unclaimed rewards are not included in the balance. The balance function uses ``get_virtual_price`` which is a view of the Curve Pools. This function returns the price of the LP Token relative to the assets of the pool. This may differ from the actual amount that can be withdrawn from the pool at any point in time, as if the pool is imblanaced, then the withdrawable amount may be less than or greater than the virtual price. This is in place as a security measure to protect against attacks that intentionally cause imbalance in curve pools to manipulate the balance of a strategy.