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
1
const vaults = await twoPi.getVaults();
Copied!

Returns

Notice that for testnet vaults, APY values are wrong and do not reflect the production values.
1
[
2
Vault {
3
identifier: 'bsc_busd',
4
pid: 0,
5
token: 'BUSD',
6
address: '0xCB50fF1863cBBAd718d3A1eEEf403a95C58d3B16',
7
tokenAddress: '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56',
8
apy: 0.11333126925136378,
9
balances: [],
10
deposits: []
11
},
12
Vault {
13
identifier: 'bsc_usdc',
14
pid: 1,
15
token: 'USDC',
16
address: '0xCB50fF1863cBBAd718d3A1eEEf403a95C58d3B16',
17
tokenAddress: '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d',
18
apy: 0.11333126925136378,
19
balances: [],
20
deposits: []
21
},
22
Vault {
23
identifier: 'bsc_usdt',
24
pid: 2,
25
token: 'USDT',
26
address: '0xCB50fF1863cBBAd718d3A1eEEf403a95C58d3B16',
27
tokenAddress: '0x55d398326f99059fF775485246999027B3197955',
28
apy: 0.11333126925136378,
29
balances: [],
30
deposits: []
31
},
32
Vault {
33
identifier: 'mumbai_dai',
34
pid: 1,
35
token: 'DAI',
36
address: '0x3B353b1CBDDA3A3D648af9825Ee34d9CA816FD38',
37
tokenAddress: '0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F',
38
apy: -0.006363113618050425,
39
balances: [],
40
deposits: []
41
}
42
]
Copied!
Copy link