tx · 5VxCdrkmizEmZUs9VPXcDnfaeVj7jPf3ZcvSPgETpoGB 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi: -0.02300000 Waves 2023.01.07 11:32 [2394296] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves
{ "type": 13, "id": "5VxCdrkmizEmZUs9VPXcDnfaeVj7jPf3ZcvSPgETpoGB", "fee": 2300000, "feeAssetId": null, "timestamp": 1673080372862, "version": 2, "chainId": 84, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "3CrJQdhxhkhNUmHHmqBxtYDE5G2deFGxF8vRbPU2S8CMjuUeJhqwN3QgwR3pcGQwo8Fg5D16uUBj26C4XeLhMT8B", "5gBn8cDPMy9V6YXwgbtDYoazMedHSzVzSZGbzefZJpDCu87vze8HLdQzh8z61gmZxTtVMNF4bVrYLcqZc6kQyAzA", "2jabnE16fazZXWaKVLnq61xf5qAgfqSLfsiJC8jAPv9q2FYV6HQPS16rmt3c9SRSx79DD6U6DXXxGuWhS356SZ6t" ], "script": "base64:AAIFAAAAAAAAADkIAhIFCgMICAESAwoBARIHCgUBAQEBARIDCgEBEgQKAgECEgMKAQESABIFCgMBAQESBwoFAQEBAQEAAABtAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAB1NDQUxFMTYAAAAAAAAAABAAAAAAA1NFUAIAAAACX18AAAAABUhBTEY4AAAAAAAC+vCAAAAAAAhFVUxFUlgxNgkAATYAAAABAABgkqET2NV0AAAAAARUV09YCQABNgAAAAEAAAAAAAAAAAIAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9eEAA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ABOJo=", "height": 2394296, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7aYrCD9kXqDKtmZqZEE3x51z4b8ScfMzfZBL3kRQXi6s Next: AJntcx3jaN6xUZFbDEvfFphUpr8eW19ng4Xf7KJenV1F Diff:
Old | New | Differences | |
---|---|---|---|
67 | 67 | ||
68 | 68 | let nMetricIdxSurfSupply = 11 | |
69 | 69 | ||
70 | + | let nMetricUsdnUsdtPeg = 12 | |
71 | + | ||
72 | + | let nMetricCurrentPriceAdj = 13 | |
73 | + | ||
70 | 74 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
71 | 75 | ||
72 | 76 | ||
80 | 84 | ||
81 | 85 | ||
82 | 86 | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
87 | + | ||
88 | + | ||
89 | + | func keyPriceAdjMinCoeff () = "%s%s__priceAdj__minCoefficient" | |
90 | + | ||
91 | + | ||
92 | + | func keyPriceAdjArbRegulator () = "%s%s__priceAdj__arbRegulator" | |
83 | 93 | ||
84 | 94 | ||
85 | 95 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
165 | 175 | } | |
166 | 176 | ||
167 | 177 | ||
178 | + | func asPriceSTRUCT (v) = match v { | |
179 | + | case struct: (Int, Int, Int, Int) => | |
180 | + | struct | |
181 | + | case _ => | |
182 | + | throw("fail to cast into PriceSTRUCT") | |
183 | + | } | |
184 | + | ||
185 | + | ||
168 | 186 | let IdxControlCfgNeutrinoDapp = 1 | |
169 | 187 | ||
170 | 188 | let IdxControlCfgAuctionDapp = 2 | |
182 | 200 | let IdxControlCfgNsbtStakingDapp = 8 | |
183 | 201 | ||
184 | 202 | let IdxControlCfgMediatorDapp = 9 | |
203 | + | ||
204 | + | let IdxControlCfgSurfStakingDapp = 10 | |
205 | + | ||
206 | + | let IdxControlCfgGnsbtControllerDapp = 11 | |
207 | + | ||
208 | + | let IdxControlCfgRestV2Dapp = 12 | |
209 | + | ||
210 | + | let IdxControlCfgGovernanceDapp = 13 | |
211 | + | ||
212 | + | let IdxControlCfgPegProviderDapp = 14 | |
185 | 213 | ||
186 | 214 | func keyControlAddress () = "%s%s__config__controlAddress" | |
187 | 215 | ||
207 | 235 | ||
208 | 236 | let usdnStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp) | |
209 | 237 | ||
238 | + | let pegProviderContract = getContractAddressOrFail(controlCfg, IdxControlCfgPegProviderDapp) | |
239 | + | ||
210 | 240 | let neutrinoAssetIdStr = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
211 | 241 | ||
212 | 242 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdStr) | |
231 | 261 | ||
232 | 262 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
233 | 263 | then $a | |
234 | - | else throw("List size exceeds | |
264 | + | else throw("List size exceeds 7") | |
235 | 265 | ||
236 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
266 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
237 | 267 | } | |
238 | 268 | } | |
239 | 269 | ||
240 | 270 | ||
271 | + | func readCurrentAvgPeg () = asPriceSTRUCT(invoke(pegProviderContract, "price", [4], nil))._2 | |
272 | + | ||
273 | + | ||
274 | + | func adjustPrice (priceX6,usdnUsdtPegX6) = { | |
275 | + | let minCoeffX6 = valueOrElse(getInteger(this, keyPriceAdjMinCoeff()), 600000) | |
276 | + | let arbRegulatorX6 = valueOrElse(getInteger(this, keyPriceAdjArbRegulator()), 150000) | |
277 | + | let maxPriceCoeffX6 = max([minCoeffX6, fraction((MULT6 + arbRegulatorX6), usdnUsdtPegX6, MULT6)]) | |
278 | + | let priceCoeffX6 = min([maxPriceCoeffX6, MULT6]) | |
279 | + | fraction(priceX6, MULT6, priceCoeffX6) | |
280 | + | } | |
281 | + | ||
282 | + | ||
241 | 283 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
284 | + | ||
285 | + | let usdnUsdtPegX6 = readCurrentAvgPeg() | |
286 | + | ||
287 | + | let currentPriceAdj = adjustPrice(currentPrice, usdnUsdtPegX6) | |
242 | 288 | ||
243 | 289 | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
244 | 290 | ||
391 | 437 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
392 | 438 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
393 | 439 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
394 | - | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply]) | |
440 | + | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply, usdnUsdtPegX6, currentPriceAdj]) | |
395 | 441 | } | |
396 | 442 | ||
397 | 443 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let revisionNum = "" | |
5 | 5 | ||
6 | 6 | let MULTSCALE = 8 | |
7 | 7 | ||
8 | 8 | let SCALE16 = 16 | |
9 | 9 | ||
10 | 10 | let SEP = "__" | |
11 | 11 | ||
12 | 12 | let HALF8 = 50000000 | |
13 | 13 | ||
14 | 14 | let EULERX16 = toBigInt(27182818284590452) | |
15 | 15 | ||
16 | 16 | let TWOX = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let MULT6 = 1000000 | |
19 | 19 | ||
20 | 20 | let MULTX6 = toBigInt(1000000) | |
21 | 21 | ||
22 | 22 | let MULT8 = 100000000 | |
23 | 23 | ||
24 | 24 | let MULTX8 = toBigInt(100000000) | |
25 | 25 | ||
26 | 26 | let MULTX10 = toBigInt(10000000000) | |
27 | 27 | ||
28 | 28 | let MULTX16 = toBigInt(10000000000000000) | |
29 | 29 | ||
30 | 30 | let WAVESID = fromBase58String("WAVES") | |
31 | 31 | ||
32 | 32 | let kResultIdxA = 0 | |
33 | 33 | ||
34 | 34 | let kResultIdxPaulB = 1 | |
35 | 35 | ||
36 | 36 | let kResultIdxWReservesInUsdn = 2 | |
37 | 37 | ||
38 | 38 | let kResultIdxMultBR = 3 | |
39 | 39 | ||
40 | 40 | let kResultIdxMultPower = 4 | |
41 | 41 | ||
42 | 42 | let kResultIdxMultExpInPowerStr = 5 | |
43 | 43 | ||
44 | 44 | let kResultIdxMultKStr = 6 | |
45 | 45 | ||
46 | 46 | let nMetricIdxPrice = 0 | |
47 | 47 | ||
48 | 48 | let nMetricIdxUsdnLockedBalance = 1 | |
49 | 49 | ||
50 | 50 | let nMetricIdxWavesLockedBalance = 2 | |
51 | 51 | ||
52 | 52 | let nMetricIdxReserve = 3 | |
53 | 53 | ||
54 | 54 | let nMetricIdxReserveInUsdn = 4 | |
55 | 55 | ||
56 | 56 | let nMetricIdxUsdnSupply = 5 | |
57 | 57 | ||
58 | 58 | let nMetricIdxSurplus = 6 | |
59 | 59 | ||
60 | 60 | let nMetricIdxSurplusPercent = 7 | |
61 | 61 | ||
62 | 62 | let nMetricIdxBR = 8 | |
63 | 63 | ||
64 | 64 | let nMetricIdxNsbtSupply = 9 | |
65 | 65 | ||
66 | 66 | let nMetricIdxMaxNsbtSupply = 10 | |
67 | 67 | ||
68 | 68 | let nMetricIdxSurfSupply = 11 | |
69 | 69 | ||
70 | + | let nMetricUsdnUsdtPeg = 12 | |
71 | + | ||
72 | + | let nMetricCurrentPriceAdj = 13 | |
73 | + | ||
70 | 74 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
71 | 75 | ||
72 | 76 | ||
73 | 77 | func keySwapAmountAParam () = "%s%s__config__swapAParam" | |
74 | 78 | ||
75 | 79 | ||
76 | 80 | func keySwapAmountBParam () = "%s%s__config__swapBParam" | |
77 | 81 | ||
78 | 82 | ||
79 | 83 | func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam" | |
80 | 84 | ||
81 | 85 | ||
82 | 86 | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
87 | + | ||
88 | + | ||
89 | + | func keyPriceAdjMinCoeff () = "%s%s__priceAdj__minCoefficient" | |
90 | + | ||
91 | + | ||
92 | + | func keyPriceAdjArbRegulator () = "%s%s__priceAdj__arbRegulator" | |
83 | 93 | ||
84 | 94 | ||
85 | 95 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
86 | 96 | ||
87 | 97 | ||
88 | 98 | func keyNsbtAssetId () = "bond_asset_id" | |
89 | 99 | ||
90 | 100 | ||
91 | 101 | func keySurfAssetId () = "surf_asset_id" | |
92 | 102 | ||
93 | 103 | ||
94 | 104 | func keyBalanceLocked () = "balance_lock_" | |
95 | 105 | ||
96 | 106 | ||
97 | 107 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
98 | 108 | ||
99 | 109 | ||
100 | 110 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
101 | 111 | ||
102 | 112 | ||
103 | 113 | func swapsTimeframeKEY () = "swaps_timeframe" | |
104 | 114 | ||
105 | 115 | ||
106 | 116 | func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP) | |
107 | 117 | ||
108 | 118 | ||
109 | 119 | func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP) | |
110 | 120 | ||
111 | 121 | ||
112 | 122 | func keyPrice () = "price" | |
113 | 123 | ||
114 | 124 | ||
115 | 125 | let RpdBalanceKey = "rpd_balance" | |
116 | 126 | ||
117 | 127 | func rpdUserBalanceKey (owner,assetId) = makeString([RpdBalanceKey, assetId, owner], "_") | |
118 | 128 | ||
119 | 129 | ||
120 | 130 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
121 | 131 | ||
122 | 132 | ||
123 | 133 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
124 | 134 | ||
125 | 135 | ||
126 | 136 | func getNumberByKey (address,key) = valueOrElse(getInteger(address, key), 0) | |
127 | 137 | ||
128 | 138 | ||
129 | 139 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
130 | 140 | ||
131 | 141 | ||
132 | 142 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
133 | 143 | ||
134 | 144 | ||
135 | 145 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
136 | 146 | ||
137 | 147 | ||
138 | 148 | func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult)) | |
139 | 149 | ||
140 | 150 | ||
141 | 151 | func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16)) | |
142 | 152 | ||
143 | 153 | ||
144 | 154 | func asAnyList (val) = match val { | |
145 | 155 | case valAnyLyst: List[Any] => | |
146 | 156 | valAnyLyst | |
147 | 157 | case _ => | |
148 | 158 | throw("fail to cast into List[Any]") | |
149 | 159 | } | |
150 | 160 | ||
151 | 161 | ||
152 | 162 | func asInt (val) = match val { | |
153 | 163 | case valInt: Int => | |
154 | 164 | valInt | |
155 | 165 | case _ => | |
156 | 166 | throw("fail to cast into Int") | |
157 | 167 | } | |
158 | 168 | ||
159 | 169 | ||
160 | 170 | func asString (val) = match val { | |
161 | 171 | case valStr: String => | |
162 | 172 | valStr | |
163 | 173 | case _ => | |
164 | 174 | throw("fail to cast into String") | |
165 | 175 | } | |
166 | 176 | ||
167 | 177 | ||
178 | + | func asPriceSTRUCT (v) = match v { | |
179 | + | case struct: (Int, Int, Int, Int) => | |
180 | + | struct | |
181 | + | case _ => | |
182 | + | throw("fail to cast into PriceSTRUCT") | |
183 | + | } | |
184 | + | ||
185 | + | ||
168 | 186 | let IdxControlCfgNeutrinoDapp = 1 | |
169 | 187 | ||
170 | 188 | let IdxControlCfgAuctionDapp = 2 | |
171 | 189 | ||
172 | 190 | let IdxControlCfgRpdDapp = 3 | |
173 | 191 | ||
174 | 192 | let IdxControlCfgMathDapp = 4 | |
175 | 193 | ||
176 | 194 | let IdxControlCfgLiquidationDapp = 5 | |
177 | 195 | ||
178 | 196 | let IdxControlCfgRestDapp = 6 | |
179 | 197 | ||
180 | 198 | let IdxControlCfgNodeRegistryDapp = 7 | |
181 | 199 | ||
182 | 200 | let IdxControlCfgNsbtStakingDapp = 8 | |
183 | 201 | ||
184 | 202 | let IdxControlCfgMediatorDapp = 9 | |
203 | + | ||
204 | + | let IdxControlCfgSurfStakingDapp = 10 | |
205 | + | ||
206 | + | let IdxControlCfgGnsbtControllerDapp = 11 | |
207 | + | ||
208 | + | let IdxControlCfgRestV2Dapp = 12 | |
209 | + | ||
210 | + | let IdxControlCfgGovernanceDapp = 13 | |
211 | + | ||
212 | + | let IdxControlCfgPegProviderDapp = 14 | |
185 | 213 | ||
186 | 214 | func keyControlAddress () = "%s%s__config__controlAddress" | |
187 | 215 | ||
188 | 216 | ||
189 | 217 | func keyControlCfg () = "%s__controlConfig" | |
190 | 218 | ||
191 | 219 | ||
192 | 220 | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
193 | 221 | ||
194 | 222 | ||
195 | 223 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
196 | 224 | ||
197 | 225 | ||
198 | 226 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
199 | 227 | ||
200 | 228 | let controlCfg = readControlCfgOrFail(controlContract) | |
201 | 229 | ||
202 | 230 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
203 | 231 | ||
204 | 232 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
205 | 233 | ||
206 | 234 | let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp) | |
207 | 235 | ||
208 | 236 | let usdnStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp) | |
209 | 237 | ||
238 | + | let pegProviderContract = getContractAddressOrFail(controlCfg, IdxControlCfgPegProviderDapp) | |
239 | + | ||
210 | 240 | let neutrinoAssetIdStr = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
211 | 241 | ||
212 | 242 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdStr) | |
213 | 243 | ||
214 | 244 | let nsbtAssetId = fromBase58String(getStringValue(neutrinoContract, keyNsbtAssetId())) | |
215 | 245 | ||
216 | 246 | let surfAssetId = fromBase58String(getStringValue(auctionContract, keySurfAssetId())) | |
217 | 247 | ||
218 | 248 | func calcUsdnOutOfMarketSupply () = { | |
219 | 249 | let outOfMarketAddressList = valueOrElse(getString(controlContract, "%s%s__control__outOfMarketAddressList"), "") | |
220 | 250 | if ((outOfMarketAddressList == "")) | |
221 | 251 | then 0 | |
222 | 252 | else { | |
223 | 253 | func balancesSUM (outOfMarketSupply,nextAddress) = ((outOfMarketSupply + valueOrElse(getInteger(usdnStakingContract, rpdUserBalanceKey(nextAddress, neutrinoAssetIdStr)), 0)) + assetBalance(addressFromStringValue(nextAddress), neutrinoAssetId)) | |
224 | 254 | ||
225 | 255 | let $l = split(outOfMarketAddressList, SEP) | |
226 | 256 | let $s = size($l) | |
227 | 257 | let $acc0 = 0 | |
228 | 258 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
229 | 259 | then $a | |
230 | 260 | else balancesSUM($a, $l[$i]) | |
231 | 261 | ||
232 | 262 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
233 | 263 | then $a | |
234 | - | else throw("List size exceeds | |
264 | + | else throw("List size exceeds 7") | |
235 | 265 | ||
236 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
266 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
237 | 267 | } | |
238 | 268 | } | |
239 | 269 | ||
240 | 270 | ||
271 | + | func readCurrentAvgPeg () = asPriceSTRUCT(invoke(pegProviderContract, "price", [4], nil))._2 | |
272 | + | ||
273 | + | ||
274 | + | func adjustPrice (priceX6,usdnUsdtPegX6) = { | |
275 | + | let minCoeffX6 = valueOrElse(getInteger(this, keyPriceAdjMinCoeff()), 600000) | |
276 | + | let arbRegulatorX6 = valueOrElse(getInteger(this, keyPriceAdjArbRegulator()), 150000) | |
277 | + | let maxPriceCoeffX6 = max([minCoeffX6, fraction((MULT6 + arbRegulatorX6), usdnUsdtPegX6, MULT6)]) | |
278 | + | let priceCoeffX6 = min([maxPriceCoeffX6, MULT6]) | |
279 | + | fraction(priceX6, MULT6, priceCoeffX6) | |
280 | + | } | |
281 | + | ||
282 | + | ||
241 | 283 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
284 | + | ||
285 | + | let usdnUsdtPegX6 = readCurrentAvgPeg() | |
286 | + | ||
287 | + | let currentPriceAdj = adjustPrice(currentPrice, usdnUsdtPegX6) | |
242 | 288 | ||
243 | 289 | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
244 | 290 | ||
245 | 291 | let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0) | |
246 | 292 | ||
247 | 293 | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
248 | 294 | ||
249 | 295 | let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice) | |
250 | 296 | ||
251 | 297 | let neutrinoOutOfMarketSupply = calcUsdnOutOfMarketSupply() | |
252 | 298 | ||
253 | 299 | let neutrinoTotalSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
254 | 300 | ||
255 | 301 | let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply) | |
256 | 302 | ||
257 | 303 | let BR = if ((neutrinoSupply == 0)) | |
258 | 304 | then 0 | |
259 | 305 | else fraction(reservesInUsdn, MULT6, neutrinoSupply) | |
260 | 306 | ||
261 | 307 | @Callable(i) | |
262 | 308 | func constructor (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this)) | |
263 | 309 | then throw("not authorized") | |
264 | 310 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)] | |
265 | 311 | ||
266 | 312 | ||
267 | 313 | ||
268 | 314 | @Callable(i) | |
269 | 315 | func calcSwapLimitREADONLY (gNsbtAmount) = { | |
270 | 316 | let limitWavesInUsdn = if ((0 >= gNsbtAmount)) | |
271 | 317 | then 0 | |
272 | 318 | else { | |
273 | 319 | let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam())) | |
274 | 320 | let bParamX16 = toBigInt(getIntOrFail(this, keySwapAmountBParam())) | |
275 | 321 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
276 | 322 | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
277 | 323 | } | |
278 | 324 | let limitWaves = convertNeutrinoToWaves(limitWavesInUsdn, currentPrice) | |
279 | 325 | let limitUsdn = if ((0 >= gNsbtAmount)) | |
280 | 326 | then 0 | |
281 | 327 | else { | |
282 | 328 | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
283 | 329 | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
284 | 330 | let brX6 = toBigInt(BR) | |
285 | 331 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
286 | 332 | toInt(fraction(fraction(aParamX8, powPartX8, MULTX10), brX6, MULTX6)) | |
287 | 333 | } | |
288 | 334 | $Tuple2(nil, [limitWavesInUsdn, limitWaves, limitUsdn]) | |
289 | 335 | } | |
290 | 336 | ||
291 | 337 | ||
292 | 338 | ||
293 | 339 | @Callable(i) | |
294 | 340 | func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = { | |
295 | 341 | let EXP = toBigInt(2718281) | |
296 | 342 | let EXPSCALE = 6 | |
297 | 343 | let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3) | |
298 | 344 | let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10)) | |
299 | 345 | let wReservesInUsdn = convertWavesToNeutrino(wRaw, price) | |
300 | 346 | let multBR = fraction(wReservesInUsdn, MULT8, uRaw) | |
301 | 347 | if ((multBR > 10678564816)) | |
302 | 348 | then throw((("BR=" + toString(multBR)) + " > 10678.564816% will overflow exponent")) | |
303 | 349 | else { | |
304 | 350 | let multPower = (a * (multBR - MULT8)) | |
305 | 351 | let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN) | |
306 | 352 | let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6) | |
307 | 353 | $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)]) | |
308 | 354 | } | |
309 | 355 | } | |
310 | 356 | ||
311 | 357 | ||
312 | 358 | ||
313 | 359 | @Callable(i) | |
314 | 360 | func curveFunctionREADONLY (wavesPayRaw) = { | |
315 | 361 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
316 | 362 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
317 | 363 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
318 | 364 | let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
319 | 365 | let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
320 | 366 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
321 | 367 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
322 | 368 | let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
323 | 369 | let usdnPay = convertWavesToNeutrino(wavesPayRaw, price) | |
324 | 370 | let bigMaxNsbtSupply = toBigInt(mRaw) | |
325 | 371 | let bigNsbtSupply = toBigInt((mRaw - sRaw)) | |
326 | 372 | let step1 = fraction(toBigInt(usdnPay), MULTX16, multK) | |
327 | 373 | let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply) | |
328 | 374 | let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply))) | |
329 | 375 | let nsbtAmountRaw = ((mRaw - sRaw) - step3) | |
330 | 376 | $Tuple2(nil, [nsbtAmountRaw, usdnPay, wRaw, uRaw, mRaw, sRaw, asInt(kCalcArray[kResultIdxA]), asInt(kCalcArray[kResultIdxPaulB]), asInt(kCalcArray[kResultIdxWReservesInUsdn]), price, asInt(kCalcArray[kResultIdxMultBR]), asInt(kCalcArray[kResultIdxMultPower]), kCalcArray[kResultIdxMultExpInPowerStr], kCalcArray[kResultIdxMultKStr], toString(step1), toString(step2), step3]) | |
331 | 377 | } | |
332 | 378 | ||
333 | 379 | ||
334 | 380 | ||
335 | 381 | @Callable(i) | |
336 | 382 | func surfFunctionREADONLY (amount,assetId) = if ((0 > amount)) | |
337 | 383 | then throw("amount should be positive") | |
338 | 384 | else { | |
339 | 385 | let price = currentPrice | |
340 | 386 | let priceBig = toBigInt(price) | |
341 | 387 | let reserveBig = toBigInt(reserve) | |
342 | 388 | let supply = neutrinoSupply | |
343 | 389 | let supplyBig = toBigInt(supply) | |
344 | 390 | if ((BR >= MULT6)) | |
345 | 391 | then throw((("BR = " + toString(BR)) + ", cannot buy SURF")) | |
346 | 392 | else { | |
347 | 393 | let maxWavesPay = (fraction(supply, MULT8, price) - reserve) | |
348 | 394 | let maxUsdnPay = (supply - fraction(reserve, price, MULT8)) | |
349 | 395 | let useAmount = if ((assetId == neutrinoAssetId)) | |
350 | 396 | then if ((amount > maxUsdnPay)) | |
351 | 397 | then maxUsdnPay | |
352 | 398 | else amount | |
353 | 399 | else if ((assetId == WAVESID)) | |
354 | 400 | then if ((amount > maxWavesPay)) | |
355 | 401 | then maxWavesPay | |
356 | 402 | else amount | |
357 | 403 | else 0 | |
358 | 404 | let amountBig = toBigInt(useAmount) | |
359 | 405 | if ((assetId == neutrinoAssetId)) | |
360 | 406 | then $Tuple2(nil, [toInt(fraction(fraction(amountBig, MULTX8, priceBig), (supplyBig - (amountBig / TWOX)), reserveBig)), 0, useAmount, reserve, supply, BR, reserve, (supply - useAmount), fraction(convertWavesToNeutrino(reserve, price), MULT6, (supply - useAmount)), (amount - useAmount), price]) | |
361 | 407 | else if ((assetId == WAVESID)) | |
362 | 408 | then $Tuple2(nil, [toInt(fraction(supplyBig, log(fraction((reserveBig + amountBig), MULTX16, reserveBig), 16, EULERX16, 16, 16, HALFUP), MULTX16)), useAmount, 0, reserve, supply, BR, (reserve + useAmount), supply, fraction(convertWavesToNeutrino((reserve + useAmount), price), MULT6, supply), (amount - useAmount), price]) | |
363 | 409 | else throw("Unsupported asset") | |
364 | 410 | } | |
365 | 411 | } | |
366 | 412 | ||
367 | 413 | ||
368 | 414 | ||
369 | 415 | @Callable(i) | |
370 | 416 | func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = { | |
371 | 417 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
372 | 418 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
373 | 419 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
374 | 420 | let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA) | |
375 | 421 | let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA) | |
376 | 422 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
377 | 423 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
378 | 424 | let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
379 | 425 | let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw))) | |
380 | 426 | let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16) | |
381 | 427 | let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16) | |
382 | 428 | let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16)) | |
383 | 429 | let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price) | |
384 | 430 | $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice]) | |
385 | 431 | } | |
386 | 432 | ||
387 | 433 | ||
388 | 434 | ||
389 | 435 | @Callable(i) | |
390 | 436 | func calcNeutinoMetricsREADONLY () = { | |
391 | 437 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
392 | 438 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
393 | 439 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
394 | - | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply]) | |
440 | + | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply, usdnUsdtPegX6, currentPriceAdj]) | |
395 | 441 | } | |
396 | 442 | ||
397 | 443 | ||
398 | 444 | ||
399 | 445 | @Callable(i) | |
400 | 446 | func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8)) | |
401 | 447 | ||
402 | 448 | ||
403 | 449 | ||
404 | 450 | @Callable(i) | |
405 | 451 | func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = { | |
406 | 452 | let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8) | |
407 | 453 | let v = fraction((amount1 + amount2), MULT8, (amount1 + w)) | |
408 | 454 | $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8))) | |
409 | 455 | } | |
410 | 456 | ||
411 | 457 | ||
412 | 458 | @Verifier(tx) | |
413 | 459 | func verify () = { | |
414 | 460 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
415 | 461 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
416 | 462 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
417 | 463 | then 1 | |
418 | 464 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
419 | 465 | then 1 | |
420 | 466 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
421 | 467 | then 1 | |
422 | 468 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
423 | 469 | then 2 | |
424 | 470 | else 0)) | |
425 | 471 | (count >= 3) | |
426 | 472 | } | |
427 | 473 |
github/deemru/w8io/026f985 56.98 ms ◑