tx · 7t74yhG8dBBeKbCaJb6A9zZFGZuY4RCTUpwjhcHWXUUa 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi: -0.02000000 Waves 2023.03.03 15:46 [2473894] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves
{ "type": 13, "id": "7t74yhG8dBBeKbCaJb6A9zZFGZuY4RCTUpwjhcHWXUUa", "fee": 2000000, "feeAssetId": null, "timestamp": 1677847572848, "version": 2, "chainId": 84, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "4eyzUxU9KUTB5bmMm1Nsb6U8YSFXWFn77dzsC5PTr54MQsMHpsXM9shPvJhPCMqxpSWPeGNSPTp4c7Hio1nfn9V8", "5MFW1Ciyoun5DQvxg983LSSixL5UrYY8iQaTze7RYckPD5w7oWmkfPTTPbeM89Yn4G2xktbnHQoydq8mZyrWpZ4G", "3AhaVVUwNqoPRQMWpdyhD66ngrBC2ukc1r5zX833xb4h8cK8x8zVmr8bR7wDVrEfFEh49AD5yCUAVvEzBiXqShmC" ], "script": "base64:BgI5CAISBQoDCAgBEgMKAQESBwoFAQEBAQESAwoBARIECgIBAhIDCgEBEgASBQoDAQEBEgcKBQEBAQEBdQALcmV2aXNpb25OdW0CAAAJTVVMVFNDQUxFAAgAB1NDQUxFMTYAEAADU0VQAgJfXwAFSEFMRjgAgOHrFwAIRVVMRVJYMTYJALYCAQD0quOekdSkMAAEVFdPWAkAtgIBAAIABU1VTFQ2AMCEPQAGTVVMVFg2CQC2AgEAwIQ9AAVNVUxUOACAwtcvAAZNVUxUWDgJALYCAQCAwtcvAAdNVUxUWDEwCQC2AgEAgMivoCUAB01VTFRYMTYJALYCAQCAgIT+pt7hEQAHV0FWRVNJRAkA2QQBAgVXQVZFUwALa1Jlc3VsdElkeEEAAAAPa1Jlc3VsdElkeFBhdWxCAA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uPE2HyHmemAjxMZcyLX9UDEKJb Next: Hu3ft7FaFxGBGF7Hkny9Uqt1MnRxAvscWCbx6bwuNbGv Diff:
Old | New | Differences | |
---|---|---|---|
427 | 427 | else { | |
428 | 428 | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
429 | 429 | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
430 | - | let brX6 = toBigInt(BR) | |
431 | 430 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
432 | - | toInt(fraction( | |
431 | + | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
433 | 432 | } | |
434 | 433 | $Tuple2(nil, [limitBasketTokenInUsd, 0, limitUsdn]) | |
435 | 434 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
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 | 70 | let nMetricUsdnUsdtPeg = 12 | |
71 | 71 | ||
72 | 72 | let nMetricCurrentPriceAdj = 13 | |
73 | 73 | ||
74 | 74 | let nMetricBasketInfo = 14 | |
75 | 75 | ||
76 | 76 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keySwapAmountAParam () = "%s%s__config__swapAParam" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keySwapAmountBParam () = "%s%s__config__swapBParam" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyPriceAdjMinCoeff () = "%s%s__priceAdj__minCoefficient" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyPriceAdjArbRegulator () = "%s%s__priceAdj__arbRegulator" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyNsbtAssetId () = "bond_asset_id" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keySurfAssetId () = "surf_asset_id" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func swapsTimeframeKEY () = "swaps_timeframe" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func basketAssetsKey () = "%s%s__common__basketAssets" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyPrice () = "price" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyPriceByAsset (assetId) = ("%s%s%s__common__priceByAsset__" + assetId) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | let RpdBalanceKey = "rpd_balance" | |
125 | 125 | ||
126 | 126 | func rpdUserBalanceKey (owner,assetId) = makeString([RpdBalanceKey, assetId, owner], "_") | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getNumberByKey (address,key) = valueOrElse(getInteger(address, key), 0) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult)) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16)) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func asAnyList (val) = match val { | |
154 | 154 | case valAnyLyst: List[Any] => | |
155 | 155 | valAnyLyst | |
156 | 156 | case _ => | |
157 | 157 | throw("fail to cast into List[Any]") | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func asInt (val) = match val { | |
162 | 162 | case valInt: Int => | |
163 | 163 | valInt | |
164 | 164 | case _ => | |
165 | 165 | throw("fail to cast into Int") | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func asString (val) = match val { | |
170 | 170 | case valStr: String => | |
171 | 171 | valStr | |
172 | 172 | case _ => | |
173 | 173 | throw("fail to cast into String") | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func asPriceSTRUCT (v) = match v { | |
178 | 178 | case struct: (Int, Int, Int, Int) => | |
179 | 179 | struct | |
180 | 180 | case _ => | |
181 | 181 | throw("fail to cast into PriceSTRUCT") | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | let IdxControlCfgNeutrinoDapp = 1 | |
186 | 186 | ||
187 | 187 | let IdxControlCfgAuctionDapp = 2 | |
188 | 188 | ||
189 | 189 | let IdxControlCfgRpdDapp = 3 | |
190 | 190 | ||
191 | 191 | let IdxControlCfgMathDapp = 4 | |
192 | 192 | ||
193 | 193 | let IdxControlCfgLiquidationDapp = 5 | |
194 | 194 | ||
195 | 195 | let IdxControlCfgRestDapp = 6 | |
196 | 196 | ||
197 | 197 | let IdxControlCfgNodeRegistryDapp = 7 | |
198 | 198 | ||
199 | 199 | let IdxControlCfgNsbtStakingDapp = 8 | |
200 | 200 | ||
201 | 201 | let IdxControlCfgMediatorDapp = 9 | |
202 | 202 | ||
203 | 203 | let IdxControlCfgSurfStakingDapp = 10 | |
204 | 204 | ||
205 | 205 | let IdxControlCfgGnsbtControllerDapp = 11 | |
206 | 206 | ||
207 | 207 | let IdxControlCfgRestV2Dapp = 12 | |
208 | 208 | ||
209 | 209 | let IdxControlCfgGovernanceDapp = 13 | |
210 | 210 | ||
211 | 211 | let IdxControlCfgPegProviderDapp = 14 | |
212 | 212 | ||
213 | 213 | func keyControlAddress () = "%s%s__config__controlAddress" | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func keyControlCfg () = "%s__controlConfig" | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
226 | 226 | ||
227 | 227 | let controlCfg = readControlCfgOrFail(controlContract) | |
228 | 228 | ||
229 | 229 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
230 | 230 | ||
231 | 231 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
232 | 232 | ||
233 | 233 | let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp) | |
234 | 234 | ||
235 | 235 | let usdnStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp) | |
236 | 236 | ||
237 | 237 | let pegProviderContract = getContractAddressOrFail(controlCfg, IdxControlCfgPegProviderDapp) | |
238 | 238 | ||
239 | 239 | let neutrinoAssetIdStr = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
240 | 240 | ||
241 | 241 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdStr) | |
242 | 242 | ||
243 | 243 | let nsbtAssetId = fromBase58String(getStringValue(neutrinoContract, keyNsbtAssetId())) | |
244 | 244 | ||
245 | 245 | let surfAssetId = fromBase58String(getStringValue(auctionContract, keySurfAssetId())) | |
246 | 246 | ||
247 | 247 | func keyBalanceLocked () = "balance_lock_" | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func totalLockedKEY (swapType,assetId) = makeString(["%s%s%s", "balanceLock", swapType, assetId], SEP) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func keyTokenLockedBalance (assetId) = totalLockedKEY("outNeutrino", assetId) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func keyNeutrinoLockedBalance () = totalLockedKEY("outMulti", neutrinoAssetIdStr) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func keyOldNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func keyOldWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func calcUsdnOutOfMarketSupply () = { | |
266 | 266 | let outOfMarketAddressList = valueOrElse(getString(controlContract, "%s%s__control__outOfMarketAddressList"), "") | |
267 | 267 | if ((outOfMarketAddressList == "")) | |
268 | 268 | then 0 | |
269 | 269 | else { | |
270 | 270 | func balancesSUM (outOfMarketSupply,nextAddress) = ((outOfMarketSupply + valueOrElse(getInteger(usdnStakingContract, rpdUserBalanceKey(nextAddress, neutrinoAssetIdStr)), 0)) + assetBalance(addressFromStringValue(nextAddress), neutrinoAssetId)) | |
271 | 271 | ||
272 | 272 | let $l = split(outOfMarketAddressList, SEP) | |
273 | 273 | let $s = size($l) | |
274 | 274 | let $acc0 = 0 | |
275 | 275 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
276 | 276 | then $a | |
277 | 277 | else balancesSUM($a, $l[$i]) | |
278 | 278 | ||
279 | 279 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
280 | 280 | then $a | |
281 | 281 | else throw("List size exceeds 7") | |
282 | 282 | ||
283 | 283 | $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) | |
284 | 284 | } | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | func readCurrentAvgPeg () = asPriceSTRUCT(invoke(pegProviderContract, "price", [4], nil))._2 | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func adjustPrice (priceX6,usdnUsdtPegX6) = { | |
292 | 292 | let minCoeffX6 = valueOrElse(getInteger(this, keyPriceAdjMinCoeff()), 600000) | |
293 | 293 | let arbRegulatorX6 = valueOrElse(getInteger(this, keyPriceAdjArbRegulator()), 150000) | |
294 | 294 | let maxPriceCoeffX6 = max([minCoeffX6, fraction((MULT6 + arbRegulatorX6), usdnUsdtPegX6, MULT6)]) | |
295 | 295 | let priceCoeffX6 = min([maxPriceCoeffX6, MULT6]) | |
296 | 296 | fraction(priceX6, MULT6, priceCoeffX6) | |
297 | 297 | } | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
301 | 301 | ||
302 | 302 | let usdnUsdtPegX6 = readCurrentAvgPeg() | |
303 | 303 | ||
304 | 304 | let currentPriceAdj = adjustPrice(currentPrice, usdnUsdtPegX6) | |
305 | 305 | ||
306 | 306 | let neutrinoLockedBalance = (valueOrElse(getInteger(neutrinoContract, keyOldNeutrinoLockedBalance()), 0) + valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0)) | |
307 | 307 | ||
308 | 308 | let wavesLockedBalance = (valueOrElse(getInteger(neutrinoContract, keyOldWavesLockedBalance()), 0) + valueOrElse(getInteger(neutrinoContract, keyTokenLockedBalance("WAVES")), 0)) | |
309 | 309 | ||
310 | 310 | func reserve (assetId) = { | |
311 | 311 | let tempAssetId = fromBase58String(assetId) | |
312 | 312 | if ((tempAssetId == WAVESID)) | |
313 | 313 | then (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
314 | 314 | else (assetBalance(neutrinoContract, tempAssetId) - valueOrElse(getInteger(neutrinoContract, keyTokenLockedBalance(assetId)), 0)) | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func reservesInUsd (assetId) = { | |
319 | 319 | let vol = reserve(assetId) | |
320 | 320 | let pr = value(getInteger(controlContract, keyPriceByAsset(assetId))) | |
321 | 321 | fraction(vol, pr, MULT8) | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | let neutrinoOutOfMarketSupply = calcUsdnOutOfMarketSupply() | |
326 | 326 | ||
327 | 327 | let neutrinoTotalSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
328 | 328 | ||
329 | 329 | let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply) | |
330 | 330 | ||
331 | 331 | func getBR () = { | |
332 | 332 | let basket = split(value(getString(neutrinoContract, basketAssetsKey())), SEP) | |
333 | 333 | func addBr (acc,assetId) = (acc + reservesInUsd(assetId)) | |
334 | 334 | ||
335 | 335 | let sumReserves = { | |
336 | 336 | let $l = basket | |
337 | 337 | let $s = size($l) | |
338 | 338 | let $acc0 = 0 | |
339 | 339 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
340 | 340 | then $a | |
341 | 341 | else addBr($a, $l[$i]) | |
342 | 342 | ||
343 | 343 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
344 | 344 | then $a | |
345 | 345 | else throw("List size exceeds 10") | |
346 | 346 | ||
347 | 347 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
348 | 348 | } | |
349 | 349 | fraction(sumReserves, MULT6, neutrinoSupply) | |
350 | 350 | } | |
351 | 351 | ||
352 | 352 | ||
353 | 353 | let BR = if ((neutrinoSupply == 0)) | |
354 | 354 | then 0 | |
355 | 355 | else getBR() | |
356 | 356 | ||
357 | 357 | func getBasketInfo () = { | |
358 | 358 | let basketAssets = value(getString(neutrinoContract, basketAssetsKey())) | |
359 | 359 | let basket = split(basketAssets, SEP) | |
360 | 360 | func weightCalc (acc,assetId) = { | |
361 | 361 | let vol = reserve(assetId) | |
362 | 362 | let pr = value(getInteger(controlContract, keyPriceByAsset(assetId))) | |
363 | 363 | let resU = fraction(vol, pr, MULT8) | |
364 | 364 | $Tuple2((acc._1 :+ $Tuple4(assetId, vol, resU, pr)), (acc._2 + resU)) | |
365 | 365 | } | |
366 | 366 | ||
367 | 367 | let t = { | |
368 | 368 | let $l = basket | |
369 | 369 | let $s = size($l) | |
370 | 370 | let $acc0 = $Tuple2(nil, 0) | |
371 | 371 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
372 | 372 | then $a | |
373 | 373 | else weightCalc($a, $l[$i]) | |
374 | 374 | ||
375 | 375 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
376 | 376 | then $a | |
377 | 377 | else throw("List size exceeds 10") | |
378 | 378 | ||
379 | 379 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
380 | 380 | } | |
381 | 381 | func combine (acc,item) = { | |
382 | 382 | let share = if ((t._2 == 0)) | |
383 | 383 | then MULT6 | |
384 | 384 | else fraction(item._3, MULT6, t._2) | |
385 | 385 | (acc :+ makeString([item._1, toString(share), toString(item._4), toString(item._2)], ":")) | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | let weightedPrice = if ((neutrinoSupply == 0)) | |
389 | 389 | then 0 | |
390 | 390 | else fraction(t._2, MULT6, neutrinoSupply) | |
391 | 391 | $Tuple3(makeString({ | |
392 | 392 | let $l = t._1 | |
393 | 393 | let $s = size($l) | |
394 | 394 | let $acc0 = nil | |
395 | 395 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
396 | 396 | then $a | |
397 | 397 | else combine($a, $l[$i]) | |
398 | 398 | ||
399 | 399 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
400 | 400 | then $a | |
401 | 401 | else throw("List size exceeds 10") | |
402 | 402 | ||
403 | 403 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
404 | 404 | }, "_"), weightedPrice, t._2) | |
405 | 405 | } | |
406 | 406 | ||
407 | 407 | ||
408 | 408 | @Callable(i) | |
409 | 409 | func constructorV1 (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this)) | |
410 | 410 | then throw("not authorized") | |
411 | 411 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)] | |
412 | 412 | ||
413 | 413 | ||
414 | 414 | ||
415 | 415 | @Callable(i) | |
416 | 416 | func calcSwapLimitREADONLY (gNsbtAmount) = { | |
417 | 417 | let limitBasketTokenInUsd = if ((0 >= gNsbtAmount)) | |
418 | 418 | then 0 | |
419 | 419 | else { | |
420 | 420 | let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam())) | |
421 | 421 | let bParamX16 = toBigInt(getIntOrFail(this, keySwapAmountBParam())) | |
422 | 422 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
423 | 423 | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
424 | 424 | } | |
425 | 425 | let limitUsdn = if ((0 >= gNsbtAmount)) | |
426 | 426 | then 0 | |
427 | 427 | else { | |
428 | 428 | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
429 | 429 | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
430 | - | let brX6 = toBigInt(BR) | |
431 | 430 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
432 | - | toInt(fraction( | |
431 | + | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
433 | 432 | } | |
434 | 433 | $Tuple2(nil, [limitBasketTokenInUsd, 0, limitUsdn]) | |
435 | 434 | } | |
436 | 435 | ||
437 | 436 | ||
438 | 437 | ||
439 | 438 | @Callable(i) | |
440 | 439 | func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = { | |
441 | 440 | let EXP = toBigInt(2718281) | |
442 | 441 | let EXPSCALE = 6 | |
443 | 442 | let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3) | |
444 | 443 | let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10)) | |
445 | 444 | let wReservesInUsdn = convertWavesToNeutrino(wRaw, price) | |
446 | 445 | let multBR = fraction(wReservesInUsdn, MULT8, uRaw) | |
447 | 446 | if ((multBR > 10678564816)) | |
448 | 447 | then throw((("BR=" + toString(multBR)) + " > 10678.564816% will overflow exponent")) | |
449 | 448 | else { | |
450 | 449 | let multPower = (a * (multBR - MULT8)) | |
451 | 450 | let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN) | |
452 | 451 | let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6) | |
453 | 452 | $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)]) | |
454 | 453 | } | |
455 | 454 | } | |
456 | 455 | ||
457 | 456 | ||
458 | 457 | ||
459 | 458 | @Callable(i) | |
460 | 459 | func curveFunctionREADONLY (wavesPayRaw) = { | |
461 | 460 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
462 | 461 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
463 | 462 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
464 | 463 | let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
465 | 464 | let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
466 | 465 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
467 | 466 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
468 | 467 | let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
469 | 468 | let usdnPay = convertWavesToNeutrino(wavesPayRaw, price) | |
470 | 469 | let bigMaxNsbtSupply = toBigInt(mRaw) | |
471 | 470 | let bigNsbtSupply = toBigInt((mRaw - sRaw)) | |
472 | 471 | let step1 = fraction(toBigInt(usdnPay), MULTX16, multK) | |
473 | 472 | let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply) | |
474 | 473 | let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply))) | |
475 | 474 | let nsbtAmountRaw = ((mRaw - sRaw) - step3) | |
476 | 475 | $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]) | |
477 | 476 | } | |
478 | 477 | ||
479 | 478 | ||
480 | 479 | ||
481 | 480 | @Callable(i) | |
482 | 481 | func surfFunctionREADONLY (amount,assetId) = if ((0 > amount)) | |
483 | 482 | then throw("amount should be positive") | |
484 | 483 | else { | |
485 | 484 | let price = currentPrice | |
486 | 485 | let priceBig = toBigInt(price) | |
487 | 486 | let reserveW = reserve("WAVES") | |
488 | 487 | let reserveBig = toBigInt(reserveW) | |
489 | 488 | let supply = neutrinoSupply | |
490 | 489 | let supplyBig = toBigInt(supply) | |
491 | 490 | if ((BR >= MULT6)) | |
492 | 491 | then throw((("BR = " + toString(BR)) + ", cannot buy SURF")) | |
493 | 492 | else { | |
494 | 493 | let maxWavesPay = (fraction(supply, MULT8, price) - reserveW) | |
495 | 494 | let maxUsdnPay = (supply - fraction(reserveW, price, MULT8)) | |
496 | 495 | let useAmount = if ((assetId == neutrinoAssetId)) | |
497 | 496 | then if ((amount > maxUsdnPay)) | |
498 | 497 | then maxUsdnPay | |
499 | 498 | else amount | |
500 | 499 | else if ((assetId == WAVESID)) | |
501 | 500 | then if ((amount > maxWavesPay)) | |
502 | 501 | then maxWavesPay | |
503 | 502 | else amount | |
504 | 503 | else 0 | |
505 | 504 | let amountBig = toBigInt(useAmount) | |
506 | 505 | if ((assetId == neutrinoAssetId)) | |
507 | 506 | then $Tuple2(nil, [toInt(fraction(fraction(amountBig, MULTX8, priceBig), (supplyBig - (amountBig / TWOX)), reserveBig)), 0, useAmount, reserveW, supply, BR, reserveW, (supply - useAmount), fraction(convertWavesToNeutrino(reserveW, price), MULT6, (supply - useAmount)), (amount - useAmount), price]) | |
508 | 507 | else if ((assetId == WAVESID)) | |
509 | 508 | then $Tuple2(nil, [toInt(fraction(supplyBig, log(fraction((reserveBig + amountBig), MULTX16, reserveBig), 16, EULERX16, 16, 16, HALFUP), MULTX16)), useAmount, 0, reserveW, supply, BR, (reserveW + useAmount), supply, fraction(convertWavesToNeutrino((reserveW + useAmount), price), MULT6, supply), (amount - useAmount), price]) | |
510 | 509 | else throw("Unsupported asset") | |
511 | 510 | } | |
512 | 511 | } | |
513 | 512 | ||
514 | 513 | ||
515 | 514 | ||
516 | 515 | @Callable(i) | |
517 | 516 | func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = { | |
518 | 517 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
519 | 518 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
520 | 519 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
521 | 520 | let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA) | |
522 | 521 | let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA) | |
523 | 522 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
524 | 523 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
525 | 524 | let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
526 | 525 | let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw))) | |
527 | 526 | let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16) | |
528 | 527 | let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16) | |
529 | 528 | let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16)) | |
530 | 529 | let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price) | |
531 | 530 | $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice]) | |
532 | 531 | } | |
533 | 532 | ||
534 | 533 | ||
535 | 534 | ||
536 | 535 | @Callable(i) | |
537 | 536 | func calcNeutinoMetricsREADONLY () = { | |
538 | 537 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
539 | 538 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
540 | 539 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
541 | 540 | let basketInfo = getBasketInfo() | |
542 | 541 | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve("WAVES"), reservesInUsd("WAVES"), neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply, usdnUsdtPegX6, currentPriceAdj, basketInfo._1, basketInfo._2, basketInfo._3]) | |
543 | 542 | } | |
544 | 543 | ||
545 | 544 | ||
546 | 545 | ||
547 | 546 | @Callable(i) | |
548 | 547 | func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8)) | |
549 | 548 | ||
550 | 549 | ||
551 | 550 | ||
552 | 551 | @Callable(i) | |
553 | 552 | func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = { | |
554 | 553 | let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8) | |
555 | 554 | let v = fraction((amount1 + amount2), MULT8, (amount1 + w)) | |
556 | 555 | $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8))) | |
557 | 556 | } | |
558 | 557 | ||
559 | 558 | ||
560 | 559 | @Verifier(tx) | |
561 | 560 | func verify () = { | |
562 | 561 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
563 | 562 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
564 | 563 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
565 | 564 | then 1 | |
566 | 565 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
567 | 566 | then 1 | |
568 | 567 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
569 | 568 | then 1 | |
570 | 569 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
571 | 570 | then 2 | |
572 | 571 | else 0)) | |
573 | 572 | (count >= 3) | |
574 | 573 | } | |
575 | 574 |
github/deemru/w8io/026f985 59.74 ms ◑