Pools
AMM pools for both stable and uncorrelated assets of variable weights with up to 8 assets per pool.
Initialization
const afSdk = new Aftermath("MAINNET");
await afSdk.init(); // initialize provider
const pools = afSdk.Pools();Constants
Pools.constants = {
feePercentages: {
totalProtocol: 0.00005, // 0.005%
treasury: 0.5, // 50% of protocol fees
insuranceFund: 0.3, // 30% of protocol fees
devWallet: 0.2, // 20% of protocol fees
},
referralPercentages: {
discount: 0.05, // 5% of treasury fees
rebate: 0.05, // 5% of treasury fees
},
bounds: {
maxCoinsInPool: 8,
maxTradePercentageOfPoolBalance: 0.3, // 30%
maxWithdrawPercentageOfPoolBalance: 0.3, // 30%
minSwapFee: 0.0001, // 0.01%
maxSwapFee: 0.1, // 10%
minWeight: 0.01, // 1%
maxWeight: 0.99, // 99%
minDaoFee: 0, // 0%
maxDaoFee: 1, // 100%
},
defaults: {
lpCoinDecimals: 9,
},
};Pool Management Methods
Getting Pool Information
Pool Creation and Publishing
Pool Information Queries
Pool Class Methods
Trading and Liquidity Operations
Price and Amount Calculations
Pool Analytics
Types
Pool Types
Example Usage
Last updated