APY.Finance
Search…
Liquidity Mining Pool
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.

Adding Liquidity

The transaction sender must first approve the pool proxy contract to transfer their deposit tokens:
1
await daiToken.methods.approve(daiPoolToken.address, daiBalance);
Copied!
Then the sender must call the addLiquidity function on the pool contract with the amount of tokens they wish to deposit:
1
await daiPoolToken.methods.addLiquidity(daiBalance);
Copied!

Removing Liquidity

The transaction sender must first approve the pool proxy contract to transfer their APT tokens:
1
await daiAptToken.methods.approve(
2
daiPoolToken.address,
3
daiAptBalance
4
);
Copied!
APT represents a share of the pool. The total supply of APT represents the total amount of stablecoin deposited in the pool contract.
Then the sender must call the redeem function on the pool contract with the amount of APT the wish to redeem:
1
await daiPoolToken.redeem(daiAptBalance);
Copied!
Redeeming the entire balance of APT will withdraw the sender’s entire deposit.

Contract Addresses

Mainnet

Contract
Address
DAI Liquidity
0x75CE0E501e2E6776FcAAa514f394a88a772A8970
USDC Liquidity
0xe18b0365D5D09F394f84eE56ed29DD2d8D6Fba5f
USDT Liquidity
0xeA9c5a2717D5Ab75afaAC340151e73a7e37d99A7

Kovan

The contracts deployed to Kovan use the DAI, USDC, and USDT tokens available from the Aave faucet.
Contract
Address
DAI Liquidity
0xf587EC50e2E6518F7f016d5A78561109Ab96FEa1
USDC Liquidity
0xA138299A1BB17e90F2edCc2d567358C4BEeCa092
USDT Liquidity
0x80073EeF3C57Ba05dC25E5cD5b78C5f9fb18e4D8

APYPoolToken ABI

Last modified 11mo ago