@elmntl/vaults-v2 1.4.5 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/accounts/index.d.ts +2 -0
- package/dist/accounts/index.d.ts.map +1 -1
- package/dist/accounts/index.js +3 -1
- package/dist/accounts/index.js.map +1 -1
- package/dist/accounts/pool.d.ts +6 -0
- package/dist/accounts/pool.d.ts.map +1 -1
- package/dist/accounts/pool.js +8 -0
- package/dist/accounts/pool.js.map +1 -1
- package/dist/accounts/poolExt.d.ts +101 -0
- package/dist/accounts/poolExt.d.ts.map +1 -0
- package/dist/accounts/poolExt.js +211 -0
- package/dist/accounts/poolExt.js.map +1 -0
- package/dist/accounts/position.d.ts +8 -0
- package/dist/accounts/position.d.ts.map +1 -1
- package/dist/accounts/position.js +22 -0
- package/dist/accounts/position.js.map +1 -1
- package/dist/accounts/ticket.d.ts +13 -0
- package/dist/accounts/ticket.d.ts.map +1 -1
- package/dist/accounts/ticket.js +30 -0
- package/dist/accounts/ticket.js.map +1 -1
- package/dist/generated/idl/elemental_vault_v2.json +1395 -78
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/programs/elemental.d.ts +34 -1
- package/dist/programs/elemental.d.ts.map +1 -1
- package/dist/programs/elemental.js +173 -0
- package/dist/programs/elemental.js.map +1 -1
- package/dist/types.d.ts +55 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +25 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/accounts/index.ts +2 -0
- package/src/accounts/pool.ts +9 -0
- package/src/accounts/poolExt.ts +272 -0
- package/src/accounts/position.ts +22 -0
- package/src/accounts/ticket.ts +35 -0
- package/src/generated/idl/elemental_vault_v2.json +1395 -78
- package/src/index.ts +12 -1
- package/src/programs/elemental.ts +206 -1
- package/src/types.ts +66 -1
package/package.json
CHANGED
package/src/accounts/index.ts
CHANGED
package/src/accounts/pool.ts
CHANGED
|
@@ -162,6 +162,15 @@ export class Pool {
|
|
|
162
162
|
.toFixed();
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Fee (bps) charged on exits paid in the vault token, locked onto each ticket
|
|
167
|
+
* at creation. On a USDC-denominated pool this is the USDC leg (e.g. O1: 25).
|
|
168
|
+
* Zero on ELE6 and on pools that have not set it.
|
|
169
|
+
*/
|
|
170
|
+
get vaultExitFeeBps(): number {
|
|
171
|
+
return this.data.vaultExitFeeBps ?? 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
165
174
|
// APR as decimal string (e.g., "0.10" for 10%)
|
|
166
175
|
get apr(): string {
|
|
167
176
|
return new Decimal(this.data.rewardAnnualRate.toString())
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import Decimal from "decimal.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
import { Connection, PublicKey } from "@solana/web3.js";
|
|
4
|
+
import {
|
|
5
|
+
PoolExtData,
|
|
6
|
+
POOL_EXT_FLAG_ALT_DEPOSITS,
|
|
7
|
+
POOL_EXT_FLAG_ALT_EXITS,
|
|
8
|
+
CONVERSION_SOURCE_SCOPE,
|
|
9
|
+
NAV_ONE,
|
|
10
|
+
SCOPE_PROGRAM_ID,
|
|
11
|
+
SCOPE_PRICES_LEN,
|
|
12
|
+
SCOPE_ENTRIES_OFFSET,
|
|
13
|
+
SCOPE_ENTRY_SIZE,
|
|
14
|
+
} from "../types";
|
|
15
|
+
import { Pool } from "./pool";
|
|
16
|
+
|
|
17
|
+
/** A NAV reading: USDC per 1 RWA, 1e9-scaled, plus freshness. */
|
|
18
|
+
export interface NavReading {
|
|
19
|
+
/** 1e9-scaled (1.05 USDC per RWA == 1_050_000_000) */
|
|
20
|
+
nav: BN;
|
|
21
|
+
/** human-readable, e.g. "1.16748395" */
|
|
22
|
+
navDecimal: string;
|
|
23
|
+
/** unix seconds of the reading (oracle entry timestamp, or PoolExt.nav_updated_at) */
|
|
24
|
+
updatedAt: number;
|
|
25
|
+
ageSeconds: number;
|
|
26
|
+
/** true when the program would reject a conversion with PoolExtNavStale */
|
|
27
|
+
isStale: boolean;
|
|
28
|
+
source: "scope" | "posted";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface AltDepositQuote {
|
|
32
|
+
/** alt tokens in (raw) */
|
|
33
|
+
altIn: BN;
|
|
34
|
+
/** vault units credited (raw), floored exactly like the program */
|
|
35
|
+
credit: BN;
|
|
36
|
+
/** human-readable credit in vault tokens */
|
|
37
|
+
creditDecimal: string;
|
|
38
|
+
nav: NavReading;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface AltExitQuote {
|
|
42
|
+
/** vault units leaving (raw): ticket capital + reward */
|
|
43
|
+
vaultTotal: BN;
|
|
44
|
+
gross: BN;
|
|
45
|
+
fee: BN;
|
|
46
|
+
net: BN;
|
|
47
|
+
grossDecimal: string;
|
|
48
|
+
feeDecimal: string;
|
|
49
|
+
netDecimal: string;
|
|
50
|
+
nav: BN;
|
|
51
|
+
feeBps: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* PoolExt — a second token ("alt") at a pool's edges (ELE7 ele7-rwa-v1+).
|
|
56
|
+
*
|
|
57
|
+
* - `altIsUsdc`: the pool is RWA-denominated and the alt is USDC (ONyc X1, nOPAL X1).
|
|
58
|
+
* - `!altIsUsdc`: the pool is USDC-denominated and the alt is the RWA (USDC O1 + ONyc).
|
|
59
|
+
*
|
|
60
|
+
* NAV is always USDC per 1 RWA (1e9); the direction decides how it is applied.
|
|
61
|
+
* The ledger, APR and ticket queue stay in the pool's vault_mint.
|
|
62
|
+
*/
|
|
63
|
+
export class PoolExt {
|
|
64
|
+
constructor(
|
|
65
|
+
readonly pool: Pool,
|
|
66
|
+
readonly address: PublicKey,
|
|
67
|
+
readonly data: PoolExtData,
|
|
68
|
+
) {}
|
|
69
|
+
|
|
70
|
+
static findAddress(poolAddress: PublicKey, programId: PublicKey): PublicKey {
|
|
71
|
+
return PublicKey.findProgramAddressSync(
|
|
72
|
+
[Buffer.from("ext"), poolAddress.toBuffer()],
|
|
73
|
+
programId,
|
|
74
|
+
)[0];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Owner of alt_holder and alt_faucet. Never the pool authority. */
|
|
78
|
+
static findAuthority(poolAddress: PublicKey, programId: PublicKey): PublicKey {
|
|
79
|
+
return PublicKey.findProgramAddressSync(
|
|
80
|
+
[Buffer.from("ext_authority"), poolAddress.toBuffer()],
|
|
81
|
+
programId,
|
|
82
|
+
)[0];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
get authorityAddress(): PublicKey {
|
|
86
|
+
return PoolExt.findAuthority(this.pool.address, this.pool.programId);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
get altMintAddress(): PublicKey {
|
|
90
|
+
return this.data.altMint;
|
|
91
|
+
}
|
|
92
|
+
get altHolderAddress(): PublicKey {
|
|
93
|
+
return this.data.altHolder;
|
|
94
|
+
}
|
|
95
|
+
get altFaucetAddress(): PublicKey {
|
|
96
|
+
return this.data.altFaucet;
|
|
97
|
+
}
|
|
98
|
+
/** Zero pubkey = fee stays in the faucet. */
|
|
99
|
+
get feeDestination(): PublicKey | null {
|
|
100
|
+
return this.data.feeDestination.equals(PublicKey.default)
|
|
101
|
+
? null
|
|
102
|
+
: this.data.feeDestination;
|
|
103
|
+
}
|
|
104
|
+
get altDecimals(): number {
|
|
105
|
+
return this.data.altDecimals;
|
|
106
|
+
}
|
|
107
|
+
get altMultiplier(): number {
|
|
108
|
+
return Math.pow(10, this.data.altDecimals);
|
|
109
|
+
}
|
|
110
|
+
get altIsUsdc(): boolean {
|
|
111
|
+
return this.data.altIsUsdc !== 0;
|
|
112
|
+
}
|
|
113
|
+
get altDepositsEnabled(): boolean {
|
|
114
|
+
return (this.data.flags & POOL_EXT_FLAG_ALT_DEPOSITS) !== 0;
|
|
115
|
+
}
|
|
116
|
+
get altExitsEnabled(): boolean {
|
|
117
|
+
return (this.data.flags & POOL_EXT_FLAG_ALT_EXITS) !== 0;
|
|
118
|
+
}
|
|
119
|
+
get exitFeeBps(): number {
|
|
120
|
+
return this.data.exitFeeBps;
|
|
121
|
+
}
|
|
122
|
+
get usesScope(): boolean {
|
|
123
|
+
return this.data.conversionSource === CONVERSION_SOURCE_SCOPE;
|
|
124
|
+
}
|
|
125
|
+
get navOracle(): PublicKey | null {
|
|
126
|
+
return this.usesScope ? this.data.navOracle : null;
|
|
127
|
+
}
|
|
128
|
+
get navOracleIndex(): number {
|
|
129
|
+
return this.data.navOracleIndex;
|
|
130
|
+
}
|
|
131
|
+
get navMaxAge(): number {
|
|
132
|
+
return this.data.navMaxAge;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
// NAV
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Read the NAV the program will use at the next conversion: the pinned Scope
|
|
141
|
+
* entry (rescaled to 1e9) or the posted value. Mirrors PoolExt::resolve_nav.
|
|
142
|
+
*/
|
|
143
|
+
async readNav(connection: Connection, now = Math.floor(Date.now() / 1000)): Promise<NavReading> {
|
|
144
|
+
if (!this.usesScope) {
|
|
145
|
+
const updatedAt = this.data.navUpdatedAt.toNumber();
|
|
146
|
+
const age = now - updatedAt;
|
|
147
|
+
return {
|
|
148
|
+
nav: this.data.nav,
|
|
149
|
+
navDecimal: PoolExt.navToDecimal(this.data.nav),
|
|
150
|
+
updatedAt,
|
|
151
|
+
ageSeconds: age,
|
|
152
|
+
isStale: this.data.nav.isZero() || (this.data.navMaxAge > 0 && (age > this.data.navMaxAge || age < 0)),
|
|
153
|
+
source: "posted",
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const info = await connection.getAccountInfo(this.data.navOracle);
|
|
157
|
+
if (!info) throw new Error("NAV oracle account not found");
|
|
158
|
+
if (!info.owner.equals(SCOPE_PROGRAM_ID) || info.data.length !== SCOPE_PRICES_LEN) {
|
|
159
|
+
throw new Error("NAV oracle is not a Scope OraclePrices account");
|
|
160
|
+
}
|
|
161
|
+
return PoolExt.readScopeEntry(Buffer.from(info.data), this.data.navOracleIndex, this.data.navMaxAge, now);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Decode one Scope `DatedPrice` entry and rescale it to the program's 1e9 NAV. */
|
|
165
|
+
static readScopeEntry(data: Buffer, index: number, navMaxAge: number, now: number): NavReading {
|
|
166
|
+
const off = SCOPE_ENTRIES_OFFSET + index * SCOPE_ENTRY_SIZE;
|
|
167
|
+
const value = new BN(data.readBigUInt64LE(off).toString());
|
|
168
|
+
const exp = Number(data.readBigUInt64LE(off + 8));
|
|
169
|
+
const updatedAt = Number(data.readBigUInt64LE(off + 24));
|
|
170
|
+
if (exp > 18) throw new Error("Scope exponent out of range");
|
|
171
|
+
const nav = value.mul(NAV_ONE).div(new BN(10).pow(new BN(exp)));
|
|
172
|
+
const age = now - updatedAt;
|
|
173
|
+
return {
|
|
174
|
+
nav,
|
|
175
|
+
navDecimal: PoolExt.navToDecimal(nav),
|
|
176
|
+
updatedAt,
|
|
177
|
+
ageSeconds: age,
|
|
178
|
+
isStale: nav.isZero() || (navMaxAge > 0 && (age > navMaxAge || age < 0)),
|
|
179
|
+
source: "scope",
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
static navToDecimal(nav: BN): string {
|
|
184
|
+
return new Decimal(nav.toString()).div(NAV_ONE.toString()).toFixed();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// ---------------------------------------------------------------------------
|
|
188
|
+
// Conversion math — byte-for-byte the program's (floor on credit/gross, ceil on fee)
|
|
189
|
+
// ---------------------------------------------------------------------------
|
|
190
|
+
|
|
191
|
+
/** Alt (raw) → vault (raw), floored. Mirrors PoolExt::alt_to_vault_at. */
|
|
192
|
+
static altToVaultAt(altAmount: BN, nav: BN, altDecimals: number, perTokenAmount: BN, altIsUsdc: boolean): BN {
|
|
193
|
+
const altUnit = new BN(10).pow(new BN(altDecimals));
|
|
194
|
+
if (altIsUsdc) {
|
|
195
|
+
return altAmount.mul(perTokenAmount).mul(NAV_ONE).div(nav.mul(altUnit));
|
|
196
|
+
}
|
|
197
|
+
return altAmount.mul(nav).mul(perTokenAmount).div(NAV_ONE.mul(altUnit));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** Vault (raw) → alt (raw) gross of fee, floored. Mirrors PoolExt::vault_to_alt_gross_at. */
|
|
201
|
+
static vaultToAltGrossAt(vaultAmount: BN, nav: BN, altDecimals: number, perTokenAmount: BN, altIsUsdc: boolean): BN {
|
|
202
|
+
const altUnit = new BN(10).pow(new BN(altDecimals));
|
|
203
|
+
if (altIsUsdc) {
|
|
204
|
+
return vaultAmount.mul(nav).mul(altUnit).div(NAV_ONE.mul(perTokenAmount));
|
|
205
|
+
}
|
|
206
|
+
return vaultAmount.mul(NAV_ONE).mul(altUnit).div(nav.mul(perTokenAmount));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** Fee on a gross alt amount, rounded UP. Mirrors PoolExt::fee_on. */
|
|
210
|
+
static feeOn(gross: BN, feeBps: number): BN {
|
|
211
|
+
if (feeBps === 0 || gross.isZero()) return new BN(0);
|
|
212
|
+
return gross.muln(feeBps).addn(9_999).divn(10_000);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
altToVault(altAmount: BN, nav: BN): BN {
|
|
216
|
+
return PoolExt.altToVaultAt(altAmount, nav, this.altDecimals, this.pool.data.perTokenAmount, this.altIsUsdc);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
vaultToAltGross(vaultAmount: BN, nav: BN): BN {
|
|
220
|
+
return PoolExt.vaultToAltGrossAt(vaultAmount, nav, this.altDecimals, this.pool.data.perTokenAmount, this.altIsUsdc);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** Quote an alt deposit: `altAmount` in human alt tokens (e.g. "10500" USDC). */
|
|
224
|
+
async quoteDeposit(connection: Connection, altAmount: number | string): Promise<AltDepositQuote> {
|
|
225
|
+
const nav = await this.readNav(connection);
|
|
226
|
+
const altIn = new BN(new Decimal(altAmount.toString()).mul(this.altMultiplier).toFixed(0));
|
|
227
|
+
const credit = this.altToVault(altIn, nav.nav);
|
|
228
|
+
return {
|
|
229
|
+
altIn,
|
|
230
|
+
credit,
|
|
231
|
+
creditDecimal: new Decimal(credit.toString()).div(this.pool.vaultMultiplier).toFixed(),
|
|
232
|
+
nav,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Quote an alt exit for `vaultTotal` raw vault units at `nav` and `feeBps`.
|
|
238
|
+
* For an existing alt ticket pass its `navLocked` / `feeBpsLocked`; for a
|
|
239
|
+
* preview pass the current reading and `exitFeeBps`.
|
|
240
|
+
*/
|
|
241
|
+
quoteExit(vaultTotal: BN, nav: BN, feeBps: number = this.exitFeeBps): AltExitQuote {
|
|
242
|
+
const gross = this.vaultToAltGross(vaultTotal, nav);
|
|
243
|
+
const fee = PoolExt.feeOn(gross, feeBps);
|
|
244
|
+
const net = gross.sub(fee);
|
|
245
|
+
const d = (v: BN) => new Decimal(v.toString()).div(this.altMultiplier).toFixed();
|
|
246
|
+
return { vaultTotal, gross, fee, net, grossDecimal: d(gross), feeDecimal: d(fee), netDecimal: d(net), nav, feeBps };
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** Alt faucet balance (raw). Alt tickets redeem only when this covers their net. */
|
|
250
|
+
async getFaucetBalanceRaw(connection: Connection): Promise<BN> {
|
|
251
|
+
try {
|
|
252
|
+
const b = await connection.getTokenAccountBalance(this.data.altFaucet);
|
|
253
|
+
return new BN(b.value.amount);
|
|
254
|
+
} catch {
|
|
255
|
+
return new BN(0);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
async getFaucetBalance(connection: Connection): Promise<string> {
|
|
260
|
+
const raw = await this.getFaucetBalanceRaw(connection);
|
|
261
|
+
return new Decimal(raw.toString()).div(this.altMultiplier).toFixed();
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
async getHolderBalance(connection: Connection): Promise<string> {
|
|
265
|
+
try {
|
|
266
|
+
const b = await connection.getTokenAccountBalance(this.data.altHolder);
|
|
267
|
+
return new Decimal(b.value.amount).div(this.altMultiplier).toFixed();
|
|
268
|
+
} catch {
|
|
269
|
+
return "0";
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
package/src/accounts/position.ts
CHANGED
|
@@ -109,6 +109,28 @@ export class Position {
|
|
|
109
109
|
return this.data.ticketCount;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
// Cumulative counters (ele7-rwa-v1). Zero on positions that predate the upgrade,
|
|
113
|
+
// so do not derive principal from them for old positions: `amount` stays the truth.
|
|
114
|
+
get altDepositedRaw(): BN {
|
|
115
|
+
return this.data.altDeposited ?? new BN(0);
|
|
116
|
+
}
|
|
117
|
+
get vaultDepositedRaw(): BN {
|
|
118
|
+
return this.data.vaultDeposited ?? new BN(0);
|
|
119
|
+
}
|
|
120
|
+
get altWithdrawnRaw(): BN {
|
|
121
|
+
return this.data.altWithdrawn ?? new BN(0);
|
|
122
|
+
}
|
|
123
|
+
get vaultWithdrawnRaw(): BN {
|
|
124
|
+
return this.data.vaultWithdrawn ?? new BN(0);
|
|
125
|
+
}
|
|
126
|
+
/** vault_mint deposited through `deposit` / `deposit_vault_mint` / same-asset migration, human-readable */
|
|
127
|
+
get vaultDeposited(): string {
|
|
128
|
+
return new Decimal(this.vaultDepositedRaw.toString()).div(this.pool.vaultMultiplier).toFixed();
|
|
129
|
+
}
|
|
130
|
+
get vaultWithdrawn(): string {
|
|
131
|
+
return new Decimal(this.vaultWithdrawnRaw.toString()).div(this.pool.vaultMultiplier).toFixed();
|
|
132
|
+
}
|
|
133
|
+
|
|
112
134
|
get isTicketMode(): boolean {
|
|
113
135
|
return this.data.ticketMode !== 0;
|
|
114
136
|
}
|
package/src/accounts/ticket.ts
CHANGED
|
@@ -67,4 +67,39 @@ export class WithdrawalTicket {
|
|
|
67
67
|
get isRedeemable(): boolean {
|
|
68
68
|
return this.pool.epochIndex > this.data.createdEpochIndex + 1;
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
/** 0 = vault token (redeem_ticket), 1 = alt token (redeem_ticket_alt). Tickets from before ele7-rwa-v1 read 0. */
|
|
72
|
+
get payoutMint(): number {
|
|
73
|
+
return this.data.payoutMint ?? 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** True when this ticket pays the pool's alt token and must go through `redeemTicketAlt`. */
|
|
77
|
+
get isAltPayout(): boolean {
|
|
78
|
+
return this.payoutMint === 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** NAV locked at creation (USDC per 1 RWA, 1e9-scaled). Zero for vault-token tickets. */
|
|
82
|
+
get navLocked(): BN {
|
|
83
|
+
return this.data.navLocked ?? new BN(0);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Exit fee locked at creation (bps): the alt fee on alt tickets, the pool's vault exit fee on vault tickets. */
|
|
87
|
+
get feeBpsLocked(): number {
|
|
88
|
+
return this.data.feeBpsLocked ?? 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Fee withheld on a VAULT-token ticket at redemption (raw), rounded up like the program. Zero for alt tickets (use PoolExt.quoteExit). */
|
|
92
|
+
get vaultFeeRaw(): BN {
|
|
93
|
+
if (this.isAltPayout || this.feeBpsLocked === 0) return new BN(0);
|
|
94
|
+
return this.totalAmountRaw.muln(this.feeBpsLocked).addn(9_999).divn(10_000);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** What a VAULT-token ticket pays out (raw): total − fee. */
|
|
98
|
+
get vaultNetRaw(): BN {
|
|
99
|
+
return this.totalAmountRaw.sub(this.vaultFeeRaw);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
get vaultNet(): string {
|
|
103
|
+
return new Decimal(this.vaultNetRaw.toString()).div(this.pool.vaultMultiplier).toFixed();
|
|
104
|
+
}
|
|
70
105
|
}
|