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+vCAAAAAAAhFVUxFUlgxNgkAATYAAAABAABgkqET2NV0AAAAAARUV09YCQABNgAAAAEAAAAAAAAAAAIAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9e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AAAA1NFUAQAAAAQcHViS2V5QWRtaW5zTGlzdAkABLUAAAACCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAAD2NvbnRyb2xDb250cmFjdAIAAAAMJXNfX211bHRpc2lnBQAAABNwdWJLZXlBZG1pbnNMaXN0U3RyBQAAAANTRVAEAAAABWNvdW50CQAAZAAAAAIJAABkAAAAAgkAAGQAAAACAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAABAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAACAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAMJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAADAAAAAAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADk76XCA==", "height": 2471076, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DXLpduRhjXjtxyWPg9bK8rahT2CJCibtsK4VeMGpzFr5 Next: 3LgE7R4w5wEhwTjRbtCKAPTMBiFBrLTSVD9dsXg3nULF Diff:
OldNewDifferences
315315 }
316316
317317
318-func reservesInUsdn (assetId) = {
319- let tempAssetId = fromBase58String(assetId)
318+func reservesInUsd (assetId) = {
320319 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)
327322 }
328323
329324
334329 let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply)
335330
336331 func getBR () = {
337- let basket = split(valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES"), SEP)
338- func addBr (acc,assetId) = (acc + fraction(reservesInUsdn(assetId), MULT6, neutrinoSupply))
332+ let basket = split(value(getString(neutrinoContract, basketAssetsKey())), SEP)
333+ func addBr (acc,assetId) = (acc + reservesInUsd(assetId))
339334
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])
346342
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")
350346
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)
352350 }
353351
354352
357355 else getBR()
358356
359357 func getBasketInfo () = {
360- let basketAssets = valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES")
358+ let basketAssets = value(getString(neutrinoContract, basketAssetsKey()))
361359 let basket = split(basketAssets, SEP)
362360 func weightCalc (acc,assetId) = {
363361 let vol = reserve(assetId)
364- let pr = valueOrElse(getInteger(controlContract, keyPriceByAsset(assetId)), MULT6)
362+ let pr = value(getInteger(controlContract, keyPriceByAsset(assetId)))
365363 let resU = fraction(vol, pr, MULT8)
366364 $Tuple2((acc._1 :+ $Tuple4(assetId, vol, resU, pr)), (acc._2 + resU))
367365 }
541539 let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId))
542540 let surfSupply = value(assetInfo(surfAssetId)).quantity
543541 let basketInfo = getBasketInfo()
544- $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve("WAVES"), reservesInUsdn("WAVES"), neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply, usdnUsdtPegX6, currentPriceAdj, basketInfo._1, basketInfo._2, basketInfo._3])
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])
545543 }
546544
547545
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let revisionNum = ""
55
66 let MULTSCALE = 8
77
88 let SCALE16 = 16
99
1010 let SEP = "__"
1111
1212 let HALF8 = 50000000
1313
1414 let EULERX16 = toBigInt(27182818284590452)
1515
1616 let TWOX = toBigInt(2)
1717
1818 let MULT6 = 1000000
1919
2020 let MULTX6 = toBigInt(1000000)
2121
2222 let MULT8 = 100000000
2323
2424 let MULTX8 = toBigInt(100000000)
2525
2626 let MULTX10 = toBigInt(10000000000)
2727
2828 let MULTX16 = toBigInt(10000000000000000)
2929
3030 let WAVESID = fromBase58String("WAVES")
3131
3232 let kResultIdxA = 0
3333
3434 let kResultIdxPaulB = 1
3535
3636 let kResultIdxWReservesInUsdn = 2
3737
3838 let kResultIdxMultBR = 3
3939
4040 let kResultIdxMultPower = 4
4141
4242 let kResultIdxMultExpInPowerStr = 5
4343
4444 let kResultIdxMultKStr = 6
4545
4646 let nMetricIdxPrice = 0
4747
4848 let nMetricIdxUsdnLockedBalance = 1
4949
5050 let nMetricIdxWavesLockedBalance = 2
5151
5252 let nMetricIdxReserve = 3
5353
5454 let nMetricIdxReserveInUsdn = 4
5555
5656 let nMetricIdxUsdnSupply = 5
5757
5858 let nMetricIdxSurplus = 6
5959
6060 let nMetricIdxSurplusPercent = 7
6161
6262 let nMetricIdxBR = 8
6363
6464 let nMetricIdxNsbtSupply = 9
6565
6666 let nMetricIdxMaxNsbtSupply = 10
6767
6868 let nMetricIdxSurfSupply = 11
6969
7070 let nMetricUsdnUsdtPeg = 12
7171
7272 let nMetricCurrentPriceAdj = 13
7373
7474 let nMetricBasketInfo = 14
7575
7676 func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
7777
7878
7979 func keySwapAmountAParam () = "%s%s__config__swapAParam"
8080
8181
8282 func keySwapAmountBParam () = "%s%s__config__swapBParam"
8383
8484
8585 func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam"
8686
8787
8888 func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam"
8989
9090
9191 func keyPriceAdjMinCoeff () = "%s%s__priceAdj__minCoefficient"
9292
9393
9494 func keyPriceAdjArbRegulator () = "%s%s__priceAdj__arbRegulator"
9595
9696
9797 func keyNeutrinoAssetId () = "neutrino_asset_id"
9898
9999
100100 func keyNsbtAssetId () = "bond_asset_id"
101101
102102
103103 func keySurfAssetId () = "surf_asset_id"
104104
105105
106106 func swapsTimeframeKEY () = "swaps_timeframe"
107107
108108
109109 func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP)
110110
111111
112112 func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP)
113113
114114
115115 func basketAssetsKey () = "%s%s__common__basketAssets"
116116
117117
118118 func keyPrice () = "price"
119119
120120
121121 func keyPriceByAsset (assetId) = ("%s%s%s__common__priceByAsset__" + assetId)
122122
123123
124124 let RpdBalanceKey = "rpd_balance"
125125
126126 func rpdUserBalanceKey (owner,assetId) = makeString([RpdBalanceKey, assetId, owner], "_")
127127
128128
129129 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
130130
131131
132132 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
133133
134134
135135 func getNumberByKey (address,key) = valueOrElse(getInteger(address, key), 0)
136136
137137
138138 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
139139
140140
141141 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
142142
143143
144144 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
145145
146146
147147 func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult))
148148
149149
150150 func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16))
151151
152152
153153 func asAnyList (val) = match val {
154154 case valAnyLyst: List[Any] =>
155155 valAnyLyst
156156 case _ =>
157157 throw("fail to cast into List[Any]")
158158 }
159159
160160
161161 func asInt (val) = match val {
162162 case valInt: Int =>
163163 valInt
164164 case _ =>
165165 throw("fail to cast into Int")
166166 }
167167
168168
169169 func asString (val) = match val {
170170 case valStr: String =>
171171 valStr
172172 case _ =>
173173 throw("fail to cast into String")
174174 }
175175
176176
177177 func asPriceSTRUCT (v) = match v {
178178 case struct: (Int, Int, Int, Int) =>
179179 struct
180180 case _ =>
181181 throw("fail to cast into PriceSTRUCT")
182182 }
183183
184184
185185 let IdxControlCfgNeutrinoDapp = 1
186186
187187 let IdxControlCfgAuctionDapp = 2
188188
189189 let IdxControlCfgRpdDapp = 3
190190
191191 let IdxControlCfgMathDapp = 4
192192
193193 let IdxControlCfgLiquidationDapp = 5
194194
195195 let IdxControlCfgRestDapp = 6
196196
197197 let IdxControlCfgNodeRegistryDapp = 7
198198
199199 let IdxControlCfgNsbtStakingDapp = 8
200200
201201 let IdxControlCfgMediatorDapp = 9
202202
203203 let IdxControlCfgSurfStakingDapp = 10
204204
205205 let IdxControlCfgGnsbtControllerDapp = 11
206206
207207 let IdxControlCfgRestV2Dapp = 12
208208
209209 let IdxControlCfgGovernanceDapp = 13
210210
211211 let IdxControlCfgPegProviderDapp = 14
212212
213213 func keyControlAddress () = "%s%s__config__controlAddress"
214214
215215
216216 func keyControlCfg () = "%s__controlConfig"
217217
218218
219219 func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
220220
221221
222222 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
223223
224224
225225 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
226226
227227 let controlCfg = readControlCfgOrFail(controlContract)
228228
229229 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
230230
231231 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
232232
233233 let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp)
234234
235235 let usdnStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp)
236236
237237 let pegProviderContract = getContractAddressOrFail(controlCfg, IdxControlCfgPegProviderDapp)
238238
239239 let neutrinoAssetIdStr = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
240240
241241 let neutrinoAssetId = fromBase58String(neutrinoAssetIdStr)
242242
243243 let nsbtAssetId = fromBase58String(getStringValue(neutrinoContract, keyNsbtAssetId()))
244244
245245 let surfAssetId = fromBase58String(getStringValue(auctionContract, keySurfAssetId()))
246246
247247 func keyBalanceLocked () = "balance_lock_"
248248
249249
250250 func totalLockedKEY (swapType,assetId) = makeString(["%s%s%s", "balanceLock", swapType, assetId], SEP)
251251
252252
253253 func keyTokenLockedBalance (assetId) = totalLockedKEY("outNeutrino", assetId)
254254
255255
256256 func keyNeutrinoLockedBalance () = totalLockedKEY("outMulti", neutrinoAssetIdStr)
257257
258258
259259 func keyOldNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
260260
261261
262262 func keyOldWavesLockedBalance () = (keyBalanceLocked() + "waves")
263263
264264
265265 func calcUsdnOutOfMarketSupply () = {
266266 let outOfMarketAddressList = valueOrElse(getString(controlContract, "%s%s__control__outOfMarketAddressList"), "")
267267 if ((outOfMarketAddressList == ""))
268268 then 0
269269 else {
270270 func balancesSUM (outOfMarketSupply,nextAddress) = ((outOfMarketSupply + valueOrElse(getInteger(usdnStakingContract, rpdUserBalanceKey(nextAddress, neutrinoAssetIdStr)), 0)) + assetBalance(addressFromStringValue(nextAddress), neutrinoAssetId))
271271
272272 let $l = split(outOfMarketAddressList, SEP)
273273 let $s = size($l)
274274 let $acc0 = 0
275275 func $f0_1 ($a,$i) = if (($i >= $s))
276276 then $a
277277 else balancesSUM($a, $l[$i])
278278
279279 func $f0_2 ($a,$i) = if (($i >= $s))
280280 then $a
281281 else throw("List size exceeds 7")
282282
283283 $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)
284284 }
285285 }
286286
287287
288288 func readCurrentAvgPeg () = asPriceSTRUCT(invoke(pegProviderContract, "price", [4], nil))._2
289289
290290
291291 func adjustPrice (priceX6,usdnUsdtPegX6) = {
292292 let minCoeffX6 = valueOrElse(getInteger(this, keyPriceAdjMinCoeff()), 600000)
293293 let arbRegulatorX6 = valueOrElse(getInteger(this, keyPriceAdjArbRegulator()), 150000)
294294 let maxPriceCoeffX6 = max([minCoeffX6, fraction((MULT6 + arbRegulatorX6), usdnUsdtPegX6, MULT6)])
295295 let priceCoeffX6 = min([maxPriceCoeffX6, MULT6])
296296 fraction(priceX6, MULT6, priceCoeffX6)
297297 }
298298
299299
300300 let currentPrice = getIntegerValue(controlContract, keyPrice())
301301
302302 let usdnUsdtPegX6 = readCurrentAvgPeg()
303303
304304 let currentPriceAdj = adjustPrice(currentPrice, usdnUsdtPegX6)
305305
306306 let neutrinoLockedBalance = (valueOrElse(getInteger(neutrinoContract, keyOldNeutrinoLockedBalance()), 0) + valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0))
307307
308308 let wavesLockedBalance = (valueOrElse(getInteger(neutrinoContract, keyOldWavesLockedBalance()), 0) + valueOrElse(getInteger(neutrinoContract, keyTokenLockedBalance("WAVES")), 0))
309309
310310 func reserve (assetId) = {
311311 let tempAssetId = fromBase58String(assetId)
312312 if ((tempAssetId == WAVESID))
313313 then (wavesBalance(neutrinoContract).regular - wavesLockedBalance)
314314 else (assetBalance(neutrinoContract, tempAssetId) - valueOrElse(getInteger(neutrinoContract, keyTokenLockedBalance(assetId)), 0))
315315 }
316316
317317
318-func reservesInUsdn (assetId) = {
319- let tempAssetId = fromBase58String(assetId)
318+func reservesInUsd (assetId) = {
320319 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)
327322 }
328323
329324
330325 let neutrinoOutOfMarketSupply = calcUsdnOutOfMarketSupply()
331326
332327 let neutrinoTotalSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
333328
334329 let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply)
335330
336331 func getBR () = {
337- let basket = split(valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES"), SEP)
338- func addBr (acc,assetId) = (acc + fraction(reservesInUsdn(assetId), MULT6, neutrinoSupply))
332+ let basket = split(value(getString(neutrinoContract, basketAssetsKey())), SEP)
333+ func addBr (acc,assetId) = (acc + reservesInUsd(assetId))
339334
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])
346342
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")
350346
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)
352350 }
353351
354352
355353 let BR = if ((neutrinoSupply == 0))
356354 then 0
357355 else getBR()
358356
359357 func getBasketInfo () = {
360- let basketAssets = valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES")
358+ let basketAssets = value(getString(neutrinoContract, basketAssetsKey()))
361359 let basket = split(basketAssets, SEP)
362360 func weightCalc (acc,assetId) = {
363361 let vol = reserve(assetId)
364- let pr = valueOrElse(getInteger(controlContract, keyPriceByAsset(assetId)), MULT6)
362+ let pr = value(getInteger(controlContract, keyPriceByAsset(assetId)))
365363 let resU = fraction(vol, pr, MULT8)
366364 $Tuple2((acc._1 :+ $Tuple4(assetId, vol, resU, pr)), (acc._2 + resU))
367365 }
368366
369367 let t = {
370368 let $l = basket
371369 let $s = size($l)
372370 let $acc0 = $Tuple2(nil, 0)
373371 func $f0_1 ($a,$i) = if (($i >= $s))
374372 then $a
375373 else weightCalc($a, $l[$i])
376374
377375 func $f0_2 ($a,$i) = if (($i >= $s))
378376 then $a
379377 else throw("List size exceeds 10")
380378
381379 $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)
382380 }
383381 func combine (acc,item) = {
384382 let share = if ((t._2 == 0))
385383 then MULT6
386384 else fraction(item._3, MULT6, t._2)
387385 (acc :+ makeString([item._1, toString(share), toString(item._4), toString(item._2)], ":"))
388386 }
389387
390388 let weightedPrice = if ((neutrinoSupply == 0))
391389 then 0
392390 else fraction(t._2, MULT6, neutrinoSupply)
393391 $Tuple3(makeString({
394392 let $l = t._1
395393 let $s = size($l)
396394 let $acc0 = nil
397395 func $f1_1 ($a,$i) = if (($i >= $s))
398396 then $a
399397 else combine($a, $l[$i])
400398
401399 func $f1_2 ($a,$i) = if (($i >= $s))
402400 then $a
403401 else throw("List size exceeds 10")
404402
405403 $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)
406404 }, "_"), weightedPrice, t._2)
407405 }
408406
409407
410408 @Callable(i)
411409 func constructorV1 (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this))
412410 then throw("not authorized")
413411 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)]
414412
415413
416414
417415 @Callable(i)
418416 func calcSwapLimitREADONLY (gNsbtAmount) = {
419417 let limitBasketTokenInUsd = if ((0 >= gNsbtAmount))
420418 then 0
421419 else {
422420 let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam()))
423421 let bParamX16 = toBigInt(getIntOrFail(this, keySwapAmountBParam()))
424422 let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING)
425423 toInt(fraction(aParamX8, powPartX8, MULTX10))
426424 }
427425 let limitUsdn = if ((0 >= gNsbtAmount))
428426 then 0
429427 else {
430428 let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam()))
431429 let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam()))
432430 let brX6 = toBigInt(BR)
433431 let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING)
434432 toInt(fraction(fraction(aParamX8, powPartX8, MULTX10), brX6, MULTX6))
435433 }
436434 $Tuple2(nil, [limitBasketTokenInUsd, 0, limitUsdn])
437435 }
438436
439437
440438
441439 @Callable(i)
442440 func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = {
443441 let EXP = toBigInt(2718281)
444442 let EXPSCALE = 6
445443 let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3)
446444 let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10))
447445 let wReservesInUsdn = convertWavesToNeutrino(wRaw, price)
448446 let multBR = fraction(wReservesInUsdn, MULT8, uRaw)
449447 if ((multBR > 10678564816))
450448 then throw((("BR=" + toString(multBR)) + " > 10678.564816% will overflow exponent"))
451449 else {
452450 let multPower = (a * (multBR - MULT8))
453451 let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN)
454452 let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6)
455453 $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)])
456454 }
457455 }
458456
459457
460458
461459 @Callable(i)
462460 func curveFunctionREADONLY (wavesPayRaw) = {
463461 let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil))
464462 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
465463 let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve])
466464 let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply])
467465 let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply])
468466 let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply])
469467 let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil))
470468 let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr]))
471469 let usdnPay = convertWavesToNeutrino(wavesPayRaw, price)
472470 let bigMaxNsbtSupply = toBigInt(mRaw)
473471 let bigNsbtSupply = toBigInt((mRaw - sRaw))
474472 let step1 = fraction(toBigInt(usdnPay), MULTX16, multK)
475473 let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply)
476474 let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply)))
477475 let nsbtAmountRaw = ((mRaw - sRaw) - step3)
478476 $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])
479477 }
480478
481479
482480
483481 @Callable(i)
484482 func surfFunctionREADONLY (amount,assetId) = if ((0 > amount))
485483 then throw("amount should be positive")
486484 else {
487485 let price = currentPrice
488486 let priceBig = toBigInt(price)
489487 let reserveW = reserve("WAVES")
490488 let reserveBig = toBigInt(reserveW)
491489 let supply = neutrinoSupply
492490 let supplyBig = toBigInt(supply)
493491 if ((BR >= MULT6))
494492 then throw((("BR = " + toString(BR)) + ", cannot buy SURF"))
495493 else {
496494 let maxWavesPay = (fraction(supply, MULT8, price) - reserveW)
497495 let maxUsdnPay = (supply - fraction(reserveW, price, MULT8))
498496 let useAmount = if ((assetId == neutrinoAssetId))
499497 then if ((amount > maxUsdnPay))
500498 then maxUsdnPay
501499 else amount
502500 else if ((assetId == WAVESID))
503501 then if ((amount > maxWavesPay))
504502 then maxWavesPay
505503 else amount
506504 else 0
507505 let amountBig = toBigInt(useAmount)
508506 if ((assetId == neutrinoAssetId))
509507 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])
510508 else if ((assetId == WAVESID))
511509 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])
512510 else throw("Unsupported asset")
513511 }
514512 }
515513
516514
517515
518516 @Callable(i)
519517 func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = {
520518 let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil))
521519 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
522520 let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve])
523521 let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA)
524522 let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA)
525523 let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply])
526524 let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil))
527525 let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr]))
528526 let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw)))
529527 let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16)
530528 let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16)
531529 let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16))
532530 let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price)
533531 $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice])
534532 }
535533
536534
537535
538536 @Callable(i)
539537 func calcNeutinoMetricsREADONLY () = {
540538 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
541539 let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId))
542540 let surfSupply = value(assetInfo(surfAssetId)).quantity
543541 let basketInfo = getBasketInfo()
544- $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve("WAVES"), reservesInUsdn("WAVES"), neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply, usdnUsdtPegX6, currentPriceAdj, basketInfo._1, basketInfo._2, basketInfo._3])
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])
545543 }
546544
547545
548546
549547 @Callable(i)
550548 func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8))
551549
552550
553551
554552 @Callable(i)
555553 func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = {
556554 let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8)
557555 let v = fraction((amount1 + amount2), MULT8, (amount1 + w))
558556 $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8)))
559557 }
560558
561559
562560 @Verifier(tx)
563561 func verify () = {
564562 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP)
565563 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
566564 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
567565 then 1
568566 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
569567 then 1
570568 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
571569 then 1
572570 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
573571 then 2
574572 else 0))
575573 (count >= 3)
576574 }
577575

github/deemru/w8io/026f985 
65.59 ms