Links
Comment on page

Retrieving vaults

Let's start by choosing the strategy that works the best for you by looking at 2PI vaults and their APY (Annual Percentage Yield).
All APYs displayed by this method are final values. Performance fees (4.5%) are applied to profits and don't alter the perceived return of each vault.
twoPi.getVaults()
This method returns a list of all the vaults available to deposit.

Example

JavaScript
const vaults = await twoPi.getVaults();

Returns

Notice that for testnet vaults, APY values are wrong and do not reflect the production values.
[
Vault {
identifier: 'bsc_busd',
pid: 0,
token: 'BUSD',
address: '0xCB50fF1863cBBAd718d3A1eEEf403a95C58d3B16',
tokenAddress: '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56',
apy: 0.11333126925136378,
balances: [],
deposits: []
},
Vault {
identifier: 'bsc_usdc',
pid: 1,
token: 'USDC',
address: '0xCB50fF1863cBBAd718d3A1eEEf403a95C58d3B16',
tokenAddress: '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d',
apy: 0.11333126925136378,
balances: [],
deposits: []
},
Vault {
identifier: 'bsc_usdt',
pid: 2,
token: 'USDT',
address: '0xCB50fF1863cBBAd718d3A1eEEf403a95C58d3B16',
tokenAddress: '0x55d398326f99059fF775485246999027B3197955',
apy: 0.11333126925136378,
balances: [],
deposits: []
},
Vault {
identifier: 'mumbai_dai',
pid: 1,
token: 'DAI',
address: '0x3B353b1CBDDA3A3D648af9825Ee34d9CA816FD38',
tokenAddress: '0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F',
apy: -0.006363113618050425,
balances: [],
deposits: []
}
]