Action that deposits
tokensinto liquidity pool via
User needs to approve every token in
tokenswhich has a nonzero deposit amount specified in
If one of the tokens ==
0xEeee...the user needs to have an appropriate balance of
WETHthat will be used instead of native
ETH. User needs to approve the
address from- address where to pull tokens from.
address to- address that will receive the LP tokens.
address depositTarget- pool contract or zap deposit contract in which to deposit tokens.
uint256 burnAmount- minimum amount of LP tokens to accept.
uint8 flags- explained below
uint256 amounts- amount of each token to deposit.
This parameter is the same for both deposit and withdraw actions.
It holds two flags:
explicitUnderlying(1 << 2 bitmask),
withdrawExact(1 << 3 bitmask), as well as
depositTargetTypeenum which takes up the lower 2 bits.
bool explicitUnderlying- used when the curve pool doesn't have a dedicated deposit zap but has underlying tokens that we want to deposit or withdraw.
bool withdrawExact- explained here but relevant only for
CurveWithdraw: if true -
burnAmountspecifies the MAXIMUM amount of lp tokens to burn,
amountsspecifies the EXACT amount of tokens to withdraw; if false -
burnAmountspecifies EXACT amount of lp tokens to burn,
amountsspecifies the MINIMUM amount of withdrawn tokens to accept;
uint2 depositTargetType:SWAP (=0) - target is pool swap contract ZAP_POOL - target is zap with the pool address view function signature
pool()ZAP_CURVE - target is zap with the pool address view function signature