@sodax/types 2.0.0-rc.12 → 2.0.0-rc.13
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/dist/chains/chains.d.ts +36 -0
- package/dist/chains/tokens.d.ts +67 -0
- package/dist/chains/tokens.js +31 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/leverageYield/index.d.ts +1 -0
- package/dist/leverageYield/index.js +1 -0
- package/dist/leverageYield/leverageYield.d.ts +127 -0
- package/dist/leverageYield/leverageYield.js +39 -0
- package/dist/sodax-config/sodax-config.d.ts +77 -0
- package/dist/sodax-config/sodax-config.js +2 -0
- package/dist/sui/sui.d.ts +3 -2
- package/dist/swap/swap.d.ts +32 -0
- package/dist/swap/swap.js +2 -1
- package/package.json +1 -1
package/dist/chains/chains.d.ts
CHANGED
|
@@ -526,6 +526,24 @@ export declare const spokeChainConfig: {
|
|
|
526
526
|
readonly nativeToken: "0x0000000000000000000000000000000000000000";
|
|
527
527
|
readonly bnUSD: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
528
528
|
readonly supportedTokens: {
|
|
529
|
+
readonly lsodaWEETH: {
|
|
530
|
+
readonly symbol: "lsodaWEETH";
|
|
531
|
+
readonly name: "Leveraged Soda weETH";
|
|
532
|
+
readonly decimals: 18;
|
|
533
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
534
|
+
readonly chainKey: "sonic";
|
|
535
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
536
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
537
|
+
};
|
|
538
|
+
readonly lsodaWSTETH: {
|
|
539
|
+
readonly symbol: "lsodaWSTETH";
|
|
540
|
+
readonly name: "Leveraged Soda wstETH";
|
|
541
|
+
readonly decimals: 18;
|
|
542
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
543
|
+
readonly chainKey: "sonic";
|
|
544
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
545
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
546
|
+
};
|
|
529
547
|
readonly sodaBNB: {
|
|
530
548
|
readonly symbol: "sodaBNB";
|
|
531
549
|
readonly name: "Soda BNB";
|
|
@@ -3302,6 +3320,24 @@ export declare const hubConfig: {
|
|
|
3302
3320
|
readonly nativeToken: "0x0000000000000000000000000000000000000000";
|
|
3303
3321
|
readonly wrappedNativeToken: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38";
|
|
3304
3322
|
readonly supportedTokens: {
|
|
3323
|
+
readonly lsodaWEETH: {
|
|
3324
|
+
readonly symbol: "lsodaWEETH";
|
|
3325
|
+
readonly name: "Leveraged Soda weETH";
|
|
3326
|
+
readonly decimals: 18;
|
|
3327
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
3328
|
+
readonly chainKey: "sonic";
|
|
3329
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
3330
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
3331
|
+
};
|
|
3332
|
+
readonly lsodaWSTETH: {
|
|
3333
|
+
readonly symbol: "lsodaWSTETH";
|
|
3334
|
+
readonly name: "Leveraged Soda wstETH";
|
|
3335
|
+
readonly decimals: 18;
|
|
3336
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
3337
|
+
readonly chainKey: "sonic";
|
|
3338
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
3339
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
3340
|
+
};
|
|
3305
3341
|
readonly sodaBNB: {
|
|
3306
3342
|
readonly symbol: "sodaBNB";
|
|
3307
3343
|
readonly name: "Soda BNB";
|
package/dist/chains/tokens.d.ts
CHANGED
|
@@ -259,7 +259,56 @@ export declare const SodaTokens: {
|
|
|
259
259
|
readonly vault: "0x243b0c26c8b38793908d7C64e8510f21B19B4613";
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
|
+
/**
|
|
263
|
+
* Leverage-yield vault share tokens on Sonic. Each entry is the ERC-4626 share token
|
|
264
|
+
* issued by a deployed `LeverageYieldVault` (see `leverageYield.leverageYieldVaults` for
|
|
265
|
+
* the matching vault metadata). Spread into `sonicSupportedTokens` and the swap registry
|
|
266
|
+
* so they're discoverable in token selectors and swappable via the solver.
|
|
267
|
+
*
|
|
268
|
+
* `address`, `hubAsset`, and `vault` are all the leverage-vault proxy address — these
|
|
269
|
+
* tokens live on the hub and aren't further wrapped.
|
|
270
|
+
*/
|
|
271
|
+
export declare const LsodaSymbols: readonly ["lsodaWEETH", "lsodaWSTETH"];
|
|
272
|
+
export type LsodaSymbol = (typeof LsodaSymbols)[number];
|
|
273
|
+
export declare const LsodaTokens: {
|
|
274
|
+
readonly lsodaWEETH: {
|
|
275
|
+
readonly symbol: "lsodaWEETH";
|
|
276
|
+
readonly name: "Leveraged Soda weETH";
|
|
277
|
+
readonly decimals: 18;
|
|
278
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
279
|
+
readonly chainKey: "sonic";
|
|
280
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
281
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
282
|
+
};
|
|
283
|
+
readonly lsodaWSTETH: {
|
|
284
|
+
readonly symbol: "lsodaWSTETH";
|
|
285
|
+
readonly name: "Leveraged Soda wstETH";
|
|
286
|
+
readonly decimals: 18;
|
|
287
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
288
|
+
readonly chainKey: "sonic";
|
|
289
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
290
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
291
|
+
};
|
|
292
|
+
};
|
|
262
293
|
export declare const sonicSupportedTokens: {
|
|
294
|
+
readonly lsodaWEETH: {
|
|
295
|
+
readonly symbol: "lsodaWEETH";
|
|
296
|
+
readonly name: "Leveraged Soda weETH";
|
|
297
|
+
readonly decimals: 18;
|
|
298
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
299
|
+
readonly chainKey: "sonic";
|
|
300
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
301
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
302
|
+
};
|
|
303
|
+
readonly lsodaWSTETH: {
|
|
304
|
+
readonly symbol: "lsodaWSTETH";
|
|
305
|
+
readonly name: "Leveraged Soda wstETH";
|
|
306
|
+
readonly decimals: 18;
|
|
307
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
308
|
+
readonly chainKey: "sonic";
|
|
309
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
310
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
311
|
+
};
|
|
263
312
|
readonly sodaBNB: {
|
|
264
313
|
readonly symbol: "sodaBNB";
|
|
265
314
|
readonly name: "Soda BNB";
|
|
@@ -2438,6 +2487,24 @@ export declare const stacksSupportedTokens: {
|
|
|
2438
2487
|
};
|
|
2439
2488
|
export declare const supportedTokensByChain: {
|
|
2440
2489
|
readonly sonic: {
|
|
2490
|
+
readonly lsodaWEETH: {
|
|
2491
|
+
readonly symbol: "lsodaWEETH";
|
|
2492
|
+
readonly name: "Leveraged Soda weETH";
|
|
2493
|
+
readonly decimals: 18;
|
|
2494
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
2495
|
+
readonly chainKey: "sonic";
|
|
2496
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
2497
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
2498
|
+
};
|
|
2499
|
+
readonly lsodaWSTETH: {
|
|
2500
|
+
readonly symbol: "lsodaWSTETH";
|
|
2501
|
+
readonly name: "Leveraged Soda wstETH";
|
|
2502
|
+
readonly decimals: 18;
|
|
2503
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
2504
|
+
readonly chainKey: "sonic";
|
|
2505
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
2506
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
2507
|
+
};
|
|
2441
2508
|
readonly sodaBNB: {
|
|
2442
2509
|
readonly symbol: "sodaBNB";
|
|
2443
2510
|
readonly name: "Soda BNB";
|
package/dist/chains/tokens.js
CHANGED
|
@@ -261,6 +261,36 @@ export const SodaTokens = {
|
|
|
261
261
|
vault: '0x243b0c26c8b38793908d7C64e8510f21B19B4613',
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
|
+
/**
|
|
265
|
+
* Leverage-yield vault share tokens on Sonic. Each entry is the ERC-4626 share token
|
|
266
|
+
* issued by a deployed `LeverageYieldVault` (see `leverageYield.leverageYieldVaults` for
|
|
267
|
+
* the matching vault metadata). Spread into `sonicSupportedTokens` and the swap registry
|
|
268
|
+
* so they're discoverable in token selectors and swappable via the solver.
|
|
269
|
+
*
|
|
270
|
+
* `address`, `hubAsset`, and `vault` are all the leverage-vault proxy address — these
|
|
271
|
+
* tokens live on the hub and aren't further wrapped.
|
|
272
|
+
*/
|
|
273
|
+
export const LsodaSymbols = ['lsodaWEETH', 'lsodaWSTETH'];
|
|
274
|
+
export const LsodaTokens = {
|
|
275
|
+
lsodaWEETH: {
|
|
276
|
+
symbol: 'lsodaWEETH',
|
|
277
|
+
name: 'Leveraged Soda weETH',
|
|
278
|
+
decimals: 18,
|
|
279
|
+
address: '0xD09de2f5070699A909c0FD32fb5A909d3886701D',
|
|
280
|
+
chainKey: ChainKeys.SONIC_MAINNET,
|
|
281
|
+
hubAsset: '0xD09de2f5070699A909c0FD32fb5A909d3886701D',
|
|
282
|
+
vault: '0xD09de2f5070699A909c0FD32fb5A909d3886701D',
|
|
283
|
+
},
|
|
284
|
+
lsodaWSTETH: {
|
|
285
|
+
symbol: 'lsodaWSTETH',
|
|
286
|
+
name: 'Leveraged Soda wstETH',
|
|
287
|
+
decimals: 18,
|
|
288
|
+
address: '0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a',
|
|
289
|
+
chainKey: ChainKeys.SONIC_MAINNET,
|
|
290
|
+
hubAsset: '0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a',
|
|
291
|
+
vault: '0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a',
|
|
292
|
+
},
|
|
293
|
+
};
|
|
264
294
|
// --- Per-chain supported tokens ---
|
|
265
295
|
export const sonicSupportedTokens = {
|
|
266
296
|
S: {
|
|
@@ -327,6 +357,7 @@ export const sonicSupportedTokens = {
|
|
|
327
357
|
vault: SodaTokens.sodaSODA.address,
|
|
328
358
|
},
|
|
329
359
|
...SodaTokens,
|
|
360
|
+
...LsodaTokens,
|
|
330
361
|
};
|
|
331
362
|
export const redbellySupportedTokens = {
|
|
332
363
|
RBNT: {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './evm/index.js';
|
|
|
9
9
|
export * from './icon/index.js';
|
|
10
10
|
export * from './injective/index.js';
|
|
11
11
|
export * from './moneyMarket/index.js';
|
|
12
|
+
export * from './leverageYield/index.js';
|
|
12
13
|
export * from './near/index.js';
|
|
13
14
|
export * from './solana/index.js';
|
|
14
15
|
export * from './stacks/index.js';
|
|
@@ -17,4 +18,4 @@ export * from './sui/index.js';
|
|
|
17
18
|
export * from './swap/index.js';
|
|
18
19
|
export * from './utils/index.js';
|
|
19
20
|
export * from './wallet/index.js';
|
|
20
|
-
export declare const CONFIG_VERSION =
|
|
21
|
+
export declare const CONFIG_VERSION = 211;
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from './evm/index.js';
|
|
|
9
9
|
export * from './icon/index.js';
|
|
10
10
|
export * from './injective/index.js';
|
|
11
11
|
export * from './moneyMarket/index.js';
|
|
12
|
+
export * from './leverageYield/index.js';
|
|
12
13
|
export * from './near/index.js';
|
|
13
14
|
export * from './solana/index.js';
|
|
14
15
|
export * from './stacks/index.js';
|
|
@@ -17,4 +18,4 @@ export * from './sui/index.js';
|
|
|
17
18
|
export * from './swap/index.js';
|
|
18
19
|
export * from './utils/index.js';
|
|
19
20
|
export * from './wallet/index.js';
|
|
20
|
-
export const CONFIG_VERSION =
|
|
21
|
+
export const CONFIG_VERSION = 211; // this value should be incremented (inside release/sdk branch) each time @sodax/types package is updated
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './leverageYield.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './leverageYield.js';
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { Address } from '../shared/shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* A single deployed LeverageYieldVault.
|
|
4
|
+
*
|
|
5
|
+
* The vault is an ERC-4626 wrapper on the Sonic hub. It accepts deposits of `asset` (a
|
|
6
|
+
* Sodax vault token like sodaWEETH), borrows `borrowToken` from the Sodax-forked AAVE
|
|
7
|
+
* pool, swaps the borrowed amount back into the asset, and re-supplies — yielding a
|
|
8
|
+
* leveraged long on the asset / borrowToken peg.
|
|
9
|
+
*
|
|
10
|
+
* The fields here are static descriptors of the deployed vault. Cross-chain deposits and
|
|
11
|
+
* withdrawals route by the user's spoke-side token (e.g. weETH on Arbitrum); the hub-side
|
|
12
|
+
* AssetToken and Sodax vault token are resolved at call time by `ConfigService`. This
|
|
13
|
+
* registry exists for vault discovery and UI display, not for routing.
|
|
14
|
+
*/
|
|
15
|
+
export type LeverageYieldVault = {
|
|
16
|
+
/**
|
|
17
|
+
* Stable lookup key — by convention the leverage-vault share-token symbol
|
|
18
|
+
* (e.g. `'lsodaWEETH'`, `'lsodaWSTETH'`). Used by `LeverageYieldService.getVault(name)`.
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/** Deployed `LeverageYieldVault` proxy address on the Sonic hub. */
|
|
22
|
+
vault: Address;
|
|
23
|
+
/**
|
|
24
|
+
* The vault's underlying asset on the hub — the ERC-20 a depositor effectively holds via
|
|
25
|
+
* vault shares. Always a Sodax vault-token wrapper (e.g. sodaWEETH), since user deposits
|
|
26
|
+
* are bridged in as the underlying hub asset and wrapped before the leverage vault deposit.
|
|
27
|
+
*/
|
|
28
|
+
asset: Address;
|
|
29
|
+
/**
|
|
30
|
+
* The token the vault borrows from the Sodax-forked AAVE pool against `asset` collateral.
|
|
31
|
+
* Always a Sodax vault-token wrapper (e.g. sodaETH), matching the asset side. Drives the
|
|
32
|
+
* leverage direction: the position is a long on the `asset` / `borrowToken` peg.
|
|
33
|
+
*/
|
|
34
|
+
borrowToken: Address;
|
|
35
|
+
/**
|
|
36
|
+
* LSD staking-APR source for the underlying asset. When present, callers can use
|
|
37
|
+
* `LeverageYieldService.getEffectiveApr(vault)` to combine AAVE rates with the LSD's
|
|
38
|
+
* native staking yield — the primary yield source for LSD-backed strategies. Omit for
|
|
39
|
+
* non-LSD vaults; the SDK then treats the LSD yield as 0%.
|
|
40
|
+
*/
|
|
41
|
+
lsdSource?: LeverageYieldLsdSource;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Off-chain LSD staking-APR source for a leverage-yield vault. The vault's underlying asset
|
|
45
|
+
* is an LSD (weETH, wstETH, …) that appreciates against its base asset (ETH) at the LSD's
|
|
46
|
+
* native staking rate — yield that does **not** appear in AAVE's `currentLiquidityRate` and
|
|
47
|
+
* that the SDK must therefore fetch off-chain to report an honest effective APR.
|
|
48
|
+
*
|
|
49
|
+
* The SDK fetches all LSD APRs from DefiLlama's per-pool endpoint
|
|
50
|
+
* (`https://yields.llama.fi/chart/<poolId>`) — one CORS-friendly source that already
|
|
51
|
+
* aggregates rates across LSD issuers, so no provider-specific dispatch is needed in the
|
|
52
|
+
* service. Pure data — no functions — so the registry stays serialisable.
|
|
53
|
+
*/
|
|
54
|
+
export type LeverageYieldLsdSource = {
|
|
55
|
+
/**
|
|
56
|
+
* DefiLlama pool ID (UUID) for the LSD's staking pool. Find via the bulk `/pools`
|
|
57
|
+
* endpoint, e.g. `data.filter(p => p.symbol === 'STETH' && p.project === 'lido')`.
|
|
58
|
+
* Examples:
|
|
59
|
+
* - Lido stETH: `747c1d2a-c668-4682-b9f9-296708a3dd90`
|
|
60
|
+
* - EtherFi weETH: `46bd2bdf-6d92-4066-b482-e885ee172264`
|
|
61
|
+
*/
|
|
62
|
+
poolId: string;
|
|
63
|
+
/**
|
|
64
|
+
* Hardcoded APR (percentage, e.g. `3.2` for 3.2%) used when the DefiLlama fetch errors.
|
|
65
|
+
* Should reflect the trailing 30-day yield from the issuer's dashboard; update via PR if
|
|
66
|
+
* it drifts >50 bp from reality.
|
|
67
|
+
*/
|
|
68
|
+
fallbackAprPct: number;
|
|
69
|
+
/** Human label for UI display, e.g. `'Lido (stETH)'` or `'EtherFi (weETH)'`. */
|
|
70
|
+
label: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* SDK-wide registry of known leverage vaults. Add an entry here when a vault is promoted
|
|
74
|
+
* to a default; callers can also override per-instance via the `Sodax({ leverageYield:
|
|
75
|
+
* { vaults: [...] } })` config slot.
|
|
76
|
+
*
|
|
77
|
+
* Addresses are sourced from the canonical token registries — the proxy/share-token address
|
|
78
|
+
* from {@link LsodaTokens} and the hub-side `asset` / `borrowToken` from {@link SodaTokens} —
|
|
79
|
+
* so a deployment-address change lives in exactly one place.
|
|
80
|
+
*/
|
|
81
|
+
export declare const leverageYieldVaults: readonly [{
|
|
82
|
+
readonly name: "lsodaWEETH";
|
|
83
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
84
|
+
readonly asset: "0xCb6B152D3a943f25157381aFcA7fEFCD2ef5a357";
|
|
85
|
+
readonly borrowToken: "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
86
|
+
readonly lsdSource: {
|
|
87
|
+
readonly poolId: "46bd2bdf-6d92-4066-b482-e885ee172264";
|
|
88
|
+
readonly fallbackAprPct: 3;
|
|
89
|
+
readonly label: "EtherFi (weETH)";
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "lsodaWSTETH";
|
|
93
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
94
|
+
readonly asset: "0x58b0538D7EEaeE69EF32f9F1dE5cbF32A10a977B";
|
|
95
|
+
readonly borrowToken: "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
96
|
+
readonly lsdSource: {
|
|
97
|
+
readonly poolId: "747c1d2a-c668-4682-b9f9-296708a3dd90";
|
|
98
|
+
readonly fallbackAprPct: 2.4;
|
|
99
|
+
readonly label: "Lido (stETH)";
|
|
100
|
+
};
|
|
101
|
+
}];
|
|
102
|
+
export type LeverageYieldConfig = {
|
|
103
|
+
vaults: readonly LeverageYieldVault[];
|
|
104
|
+
};
|
|
105
|
+
export declare const leverageYieldConfig: {
|
|
106
|
+
readonly vaults: readonly [{
|
|
107
|
+
readonly name: "lsodaWEETH";
|
|
108
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
109
|
+
readonly asset: "0xCb6B152D3a943f25157381aFcA7fEFCD2ef5a357";
|
|
110
|
+
readonly borrowToken: "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
111
|
+
readonly lsdSource: {
|
|
112
|
+
readonly poolId: "46bd2bdf-6d92-4066-b482-e885ee172264";
|
|
113
|
+
readonly fallbackAprPct: 3;
|
|
114
|
+
readonly label: "EtherFi (weETH)";
|
|
115
|
+
};
|
|
116
|
+
}, {
|
|
117
|
+
readonly name: "lsodaWSTETH";
|
|
118
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
119
|
+
readonly asset: "0x58b0538D7EEaeE69EF32f9F1dE5cbF32A10a977B";
|
|
120
|
+
readonly borrowToken: "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
121
|
+
readonly lsdSource: {
|
|
122
|
+
readonly poolId: "747c1d2a-c668-4682-b9f9-296708a3dd90";
|
|
123
|
+
readonly fallbackAprPct: 2.4;
|
|
124
|
+
readonly label: "Lido (stETH)";
|
|
125
|
+
};
|
|
126
|
+
}];
|
|
127
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LsodaTokens, SodaTokens } from '../chains/tokens.js';
|
|
2
|
+
/**
|
|
3
|
+
* SDK-wide registry of known leverage vaults. Add an entry here when a vault is promoted
|
|
4
|
+
* to a default; callers can also override per-instance via the `Sodax({ leverageYield:
|
|
5
|
+
* { vaults: [...] } })` config slot.
|
|
6
|
+
*
|
|
7
|
+
* Addresses are sourced from the canonical token registries — the proxy/share-token address
|
|
8
|
+
* from {@link LsodaTokens} and the hub-side `asset` / `borrowToken` from {@link SodaTokens} —
|
|
9
|
+
* so a deployment-address change lives in exactly one place.
|
|
10
|
+
*/
|
|
11
|
+
export const leverageYieldVaults = [
|
|
12
|
+
{
|
|
13
|
+
name: LsodaTokens.lsodaWEETH.symbol,
|
|
14
|
+
vault: LsodaTokens.lsodaWEETH.vault,
|
|
15
|
+
asset: SodaTokens.sodaWEETH.address, // sodaWEETH on Sonic
|
|
16
|
+
borrowToken: SodaTokens.sodaETH.address, // sodaETH on Sonic
|
|
17
|
+
lsdSource: {
|
|
18
|
+
// DefiLlama pool for EtherFi's weETH on Ethereum (project: 'ether.fi-stake').
|
|
19
|
+
poolId: '46bd2bdf-6d92-4066-b482-e885ee172264',
|
|
20
|
+
fallbackAprPct: 3.0,
|
|
21
|
+
label: 'EtherFi (weETH)',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: LsodaTokens.lsodaWSTETH.symbol,
|
|
26
|
+
vault: LsodaTokens.lsodaWSTETH.vault,
|
|
27
|
+
asset: SodaTokens.sodaWSTETH.address, // sodaWSTETH on Sonic
|
|
28
|
+
borrowToken: SodaTokens.sodaETH.address, // sodaETH on Sonic
|
|
29
|
+
lsdSource: {
|
|
30
|
+
// DefiLlama pool for Lido's stETH on Ethereum (wstETH inherits this rate via redeem).
|
|
31
|
+
poolId: '747c1d2a-c668-4682-b9f9-296708a3dd90',
|
|
32
|
+
fallbackAprPct: 2.4,
|
|
33
|
+
label: 'Lido (stETH)',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
export const leverageYieldConfig = {
|
|
38
|
+
vaults: leverageYieldVaults,
|
|
39
|
+
};
|
|
@@ -5,6 +5,7 @@ import { type ApiConfig, type SolverConfig, type RelayConfig } from '../common/c
|
|
|
5
5
|
import type { MoneyMarketConfig, PartnerFee } from '../common/common.js';
|
|
6
6
|
import { type DexConfig } from '../dex/dex.js';
|
|
7
7
|
import { type SwapsConfig } from '../swap/swap.js';
|
|
8
|
+
import { type LeverageYieldConfig } from '../leverageYield/leverageYield.js';
|
|
8
9
|
import { type HubConfig, type SpokeChainConfig, type SpokeChainKey } from '../chains/chains.js';
|
|
9
10
|
export type EvmSharedChainConfig = TxPollingConfig & {
|
|
10
11
|
rpcUrl: string;
|
|
@@ -39,6 +40,7 @@ export type SodaxConfig = {
|
|
|
39
40
|
moneyMarket: MoneyMarketConfig;
|
|
40
41
|
bridge: BridgeConfig;
|
|
41
42
|
dex: DexConfig;
|
|
43
|
+
leverageYield: LeverageYieldConfig;
|
|
42
44
|
hub: HubConfig;
|
|
43
45
|
api: ApiConfig;
|
|
44
46
|
solver: SolverConfig;
|
|
@@ -81,6 +83,24 @@ export declare const sodaxConfig: {
|
|
|
81
83
|
readonly nativeToken: "0x0000000000000000000000000000000000000000";
|
|
82
84
|
readonly bnUSD: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
83
85
|
readonly supportedTokens: {
|
|
86
|
+
readonly lsodaWEETH: {
|
|
87
|
+
readonly symbol: "lsodaWEETH";
|
|
88
|
+
readonly name: "Leveraged Soda weETH";
|
|
89
|
+
readonly decimals: 18;
|
|
90
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
91
|
+
readonly chainKey: "sonic";
|
|
92
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
93
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
94
|
+
};
|
|
95
|
+
readonly lsodaWSTETH: {
|
|
96
|
+
readonly symbol: "lsodaWSTETH";
|
|
97
|
+
readonly name: "Leveraged Soda wstETH";
|
|
98
|
+
readonly decimals: 18;
|
|
99
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
100
|
+
readonly chainKey: "sonic";
|
|
101
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
102
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
103
|
+
};
|
|
84
104
|
readonly sodaBNB: {
|
|
85
105
|
readonly symbol: "sodaBNB";
|
|
86
106
|
readonly name: "Soda BNB";
|
|
@@ -3045,6 +3065,22 @@ export declare const sodaxConfig: {
|
|
|
3045
3065
|
readonly chainKey: "sonic";
|
|
3046
3066
|
readonly hubAsset: "0x243b0c26c8b38793908d7C64e8510f21B19B4613";
|
|
3047
3067
|
readonly vault: "0x243b0c26c8b38793908d7C64e8510f21B19B4613";
|
|
3068
|
+
} | {
|
|
3069
|
+
readonly symbol: "lsodaWEETH";
|
|
3070
|
+
readonly name: "Leveraged Soda weETH";
|
|
3071
|
+
readonly decimals: 18;
|
|
3072
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
3073
|
+
readonly chainKey: "sonic";
|
|
3074
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
3075
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
3076
|
+
} | {
|
|
3077
|
+
readonly symbol: "lsodaWSTETH";
|
|
3078
|
+
readonly name: "Leveraged Soda wstETH";
|
|
3079
|
+
readonly decimals: 18;
|
|
3080
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
3081
|
+
readonly chainKey: "sonic";
|
|
3082
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
3083
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
3048
3084
|
})[]];
|
|
3049
3085
|
readonly "0xa86a.avax": [{
|
|
3050
3086
|
readonly symbol: "AVAX";
|
|
@@ -5954,6 +5990,29 @@ export declare const sodaxConfig: {
|
|
|
5954
5990
|
readonly '0x3e102c7d9b46c92abcd4c2e1c70f362b47a201a6': "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
5955
5991
|
};
|
|
5956
5992
|
};
|
|
5993
|
+
leverageYield: {
|
|
5994
|
+
readonly vaults: readonly [{
|
|
5995
|
+
readonly name: "lsodaWEETH";
|
|
5996
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
5997
|
+
readonly asset: "0xCb6B152D3a943f25157381aFcA7fEFCD2ef5a357";
|
|
5998
|
+
readonly borrowToken: "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
5999
|
+
readonly lsdSource: {
|
|
6000
|
+
readonly poolId: "46bd2bdf-6d92-4066-b482-e885ee172264";
|
|
6001
|
+
readonly fallbackAprPct: 3;
|
|
6002
|
+
readonly label: "EtherFi (weETH)";
|
|
6003
|
+
};
|
|
6004
|
+
}, {
|
|
6005
|
+
readonly name: "lsodaWSTETH";
|
|
6006
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
6007
|
+
readonly asset: "0x58b0538D7EEaeE69EF32f9F1dE5cbF32A10a977B";
|
|
6008
|
+
readonly borrowToken: "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
6009
|
+
readonly lsdSource: {
|
|
6010
|
+
readonly poolId: "747c1d2a-c668-4682-b9f9-296708a3dd90";
|
|
6011
|
+
readonly fallbackAprPct: 2.4;
|
|
6012
|
+
readonly label: "Lido (stETH)";
|
|
6013
|
+
};
|
|
6014
|
+
}];
|
|
6015
|
+
};
|
|
5957
6016
|
hub: {
|
|
5958
6017
|
readonly chain: {
|
|
5959
6018
|
readonly name: "Sonic";
|
|
@@ -5984,6 +6043,24 @@ export declare const sodaxConfig: {
|
|
|
5984
6043
|
readonly nativeToken: "0x0000000000000000000000000000000000000000";
|
|
5985
6044
|
readonly wrappedNativeToken: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38";
|
|
5986
6045
|
readonly supportedTokens: {
|
|
6046
|
+
readonly lsodaWEETH: {
|
|
6047
|
+
readonly symbol: "lsodaWEETH";
|
|
6048
|
+
readonly name: "Leveraged Soda weETH";
|
|
6049
|
+
readonly decimals: 18;
|
|
6050
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
6051
|
+
readonly chainKey: "sonic";
|
|
6052
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
6053
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
6054
|
+
};
|
|
6055
|
+
readonly lsodaWSTETH: {
|
|
6056
|
+
readonly symbol: "lsodaWSTETH";
|
|
6057
|
+
readonly name: "Leveraged Soda wstETH";
|
|
6058
|
+
readonly decimals: 18;
|
|
6059
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
6060
|
+
readonly chainKey: "sonic";
|
|
6061
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
6062
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
6063
|
+
};
|
|
5987
6064
|
readonly sodaBNB: {
|
|
5988
6065
|
readonly symbol: "sodaBNB";
|
|
5989
6066
|
readonly name: "Soda BNB";
|
|
@@ -2,6 +2,7 @@ import { apiConfig, solverConfig, relayConfig, } from '../common/constants.js';
|
|
|
2
2
|
import { moneyMarketConfig } from '../moneyMarket/moneyMarket.js';
|
|
3
3
|
import { dexConfig } from '../dex/dex.js';
|
|
4
4
|
import { swapsConfig } from '../swap/swap.js';
|
|
5
|
+
import { leverageYieldConfig } from '../leverageYield/leverageYield.js';
|
|
5
6
|
import { spokeChainConfig, hubConfig, } from '../chains/chains.js';
|
|
6
7
|
export const bridgeConfig = {
|
|
7
8
|
partnerFee: undefined,
|
|
@@ -14,6 +15,7 @@ export const sodaxConfig = {
|
|
|
14
15
|
moneyMarket: moneyMarketConfig,
|
|
15
16
|
bridge: bridgeConfig,
|
|
16
17
|
dex: dexConfig,
|
|
18
|
+
leverageYield: leverageYieldConfig,
|
|
17
19
|
hub: hubConfig,
|
|
18
20
|
api: apiConfig,
|
|
19
21
|
solver: solverConfig,
|
package/dist/sui/sui.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Hex } from '../shared/shared.js';
|
|
2
2
|
import type { ICoreWallet } from '../wallet/wallet.js';
|
|
3
3
|
export type SuiReturnType<Raw extends boolean> = Raw extends true ? SuiRawTransaction : Raw extends false ? string : SuiRawTransaction | string;
|
|
4
4
|
export type SuiRawTransaction = {
|
|
5
5
|
from: Hex;
|
|
6
6
|
to: string;
|
|
7
7
|
value: bigint;
|
|
8
|
-
|
|
8
|
+
/** The @mysten/sui Transaction JSON from `Transaction#serialize()`; reconstruct with `Transaction.from()`. */
|
|
9
|
+
data: string;
|
|
9
10
|
};
|
|
10
11
|
export type SuiTransaction = {
|
|
11
12
|
toJSON: () => Promise<string>;
|
package/dist/swap/swap.d.ts
CHANGED
|
@@ -250,6 +250,22 @@ export declare const swapSupportedTokens: {
|
|
|
250
250
|
readonly chainKey: "sonic";
|
|
251
251
|
readonly hubAsset: "0x243b0c26c8b38793908d7C64e8510f21B19B4613";
|
|
252
252
|
readonly vault: "0x243b0c26c8b38793908d7C64e8510f21B19B4613";
|
|
253
|
+
} | {
|
|
254
|
+
readonly symbol: "lsodaWEETH";
|
|
255
|
+
readonly name: "Leveraged Soda weETH";
|
|
256
|
+
readonly decimals: 18;
|
|
257
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
258
|
+
readonly chainKey: "sonic";
|
|
259
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
260
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
261
|
+
} | {
|
|
262
|
+
readonly symbol: "lsodaWSTETH";
|
|
263
|
+
readonly name: "Leveraged Soda wstETH";
|
|
264
|
+
readonly decimals: 18;
|
|
265
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
266
|
+
readonly chainKey: "sonic";
|
|
267
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
268
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
253
269
|
})[]];
|
|
254
270
|
readonly "0xa86a.avax": [{
|
|
255
271
|
readonly symbol: "AVAX";
|
|
@@ -2000,6 +2016,22 @@ export declare const swapsConfig: {
|
|
|
2000
2016
|
readonly chainKey: "sonic";
|
|
2001
2017
|
readonly hubAsset: "0x243b0c26c8b38793908d7C64e8510f21B19B4613";
|
|
2002
2018
|
readonly vault: "0x243b0c26c8b38793908d7C64e8510f21B19B4613";
|
|
2019
|
+
} | {
|
|
2020
|
+
readonly symbol: "lsodaWEETH";
|
|
2021
|
+
readonly name: "Leveraged Soda weETH";
|
|
2022
|
+
readonly decimals: 18;
|
|
2023
|
+
readonly address: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
2024
|
+
readonly chainKey: "sonic";
|
|
2025
|
+
readonly hubAsset: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
2026
|
+
readonly vault: "0xD09de2f5070699A909c0FD32fb5A909d3886701D";
|
|
2027
|
+
} | {
|
|
2028
|
+
readonly symbol: "lsodaWSTETH";
|
|
2029
|
+
readonly name: "Leveraged Soda wstETH";
|
|
2030
|
+
readonly decimals: 18;
|
|
2031
|
+
readonly address: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
2032
|
+
readonly chainKey: "sonic";
|
|
2033
|
+
readonly hubAsset: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
2034
|
+
readonly vault: "0x136E5D1CEC5db1829E24941Eddd9C8640E02Ce7a";
|
|
2003
2035
|
})[]];
|
|
2004
2036
|
readonly "0xa86a.avax": [{
|
|
2005
2037
|
readonly symbol: "AVAX";
|
package/dist/swap/swap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SodaTokens } from '../chains/tokens.js';
|
|
1
|
+
import { SodaTokens, LsodaTokens } from '../chains/tokens.js';
|
|
2
2
|
import { spokeChainConfig, ChainKeys } from '../chains/chains.js';
|
|
3
3
|
export const swapSupportedTokens = {
|
|
4
4
|
[ChainKeys.SONIC_MAINNET]: [
|
|
@@ -9,6 +9,7 @@ export const swapSupportedTokens = {
|
|
|
9
9
|
spokeChainConfig[ChainKeys.SONIC_MAINNET].supportedTokens.wS,
|
|
10
10
|
spokeChainConfig[ChainKeys.SONIC_MAINNET].supportedTokens.SODA,
|
|
11
11
|
...Object.values(SodaTokens),
|
|
12
|
+
...Object.values(LsodaTokens),
|
|
12
13
|
],
|
|
13
14
|
[ChainKeys.AVALANCHE_MAINNET]: [
|
|
14
15
|
spokeChainConfig[ChainKeys.AVALANCHE_MAINNET].supportedTokens.AVAX,
|
package/package.json
CHANGED