πFrax Convex Finance
Frax Convex pools: https://frax.convexfinance.com/
Last updated
Frax Convex pools: https://frax.convexfinance.com/
Last updated
To enter most pools in Frax Convex Finance, one should first get LP tokens from a corresponding Curve Pool. The address of the underlying Curve Pool for each Frax Pool is shown under βInfoβ. Once tokens are staked in the Curve Pool, one gets LP tokens, and usually the address of that LP token is shown as Curve LP token address.
Next, those Curve LP tokens should be deposited in LP token address, which gives wrapped LP tokens in return in 1:1 ratio. Finally, wrapped LP tokens can be locked in the staking contract of the pool, shown as Staking address.
The funds are locked in Frax Pool for at least 7 days. For locking one gets rewards, and all the reward tokens can be seen if you click β?β as shown on Image 1. Usually, there are 3 reward tokens: FXS (Frax shares), CRV (Curve token) and CVX (Convex token).
One can also check the rewards in the Staking contract by calling getAllRewardsTokens(), which usually returns only FXS. CRV and CVX come from Curve pool.
Example of investing into FRAX/USDC pool:
ββ1) Deposit poolToken (e.g. USDC) into Curve FRAX/USDC pool, get Curve LP tokens
2) Stake Curve LP tokens to LP token address, get LP Tokens (same address)
3) Stake LP tokens to Staking address
How do funds get allocated into a particular strategy?
We call VoteExecutor.sol contract which orchestrates the investment process. First, it fetches all the data needed to enter the pool from the StrategyHandler.sol and then calls invest()
of CurveFraxConvexStrategy.sol.
When we call invest()
, CurveFraxConvexStrategy.sol. first stakes pool token into Curve pool and receives crvLptokens. Next, crvLptokens are wrapped through the LP wrapper (the contract referred to as LP token address on Convex Frax), which is finally locked in the staking contract for at least 7 days.
Each lock is associated with a kek_id, so to avoid opening multiple positions, we first check if we already have a position in the pool. If yes, we call lockAdditional()
, otherwise stakeLocked()
.