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
  • setParams
  • viewParameters
  • Hooks
  • onJoinPool
  • onExitPool
  • onSwap
  1. Contract API
  2. FXPool

API Reference

This page is under construction and is not yet complete

curve

returns a struct that contains the FX pool dimensions (int128 format), assimilators, oracles, and vault references

struct Curve {
        // Curve parameters
        int128 alpha;
        int128 beta;
        int128 delta;
        int128 epsilon;
        int128 lambda;
        int128[] weights;
        uint256 cap;
        // Assets and their assimilators
        Assimilator[] assets;
        mapping(address => Assimilator) assimilators;
        // Oracles to determine the price
        // Note that 0'th index should always be USDC 1e18
        // Oracle's pricing should be denominated in Currency/USDC
        mapping(address => IOracle) oracles;
        //   mapping(address => uint256) balances;
        mapping(address => mapping(address => uint256)) allowances;
        // Vault reference
        IVault vault;
        address fxPoolAddress;
        bytes32 poolId;
    }

setParams

Set pool curve dimensions needed to calculate liquidity functions and swaps.

viewParameters

Returns the FXPool dimensions in uint265 format (Wei format)

viewParameters()

Hooks

onJoinPool

onExitPool

onSwap

PreviousFXPoolNextPairs and Tickers

Last updated 1 year ago