@paraswap/dex-lib 3.8.35 → 3.8.36-susds
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/build/abi/lite-psm/usdsPsm.json +163 -0
- package/build/abi/sdai/SavingsUSDS.abi.json +720 -0
- package/build/dex/lite-psm/config.js +5 -1
- package/build/dex/lite-psm/config.js.map +1 -1
- package/build/dex/lite-psm/lite-psm.d.ts +4 -2
- package/build/dex/lite-psm/lite-psm.js +39 -26
- package/build/dex/lite-psm/lite-psm.js.map +1 -1
- package/build/dex/lite-psm/types.d.ts +2 -2
- package/build/dex/spark/config.js +25 -0
- package/build/dex/spark/config.js.map +1 -1
- package/build/dex/spark/scripts/validate-state.js +1 -1
- package/build/dex/spark/scripts/validate-state.js.map +1 -1
- package/build/dex/spark/spark-sdai-pool.d.ts +4 -1
- package/build/dex/spark/spark-sdai-pool.js +6 -7
- package/build/dex/spark/spark-sdai-pool.js.map +1 -1
- package/build/dex/spark/spark.d.ts +3 -3
- package/build/dex/spark/spark.js +4 -4
- package/build/dex/spark/spark.js.map +1 -1
- package/build/dex/spark/types.d.ts +6 -0
- package/build/dex/spark/types.js.map +1 -1
- package/build/dex/spark/utils.d.ts +3 -1
- package/build/dex/spark/utils.js +43 -7
- package/build/dex/spark/utils.js.map +1 -1
- package/build/dex/usual-bond/usual-bond.js +5 -11
- package/build/dex/usual-bond/usual-bond.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/lite-psm/usdsPsm.json +163 -0
- package/src/abi/sdai/SavingsUSDS.abi.json +720 -0
- package/src/dex/lite-psm/config.ts +5 -1
- package/src/dex/lite-psm/lite-psm-e2e.test.ts +68 -1
- package/src/dex/lite-psm/lite-psm.ts +52 -31
- package/src/dex/lite-psm/types.ts +3 -2
- package/src/dex/spark/config.ts +24 -0
- package/src/dex/spark/scripts/validate-state.ts +1 -0
- package/src/dex/spark/spark-e2e.test.ts +28 -9
- package/src/dex/spark/spark-events.test.ts +77 -62
- package/src/dex/spark/spark-integration.test.ts +141 -7
- package/src/dex/spark/spark-sdai-pool.ts +10 -5
- package/src/dex/spark/spark.ts +6 -2
- package/src/dex/spark/types.ts +6 -0
- package/src/dex/spark/utils.ts +83 -19
- package/tests/constants-e2e.ts +6 -1
package/build/dex/spark/utils.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOnChainState = void 0;
|
|
3
|
+
exports.getOnChainStateUSDS = exports.getOnChainStateSDAI = exports.getOnChainState = void 0;
|
|
4
4
|
const abi_1 = require("@ethersproject/abi");
|
|
5
5
|
const coder = new abi_1.AbiCoder();
|
|
6
|
-
// - `dsr`: the Dai Savings Rate
|
|
6
|
+
// - `dsr` || `ssr`: the Dai Savings Rate or USDS savings rate
|
|
7
7
|
// - `chi`: the Rate Accumulator
|
|
8
8
|
// - `rho`: time of last drip
|
|
9
|
-
async function getOnChainState(multiContract, potAddress, potInterface, blockNumber) {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
async function getOnChainState(multiContract, potAddress, potInterface, savingsRateSymbol, blockNumber) {
|
|
10
|
+
if (savingsRateSymbol === 'dsr') {
|
|
11
|
+
return getOnChainStateSDAI(multiContract, potAddress, potInterface, blockNumber);
|
|
12
|
+
}
|
|
13
|
+
return getOnChainStateUSDS(multiContract, potAddress, potInterface, blockNumber);
|
|
14
|
+
}
|
|
15
|
+
exports.getOnChainState = getOnChainState;
|
|
16
|
+
async function getOnChainStateSDAI(multiContract, potAddress, potInterface, blockNumber) {
|
|
17
|
+
const calls = [
|
|
12
18
|
{
|
|
13
19
|
target: potAddress,
|
|
14
20
|
callData: potInterface.encodeFunctionData('dsr', []),
|
|
@@ -25,7 +31,9 @@ async function getOnChainState(multiContract, potAddress, potInterface, blockNum
|
|
|
25
31
|
target: potAddress,
|
|
26
32
|
callData: potInterface.encodeFunctionData('live', []),
|
|
27
33
|
},
|
|
28
|
-
]
|
|
34
|
+
];
|
|
35
|
+
const data = await multiContract.methods
|
|
36
|
+
.aggregate(calls)
|
|
29
37
|
.call({}, blockNumber);
|
|
30
38
|
const [dsr, chi, rho, live] = data.returnData.map(item => coder.decode(['uint256'], item)[0].toString());
|
|
31
39
|
return {
|
|
@@ -35,5 +43,33 @@ async function getOnChainState(multiContract, potAddress, potInterface, blockNum
|
|
|
35
43
|
rho,
|
|
36
44
|
};
|
|
37
45
|
}
|
|
38
|
-
exports.
|
|
46
|
+
exports.getOnChainStateSDAI = getOnChainStateSDAI;
|
|
47
|
+
async function getOnChainStateUSDS(multiContract, potAddress, potInterface, blockNumber) {
|
|
48
|
+
const calls = [
|
|
49
|
+
{
|
|
50
|
+
target: potAddress,
|
|
51
|
+
callData: potInterface.encodeFunctionData('ssr', []),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
target: potAddress,
|
|
55
|
+
callData: potInterface.encodeFunctionData('chi', []),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
target: potAddress,
|
|
59
|
+
callData: potInterface.encodeFunctionData('rho', []),
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
const data = await multiContract.methods
|
|
63
|
+
.aggregate(calls)
|
|
64
|
+
.call({}, blockNumber);
|
|
65
|
+
const [dsr, chi, rho] = data.returnData.map(item => coder.decode(['uint256'], item)[0].toString());
|
|
66
|
+
return {
|
|
67
|
+
// 'hack' - sUSDS doesn't have global shutdown and no notion of `live`, so it's always `live`
|
|
68
|
+
live: true,
|
|
69
|
+
dsr,
|
|
70
|
+
chi,
|
|
71
|
+
rho,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
exports.getOnChainStateUSDS = getOnChainStateUSDS;
|
|
39
75
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/dex/spark/utils.ts"],"names":[],"mappings":";;;AAEA,4CAAyD;AA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;KACJ,CAAC;AACJ,CAAC;AApCD,kDAoCC"}
|
|
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.UsualBond = void 0;
|
|
30
|
-
const constants_1 = require("../../constants");
|
|
31
30
|
const CALLDATA_GAS_COST = __importStar(require("../../calldata-gas-cost"));
|
|
32
31
|
const utils_1 = require("../../utils");
|
|
33
32
|
const simple_exchange_1 = require("../simple-exchange");
|
|
@@ -71,8 +70,6 @@ class UsualBond extends simple_exchange_1.SimpleExchange {
|
|
|
71
70
|
return null;
|
|
72
71
|
}
|
|
73
72
|
async getPoolIdentifiers(srcToken, destToken, side, blockNumber) {
|
|
74
|
-
if (side === constants_1.SwapSide.BUY)
|
|
75
|
-
return [];
|
|
76
73
|
if (!srcToken || !destToken) {
|
|
77
74
|
this.logger.error('Source or destination token is undefined');
|
|
78
75
|
return [];
|
|
@@ -89,13 +86,10 @@ class UsualBond extends simple_exchange_1.SimpleExchange {
|
|
|
89
86
|
return [];
|
|
90
87
|
}
|
|
91
88
|
async getPricesVolume(srcToken, destToken, amounts, side, blockNumber, limitPools) {
|
|
92
|
-
if (side === constants_1.SwapSide.BUY)
|
|
93
|
-
return null;
|
|
94
89
|
const isUSD0SwapToken = this.is_usd0_swap_token(srcToken.address, destToken.address);
|
|
95
90
|
if (!isUSD0SwapToken) {
|
|
96
91
|
return null;
|
|
97
92
|
}
|
|
98
|
-
const unitIn = bigint_constants_1.BI_POWS[18];
|
|
99
93
|
const unitOut = bigint_constants_1.BI_POWS[18]; // 1:1 swap
|
|
100
94
|
const amountsOut = amounts; // 1:1 swap, so output amounts are the same as input
|
|
101
95
|
return [
|
|
@@ -122,8 +116,6 @@ class UsualBond extends simple_exchange_1.SimpleExchange {
|
|
|
122
116
|
};
|
|
123
117
|
}
|
|
124
118
|
async getDexParam(srcToken, destToken, srcAmount, destAmount, recipient, data, side) {
|
|
125
|
-
if (side === constants_1.SwapSide.BUY)
|
|
126
|
-
throw new Error('BUY not supported');
|
|
127
119
|
if (this.is_usd0(srcToken) && this.is_usd0pp(destToken)) {
|
|
128
120
|
const exchangeData = this.usd0ppIface.encodeFunctionData('mint', [
|
|
129
121
|
srcAmount,
|
|
@@ -134,13 +126,13 @@ class UsualBond extends simple_exchange_1.SimpleExchange {
|
|
|
134
126
|
exchangeData,
|
|
135
127
|
targetExchange: this.config.usd0ppAddress,
|
|
136
128
|
returnAmountPos: undefined,
|
|
137
|
-
spender: this.config.usd0ppAddress, // Add this if it's the same as targetExchange
|
|
138
129
|
};
|
|
139
130
|
}
|
|
140
131
|
throw new Error('LOGIC ERROR');
|
|
141
132
|
}
|
|
142
133
|
async getTopPoolsForToken(tokenAddress, limit) {
|
|
143
|
-
|
|
134
|
+
const isUsd0 = this.is_usd0(tokenAddress);
|
|
135
|
+
if (!isUsd0 && !this.is_usd0pp(tokenAddress))
|
|
144
136
|
return [];
|
|
145
137
|
return [
|
|
146
138
|
{
|
|
@@ -149,7 +141,9 @@ class UsualBond extends simple_exchange_1.SimpleExchange {
|
|
|
149
141
|
connectorTokens: [
|
|
150
142
|
{
|
|
151
143
|
decimals: 18,
|
|
152
|
-
address:
|
|
144
|
+
address: isUsd0
|
|
145
|
+
? this.config.usd0ppAddress
|
|
146
|
+
: this.config.usd0Address,
|
|
153
147
|
},
|
|
154
148
|
],
|
|
155
149
|
liquidityUSD: 1000000000, // Just returning a big number so this DEX will be preferred
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usual-bond.js","sourceRoot":"","sources":["../../../src/dex/usual-bond/usual-bond.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"usual-bond.js","sourceRoot":"","sources":["../../../src/dex/usual-bond/usual-bond.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,2EAA6D;AAC7D,uC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,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;YAAE,OAAO,EAAE,CAAC;QAExD,OAAO;YACL;gBACE,QAAQ,EAAE,IAAI,CAAC,MAAM;gBACrB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;gBAClC,eAAe,EAAE;oBACf;wBACE,QAAQ,EAAE,EAAE;wBACZ,OAAO,EAAE,MAAM;4BACb,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa;4BAC3B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW;qBAC5B;iBACF;gBACD,YAAY,EAAE,UAAU,EAAE,4DAA4D;aACvF;SACF,CAAC;IACJ,CAAC;;AAnLH,8BAoLC;AA7Ke,4BAAkB,GAC9B,IAAA,6BAAqB,EAAC,wBAAe,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{ "internalType": "address", "name": "psm_", "type": "address" },
|
|
5
|
+
{ "internalType": "address", "name": "usdsJoin_", "type": "address" }
|
|
6
|
+
],
|
|
7
|
+
"stateMutability": "nonpayable",
|
|
8
|
+
"type": "constructor"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"inputs": [],
|
|
12
|
+
"name": "HALTED",
|
|
13
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
14
|
+
"stateMutability": "view",
|
|
15
|
+
"type": "function"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"inputs": [],
|
|
19
|
+
"name": "buf",
|
|
20
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
21
|
+
"stateMutability": "view",
|
|
22
|
+
"type": "function"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"inputs": [
|
|
26
|
+
{ "internalType": "address", "name": "usr", "type": "address" },
|
|
27
|
+
{ "internalType": "uint256", "name": "gemAmt", "type": "uint256" }
|
|
28
|
+
],
|
|
29
|
+
"name": "buyGem",
|
|
30
|
+
"outputs": [
|
|
31
|
+
{ "internalType": "uint256", "name": "usdsInWad", "type": "uint256" }
|
|
32
|
+
],
|
|
33
|
+
"stateMutability": "nonpayable",
|
|
34
|
+
"type": "function"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"inputs": [],
|
|
38
|
+
"name": "dai",
|
|
39
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
40
|
+
"stateMutability": "view",
|
|
41
|
+
"type": "function"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"inputs": [],
|
|
45
|
+
"name": "dec",
|
|
46
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
47
|
+
"stateMutability": "view",
|
|
48
|
+
"type": "function"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"inputs": [],
|
|
52
|
+
"name": "gem",
|
|
53
|
+
"outputs": [
|
|
54
|
+
{ "internalType": "contract GemLike", "name": "", "type": "address" }
|
|
55
|
+
],
|
|
56
|
+
"stateMutability": "view",
|
|
57
|
+
"type": "function"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"inputs": [],
|
|
61
|
+
"name": "gemJoin",
|
|
62
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
63
|
+
"stateMutability": "view",
|
|
64
|
+
"type": "function"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"inputs": [],
|
|
68
|
+
"name": "ilk",
|
|
69
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
|
70
|
+
"stateMutability": "view",
|
|
71
|
+
"type": "function"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"inputs": [],
|
|
75
|
+
"name": "live",
|
|
76
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
77
|
+
"stateMutability": "view",
|
|
78
|
+
"type": "function"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"inputs": [],
|
|
82
|
+
"name": "pocket",
|
|
83
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
84
|
+
"stateMutability": "view",
|
|
85
|
+
"type": "function"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"inputs": [],
|
|
89
|
+
"name": "psm",
|
|
90
|
+
"outputs": [
|
|
91
|
+
{ "internalType": "contract PsmLike", "name": "", "type": "address" }
|
|
92
|
+
],
|
|
93
|
+
"stateMutability": "view",
|
|
94
|
+
"type": "function"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"inputs": [
|
|
98
|
+
{ "internalType": "address", "name": "usr", "type": "address" },
|
|
99
|
+
{ "internalType": "uint256", "name": "gemAmt", "type": "uint256" }
|
|
100
|
+
],
|
|
101
|
+
"name": "sellGem",
|
|
102
|
+
"outputs": [
|
|
103
|
+
{ "internalType": "uint256", "name": "usdsOutWad", "type": "uint256" }
|
|
104
|
+
],
|
|
105
|
+
"stateMutability": "nonpayable",
|
|
106
|
+
"type": "function"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"inputs": [],
|
|
110
|
+
"name": "tin",
|
|
111
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
112
|
+
"stateMutability": "view",
|
|
113
|
+
"type": "function"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"inputs": [],
|
|
117
|
+
"name": "to18ConversionFactor",
|
|
118
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
119
|
+
"stateMutability": "view",
|
|
120
|
+
"type": "function"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"inputs": [],
|
|
124
|
+
"name": "tout",
|
|
125
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
126
|
+
"stateMutability": "view",
|
|
127
|
+
"type": "function"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"inputs": [],
|
|
131
|
+
"name": "usds",
|
|
132
|
+
"outputs": [
|
|
133
|
+
{ "internalType": "contract GemLike", "name": "", "type": "address" }
|
|
134
|
+
],
|
|
135
|
+
"stateMutability": "view",
|
|
136
|
+
"type": "function"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"inputs": [],
|
|
140
|
+
"name": "usdsJoin",
|
|
141
|
+
"outputs": [
|
|
142
|
+
{ "internalType": "contract UsdsJoinLike", "name": "", "type": "address" }
|
|
143
|
+
],
|
|
144
|
+
"stateMutability": "view",
|
|
145
|
+
"type": "function"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"inputs": [],
|
|
149
|
+
"name": "vat",
|
|
150
|
+
"outputs": [
|
|
151
|
+
{ "internalType": "contract VatLike", "name": "", "type": "address" }
|
|
152
|
+
],
|
|
153
|
+
"stateMutability": "view",
|
|
154
|
+
"type": "function"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"inputs": [],
|
|
158
|
+
"name": "vow",
|
|
159
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
160
|
+
"stateMutability": "view",
|
|
161
|
+
"type": "function"
|
|
162
|
+
}
|
|
163
|
+
]
|