@@ -84,6 +84,53 @@ const subscription = pool.closeEpoch().subscribe(
84
84
)
85
85
```
86
86
87
+ ## Investments
88
+
89
+ Investments for a pool are done via [ ERC-7540 Tokenized Vaults] ( https://eips.ethereum.org/EIPS/eip-7540 ) . Vaults can be deployed for a tranche on any supported network, for any supported currency
90
+
91
+ Retrieve a vault by querying it from the pool:
92
+
93
+ ``` js
94
+ const pool = await centrifuge .pool (' 1' )
95
+ const vault = await pool .vault (1 , ' 0xabc...' , ' 0xdef...' ) // Chain ID, tranche ID, investment currency address
96
+ ```
97
+
98
+ Query the state of an investment on the vault for an investor:
99
+
100
+ ``` js
101
+ const investment = await vault .investment (' 0x123...' )
102
+ // Will return an object containing:
103
+ // isAllowedToInvest - Whether an investor is allowed to invest in the tranche
104
+ // investmentCurrency - The ERC20 token that is used to invest in the vault
105
+ // investmentCurrencyBalance - The balance of the investor of the investment currency
106
+ // investmentCurrencyAllowance - The allowance of the vault
107
+ // shareCurrency - The ERC20 token that is issued to investors to account for their share in the tranche
108
+ // shareBalance - The number of shares the investor has in the tranche
109
+ // claimableInvestShares - The number of shares an investor can claim after their invest order has been processed (partially or not)
110
+ // claimableInvestCurrencyEquivalent - The equivalent value of the claimable shares denominated in the invest currency
111
+ // claimableRedeemCurrency - The amout of money an investor can claim after their redeem order has been processed (partially or not)
112
+ // claimableRedeemSharesEquivalent - The amount of shares that have been redeemed for which the investor can claim money
113
+ // pendingInvestCurrency - The amount of money that the investor wants to invest in the tranche that has not been processed yet
114
+ // pendingRedeemShares - The amount of shares that the investor wants to redeem from the tranche that has not been processed yet
115
+ // claimableCancelInvestCurrency - The amount of money an investor can claim after an invest order cancellation has been processed
116
+ // claimableCancelRedeemShares - The amount of shares an investor can claim after a redeem order cancellation has been processed
117
+ // hasPendingCancelInvestRequest - Whether the investor has an invest order that is in the process of being cancelled
118
+ // hasPendingCancelRedeemRequest - Whether the investor has a redeem order that is in the process of being cancelled
119
+ ```
120
+
121
+ Invest in a vault:
122
+
123
+ ``` js
124
+ const result = await vault .increaseInvestOrder (1000 )
125
+ console .log (result .hash )
126
+ ```
127
+
128
+ Once an order has been processed, ` claimableInvestShares ` will positive and shares can be claimed with:
129
+
130
+ ``` js
131
+ const result = await vault .claim ()
132
+ ```
133
+
87
134
## Reports
88
135
89
136
Reports are generated from data from the Centrifuge API and are combined with pool metadata to provide a comprehensive view of the pool's financials.
0 commit comments