LogoLogo
  • Xave Finance
  • Contract Reference
  • Deployment Addresses
    • Avalanche (C-Chain)
    • Polygon (POS) Mainnet
    • Ethereum Mainnet
    • Apothem Testnet
    • Sepolia Testnet
  • Developer Guides
    • Executing FX Trades
    • Adding / Removing Liquidity
  • Contract API
    • Assimilators
      • API Reference
    • FXPool
      • API Reference
  • Other API Reference
    • Pairs and Tickers
Powered by GitBook
On this page
  • Adding Liquidity via the Balancer SDK
  • Removing Liquidity via the Balancer SDK
  • Information on Hooks
  • joinPool
  • exitPool
  1. Developer Guides

Adding / Removing Liquidity

PreviousExecuting FX TradesNextAssimilators

Last updated 1 year ago

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
)

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 for more info about JoinPool arguments.

Refer to the for more info about ExitPool arguments.

Balancer Developer Docs
Balancer Developer Docs
Exiting a pool | Balancer
Logo
Joining a pool | Balancer
Logo