Pool Interface
Last updated
Last updated
There are many different pool types in the A360 AMM, however all these pool types extend the and there is common interfacing capability across all the different pool types.
poolIDs
If you want to interface with a pool, you'll first need to know its poolId
. The poolId
is a unique identifier, the first portion of which is the pool's contract address. For example, the pool with the id 0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014
has a contract address of 0x5c6ee304399dbdb9c8ef030ab642b10820db8f56
.
You can get a poolId
from:
A pool's URL:
The
Calling getPoolId()
on the contract itself if you already have it
Below are the data fields common to all pools; however, each pool will have data specific to its pool type.
Since all tokens are held in the Vault, you must query the Vault when querying on-chain pool balances. For example, calling
returns something resembling:
Swap fees are stored at the pool level. To get a pool's swap fee, call:
Values are returned with 18 decimals.