Adding / Removing Liquidity

Adding Liquidity via the Balancer SDK

Removing Liquidity via the Balancer SDK

Information on Hooks

These hooks are called by the Balancer v2 Vault throughout the lifecycle of an FXPool

joinPool

Use this function for adding liquidity into an FXPool

joinPool(
    bytes32 poolId, 
    address sender, 
    address recipient, 
    JoinPoolRequest request
)

JoinPoolRequest(
    address[] assets,
    uint256[] maxAmountsIn,
    bytes userData,
    bool fromInternalBalance
)

Refer to the Balancer Developer Docs for more info about JoinPool arguments.

exitPool

Use this function for removing liquidity into one of our FXPool(s).

exitPool( 
    bytes32 poolId, 
    address sender, 
    address recipient, 
    ExitPoolRequest request 
)

ExitPoolRequest(
    address[] assets,
    uint256[] minAmountsOut,
    bytes userData,
    bool toInternalBalance 
)

Refer to the Balancer Developer Docs for more info about ExitPool arguments.

Last updated