There are three liquidity pool contracts for APY.Finance. Each contract handles a specific currency and issues its own APT token to represent a user’s stake in the pool. There is a contract for DAI, USDC, and USDT. These contracts are orchestrated by the APY manager to act as a single pool.
The liquidity pool contracts use a proxy pattern for upgradeability. Transactions are sent to the proxy contract address, but the functions they call are from the implementation contract.
Each pool contract is also an ERC-20 token with 18 decimals and the symbol “APT”. The contract is called APYPoolToken.
All of the following examples will use web3.js and the DAI liquidity pool contract.
The transaction sender must first approve the pool proxy contract to transfer their deposit tokens: