tx · 6G2CLdNyFLGjnGEAwZzNXWWqxS8BbkBpYTRctnuYkUFf 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi: -0.02700000 Waves 2023.03.01 16:44 [2471076] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves
{ "type": 13, "id": "6G2CLdNyFLGjnGEAwZzNXWWqxS8BbkBpYTRctnuYkUFf", "fee": 2700000, "feeAssetId": null, "timestamp": 1677678247884, "version": 2, "chainId": 84, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "3PVHD6eTbk3M2b2rK8ChQKxGA2fasCNMGJQk6Mv8dCWN7gjQN4FGAaAmiYttLhs8TCNo8nDPxk2cRPVVsjqw92Ww", "37dk7qWUvRM3zD9fHzBwQoVZcVjw6DLizxSWipRNB33eXYaa3LXS9kSbzv2fT8g8KzUk8tbFWhojcLF2StfFQYrV", "EjqBsgcJPCdQCbAgzU7xqqe83PwEuKdf4QUB4nw2PdFnk13uq4icWkhXdXGVeDEx9st62NmSWoGQygt8uNhAhLN" ], "script": "base64:AAIFAAAAAAAAADkIAhIFCgMICAESAwoBARIHCgUBAQEBARIDCgEBEgQKAgECEgMKAQESABIFCgMBAQESBwoFAQEBAQEAAAB1AAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAB1NDQUxFMTYAAAAAAAAAABAAAAAAA1NFUAIAAAACX18AAAAABUhBTEY4AAAAAAAC+vCAAAAAAAhFVUxFUlgxNgkAATYAAAABAABgkqET2NV0AAAAAARUV09YCQABNgAAAAEAAAAAAAAAAAIAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9eE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AAA1NFUAQAAAAQcHViS2V5QWRtaW5zTGlzdAkABLUAAAACCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAAD2NvbnRyb2xDb250cmFjdAIAAAAMJXNfX211bHRpc2lnBQAAABNwdWJLZXlBZG1pbnNMaXN0U3RyBQAAAANTRVAEAAAABWNvdW50CQAAZAAAAAIJAABkAAAAAgkAAGQAAAACAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAABAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAACAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAMJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAADAAAAAAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADk76XCA==", "height": 2471076, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DXLpduRhjXjtxyWPg9bK8rahT2CJCibtsK4VeMGpzFr5 Next: 3LgE7R4w5wEhwTjRbtCKAPTMBiFBrLTSVD9dsXg3nULF Diff:
Old | New | Differences | |
---|---|---|---|
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | - | func reservesInUsdn (assetId) = { | |
319 | - | let tempAssetId = fromBase58String(assetId) | |
318 | + | func reservesInUsd (assetId) = { | |
320 | 319 | let vol = reserve(assetId) | |
321 | - | if ((tempAssetId == WAVESID)) | |
322 | - | then convertWavesToNeutrino(vol, currentPriceAdj) | |
323 | - | else { | |
324 | - | let pr = valueOrElse(getInteger(controlContract, keyPriceByAsset(assetId)), MULT6) | |
325 | - | fraction(vol, pr, MULT8) | |
326 | - | } | |
320 | + | let pr = value(getInteger(controlContract, keyPriceByAsset(assetId))) | |
321 | + | fraction(vol, pr, MULT8) | |
327 | 322 | } | |
328 | 323 | ||
329 | 324 | ||
334 | 329 | let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply) | |
335 | 330 | ||
336 | 331 | func getBR () = { | |
337 | - | let basket = split( | |
338 | - | func addBr (acc,assetId) = (acc + | |
332 | + | let basket = split(value(getString(neutrinoContract, basketAssetsKey())), SEP) | |
333 | + | func addBr (acc,assetId) = (acc + reservesInUsd(assetId)) | |
339 | 334 | ||
340 | - | let $l = basket | |
341 | - | let $s = size($l) | |
342 | - | let $acc0 = 0 | |
343 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
344 | - | then $a | |
345 | - | else addBr($a, $l[$i]) | |
335 | + | let sumReserves = { | |
336 | + | let $l = basket | |
337 | + | let $s = size($l) | |
338 | + | let $acc0 = 0 | |
339 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
340 | + | then $a | |
341 | + | else addBr($a, $l[$i]) | |
346 | 342 | ||
347 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
348 | - | then $a | |
349 | - | else throw("List size exceeds 10") | |
343 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
344 | + | then $a | |
345 | + | else throw("List size exceeds 10") | |
350 | 346 | ||
351 | - | $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) | |
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 | + | } | |
349 | + | fraction(sumReserves, MULT6, neutrinoSupply) | |
352 | 350 | } | |
353 | 351 | ||
354 | 352 | ||
357 | 355 | else getBR() | |
358 | 356 | ||
359 | 357 | func getBasketInfo () = { | |
360 | - | let basketAssets = | |
358 | + | let basketAssets = value(getString(neutrinoContract, basketAssetsKey())) | |
361 | 359 | let basket = split(basketAssets, SEP) | |
362 | 360 | func weightCalc (acc,assetId) = { | |
363 | 361 | let vol = reserve(assetId) | |
364 | - | let pr = | |
362 | + | let pr = value(getInteger(controlContract, keyPriceByAsset(assetId))) | |
365 | 363 | let resU = fraction(vol, pr, MULT8) | |
366 | 364 | $Tuple2((acc._1 :+ $Tuple4(assetId, vol, resU, pr)), (acc._2 + resU)) | |
367 | 365 | } | |
541 | 539 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
542 | 540 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
543 | 541 | let basketInfo = getBasketInfo() | |
544 | - | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve("WAVES"), | |
542 | + | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve("WAVES"), reservesInUsd("WAVES"), neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply, usdnUsdtPegX6, currentPriceAdj, basketInfo._1, basketInfo._2, basketInfo._3]) | |
545 | 543 | } | |
546 | 544 | ||
547 | 545 |
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 | 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(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 | - | func reservesInUsdn (assetId) = { | |
319 | - | let tempAssetId = fromBase58String(assetId) | |
318 | + | func reservesInUsd (assetId) = { | |
320 | 319 | let vol = reserve(assetId) | |
321 | - | if ((tempAssetId == WAVESID)) | |
322 | - | then convertWavesToNeutrino(vol, currentPriceAdj) | |
323 | - | else { | |
324 | - | let pr = valueOrElse(getInteger(controlContract, keyPriceByAsset(assetId)), MULT6) | |
325 | - | fraction(vol, pr, MULT8) | |
326 | - | } | |
320 | + | let pr = value(getInteger(controlContract, keyPriceByAsset(assetId))) | |
321 | + | fraction(vol, pr, MULT8) | |
327 | 322 | } | |
328 | 323 | ||
329 | 324 | ||
330 | 325 | let neutrinoOutOfMarketSupply = calcUsdnOutOfMarketSupply() | |
331 | 326 | ||
332 | 327 | let neutrinoTotalSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
333 | 328 | ||
334 | 329 | let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply) | |
335 | 330 | ||
336 | 331 | func getBR () = { | |
337 | - | let basket = split( | |
338 | - | func addBr (acc,assetId) = (acc + | |
332 | + | let basket = split(value(getString(neutrinoContract, basketAssetsKey())), SEP) | |
333 | + | func addBr (acc,assetId) = (acc + reservesInUsd(assetId)) | |
339 | 334 | ||
340 | - | let $l = basket | |
341 | - | let $s = size($l) | |
342 | - | let $acc0 = 0 | |
343 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
344 | - | then $a | |
345 | - | else addBr($a, $l[$i]) | |
335 | + | let sumReserves = { | |
336 | + | let $l = basket | |
337 | + | let $s = size($l) | |
338 | + | let $acc0 = 0 | |
339 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
340 | + | then $a | |
341 | + | else addBr($a, $l[$i]) | |
346 | 342 | ||
347 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
348 | - | then $a | |
349 | - | else throw("List size exceeds 10") | |
343 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
344 | + | then $a | |
345 | + | else throw("List size exceeds 10") | |
350 | 346 | ||
351 | - | $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) | |
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 | + | } | |
349 | + | fraction(sumReserves, MULT6, neutrinoSupply) | |
352 | 350 | } | |
353 | 351 | ||
354 | 352 | ||
355 | 353 | let BR = if ((neutrinoSupply == 0)) | |
356 | 354 | then 0 | |
357 | 355 | else getBR() | |
358 | 356 | ||
359 | 357 | func getBasketInfo () = { | |
360 | - | let basketAssets = | |
358 | + | let basketAssets = value(getString(neutrinoContract, basketAssetsKey())) | |
361 | 359 | let basket = split(basketAssets, SEP) | |
362 | 360 | func weightCalc (acc,assetId) = { | |
363 | 361 | let vol = reserve(assetId) | |
364 | - | let pr = | |
362 | + | let pr = value(getInteger(controlContract, keyPriceByAsset(assetId))) | |
365 | 363 | let resU = fraction(vol, pr, MULT8) | |
366 | 364 | $Tuple2((acc._1 :+ $Tuple4(assetId, vol, resU, pr)), (acc._2 + resU)) | |
367 | 365 | } | |
368 | 366 | ||
369 | 367 | let t = { | |
370 | 368 | let $l = basket | |
371 | 369 | let $s = size($l) | |
372 | 370 | let $acc0 = $Tuple2(nil, 0) | |
373 | 371 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
374 | 372 | then $a | |
375 | 373 | else weightCalc($a, $l[$i]) | |
376 | 374 | ||
377 | 375 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
378 | 376 | then $a | |
379 | 377 | else throw("List size exceeds 10") | |
380 | 378 | ||
381 | 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) | |
382 | 380 | } | |
383 | 381 | func combine (acc,item) = { | |
384 | 382 | let share = if ((t._2 == 0)) | |
385 | 383 | then MULT6 | |
386 | 384 | else fraction(item._3, MULT6, t._2) | |
387 | 385 | (acc :+ makeString([item._1, toString(share), toString(item._4), toString(item._2)], ":")) | |
388 | 386 | } | |
389 | 387 | ||
390 | 388 | let weightedPrice = if ((neutrinoSupply == 0)) | |
391 | 389 | then 0 | |
392 | 390 | else fraction(t._2, MULT6, neutrinoSupply) | |
393 | 391 | $Tuple3(makeString({ | |
394 | 392 | let $l = t._1 | |
395 | 393 | let $s = size($l) | |
396 | 394 | let $acc0 = nil | |
397 | 395 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
398 | 396 | then $a | |
399 | 397 | else combine($a, $l[$i]) | |
400 | 398 | ||
401 | 399 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
402 | 400 | then $a | |
403 | 401 | else throw("List size exceeds 10") | |
404 | 402 | ||
405 | 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) | |
406 | 404 | }, "_"), weightedPrice, t._2) | |
407 | 405 | } | |
408 | 406 | ||
409 | 407 | ||
410 | 408 | @Callable(i) | |
411 | 409 | func constructorV1 (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this)) | |
412 | 410 | then throw("not authorized") | |
413 | 411 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)] | |
414 | 412 | ||
415 | 413 | ||
416 | 414 | ||
417 | 415 | @Callable(i) | |
418 | 416 | func calcSwapLimitREADONLY (gNsbtAmount) = { | |
419 | 417 | let limitBasketTokenInUsd = if ((0 >= gNsbtAmount)) | |
420 | 418 | then 0 | |
421 | 419 | else { | |
422 | 420 | let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam())) | |
423 | 421 | let bParamX16 = toBigInt(getIntOrFail(this, keySwapAmountBParam())) | |
424 | 422 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
425 | 423 | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
426 | 424 | } | |
427 | 425 | let limitUsdn = if ((0 >= gNsbtAmount)) | |
428 | 426 | then 0 | |
429 | 427 | else { | |
430 | 428 | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
431 | 429 | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
432 | 430 | let brX6 = toBigInt(BR) | |
433 | 431 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
434 | 432 | toInt(fraction(fraction(aParamX8, powPartX8, MULTX10), brX6, MULTX6)) | |
435 | 433 | } | |
436 | 434 | $Tuple2(nil, [limitBasketTokenInUsd, 0, limitUsdn]) | |
437 | 435 | } | |
438 | 436 | ||
439 | 437 | ||
440 | 438 | ||
441 | 439 | @Callable(i) | |
442 | 440 | func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = { | |
443 | 441 | let EXP = toBigInt(2718281) | |
444 | 442 | let EXPSCALE = 6 | |
445 | 443 | let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3) | |
446 | 444 | let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10)) | |
447 | 445 | let wReservesInUsdn = convertWavesToNeutrino(wRaw, price) | |
448 | 446 | let multBR = fraction(wReservesInUsdn, MULT8, uRaw) | |
449 | 447 | if ((multBR > 10678564816)) | |
450 | 448 | then throw((("BR=" + toString(multBR)) + " > 10678.564816% will overflow exponent")) | |
451 | 449 | else { | |
452 | 450 | let multPower = (a * (multBR - MULT8)) | |
453 | 451 | let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN) | |
454 | 452 | let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6) | |
455 | 453 | $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)]) | |
456 | 454 | } | |
457 | 455 | } | |
458 | 456 | ||
459 | 457 | ||
460 | 458 | ||
461 | 459 | @Callable(i) | |
462 | 460 | func curveFunctionREADONLY (wavesPayRaw) = { | |
463 | 461 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
464 | 462 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
465 | 463 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
466 | 464 | let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
467 | 465 | let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
468 | 466 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
469 | 467 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
470 | 468 | let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
471 | 469 | let usdnPay = convertWavesToNeutrino(wavesPayRaw, price) | |
472 | 470 | let bigMaxNsbtSupply = toBigInt(mRaw) | |
473 | 471 | let bigNsbtSupply = toBigInt((mRaw - sRaw)) | |
474 | 472 | let step1 = fraction(toBigInt(usdnPay), MULTX16, multK) | |
475 | 473 | let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply) | |
476 | 474 | let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply))) | |
477 | 475 | let nsbtAmountRaw = ((mRaw - sRaw) - step3) | |
478 | 476 | $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]) | |
479 | 477 | } | |
480 | 478 | ||
481 | 479 | ||
482 | 480 | ||
483 | 481 | @Callable(i) | |
484 | 482 | func surfFunctionREADONLY (amount,assetId) = if ((0 > amount)) | |
485 | 483 | then throw("amount should be positive") | |
486 | 484 | else { | |
487 | 485 | let price = currentPrice | |
488 | 486 | let priceBig = toBigInt(price) | |
489 | 487 | let reserveW = reserve("WAVES") | |
490 | 488 | let reserveBig = toBigInt(reserveW) | |
491 | 489 | let supply = neutrinoSupply | |
492 | 490 | let supplyBig = toBigInt(supply) | |
493 | 491 | if ((BR >= MULT6)) | |
494 | 492 | then throw((("BR = " + toString(BR)) + ", cannot buy SURF")) | |
495 | 493 | else { | |
496 | 494 | let maxWavesPay = (fraction(supply, MULT8, price) - reserveW) | |
497 | 495 | let maxUsdnPay = (supply - fraction(reserveW, price, MULT8)) | |
498 | 496 | let useAmount = if ((assetId == neutrinoAssetId)) | |
499 | 497 | then if ((amount > maxUsdnPay)) | |
500 | 498 | then maxUsdnPay | |
501 | 499 | else amount | |
502 | 500 | else if ((assetId == WAVESID)) | |
503 | 501 | then if ((amount > maxWavesPay)) | |
504 | 502 | then maxWavesPay | |
505 | 503 | else amount | |
506 | 504 | else 0 | |
507 | 505 | let amountBig = toBigInt(useAmount) | |
508 | 506 | if ((assetId == neutrinoAssetId)) | |
509 | 507 | 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]) | |
510 | 508 | else if ((assetId == WAVESID)) | |
511 | 509 | 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]) | |
512 | 510 | else throw("Unsupported asset") | |
513 | 511 | } | |
514 | 512 | } | |
515 | 513 | ||
516 | 514 | ||
517 | 515 | ||
518 | 516 | @Callable(i) | |
519 | 517 | func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = { | |
520 | 518 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
521 | 519 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
522 | 520 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
523 | 521 | let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA) | |
524 | 522 | let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA) | |
525 | 523 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
526 | 524 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
527 | 525 | let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
528 | 526 | let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw))) | |
529 | 527 | let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16) | |
530 | 528 | let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16) | |
531 | 529 | let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16)) | |
532 | 530 | let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price) | |
533 | 531 | $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice]) | |
534 | 532 | } | |
535 | 533 | ||
536 | 534 | ||
537 | 535 | ||
538 | 536 | @Callable(i) | |
539 | 537 | func calcNeutinoMetricsREADONLY () = { | |
540 | 538 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
541 | 539 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
542 | 540 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
543 | 541 | let basketInfo = getBasketInfo() | |
544 | - | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve("WAVES"), | |
542 | + | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve("WAVES"), reservesInUsd("WAVES"), neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply, usdnUsdtPegX6, currentPriceAdj, basketInfo._1, basketInfo._2, basketInfo._3]) | |
545 | 543 | } | |
546 | 544 | ||
547 | 545 | ||
548 | 546 | ||
549 | 547 | @Callable(i) | |
550 | 548 | func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8)) | |
551 | 549 | ||
552 | 550 | ||
553 | 551 | ||
554 | 552 | @Callable(i) | |
555 | 553 | func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = { | |
556 | 554 | let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8) | |
557 | 555 | let v = fraction((amount1 + amount2), MULT8, (amount1 + w)) | |
558 | 556 | $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8))) | |
559 | 557 | } | |
560 | 558 | ||
561 | 559 | ||
562 | 560 | @Verifier(tx) | |
563 | 561 | func verify () = { | |
564 | 562 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
565 | 563 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
566 | 564 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
567 | 565 | then 1 | |
568 | 566 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
569 | 567 | then 1 | |
570 | 568 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
571 | 569 | then 1 | |
572 | 570 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
573 | 571 | then 2 | |
574 | 572 | else 0)) | |
575 | 573 | (count >= 3) | |
576 | 574 | } | |
577 | 575 |
github/deemru/w8io/026f985 65.59 ms ◑