CurveDeposit
Description
Action that deposits tokens
into liquidity pool via depositTarget
receiving lpToken
.
User needs to approve every token in tokens
which has a nonzero deposit amount specified in amounts
.
If one of the tokens == 0xEeee...
the user needs to have an appropriate balance of WETH
that will be used instead of native ETH
. User needs to approve the its wallet
to pull WETH
.
Action ID
0xeae20b37
SDK Action
Action Type
STANDARD_ACTION
Input Parameters
Flags parameter:
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 depositTargetType
enum 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 forCurveWithdraw
: if true -burnAmount
specifies the MAXIMUM amount of lp tokens to burn,amounts
specifies the EXACT amount of tokens to withdraw; if false -burnAmount
specifies EXACT amount of lp tokens to burn,amounts
specifies 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 signaturepool()
ZAP_CURVE - target is zap with the pool address view function signaturecurve()
Return Value
Events and Logs
Last updated
Was this helpful?