Comment on page


The main deposit contract for LP tokens
The booster.sol is our main deposit contract for LP tokens.
//main Convex contract(booster.sol) basic interface
interface IConvex{
//deposit into convex, receive a tokenized deposit. parameter to stake immediately
function deposit(uint256 _pid, uint256 _amount, bool _stake) external returns(bool);
//burn a tokenized deposit to receive curve lp tokens back
function withdraw(uint256 _pid, uint256 _amount) external returns(bool);

Pool Info

To gather pool information access the poolInfo array
//number of pools
var poolLength = await booster.poolLength()
//get information for pool "n"
var poolInfo = await booster.poolInfo(n)
Pool information is returned in the following struct.
struct PoolInfo {
address lptoken;
address token;
address gauge;
address crvRewards;
address stash;
bool shutdown;
lptoken: the underlying token(ex. the curve lp token) token: the convex deposit token(a 1:1 token representing an lp deposit). The supply of this token can be used to calculate the TVL of the pool gauge: the curve "gauge" or staking contract used by the pool crvRewards: the main reward contract for the pool stash: a helper contract used to hold extra rewards (like snx) on behalf of the pool until distribution is called shutdown: a shutdown flag of the pool


There are two deposit commands, deposit() and depositAll(). Depositing into the booster will return a "deposit token" as a receipt. This token can be staked in the rewards contract to earn CRV and other rewards.
//deposit into a pool "n" and receive the deposit token
await booster.deposit( n, amount, false )
//deposit into a pool "n" and immediately stake into the rewards contract
await booster.deposit( n, amount, true )
//deposit all lp tokens for pool "n" and stake into the rewards contract
await booster.depositAll( n, true )


There are two withdraw commands, withdraw() and withdrawAll(). By burning a convex deposit token you can receive the underlying LP token.
//withdraw from pool "n"
await booster.withdraw( n, amount )
//withdraw all from pool "n"
await booster.withdrawAll( n )