tx · 57xZ5sAwE2oMQRkdo2E2Y75mBvQgL8uRdSo1AY2Jh8Ha

3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi:  -0.04000000 Waves

2022.07.14 12:03 [2139188] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves

{ "type": 13, "id": "57xZ5sAwE2oMQRkdo2E2Y75mBvQgL8uRdSo1AY2Jh8Ha", "fee": 4000000, "feeAssetId": null, "timestamp": 1657789451657, "version": 1, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "2FiqWDPj9xYvmz5CQDwHiCpWrbEB7gpwj65EbGEHA4pdqKetMrBreAhqWaW2k52YBmByUXkBpUZwG3mNMbAqr77F", "ZTckFL97KDntL8fsau3V8HfQqK2KhCphY8jdy2eN6SmKB3tvksdSGwAEhv1s5xh4qFpCR4eVypgUSeiuh1Dnaaf", "23UAdT58EEQHZb7KwTchgN6bDG4h5eruHfR1PHyfFHMmrxXMur41ADmRAFXnQ9ydgVHv8RmtzoqRWajEgYqjBN1e" ], "script": "base64:AAIFAAAAAAAAADkIAhIFCgMICAESAwoBARIHCgUBAQEBARIDCgEBEgQKAgECEgMKAQESABIFCgMBAQESBwoFAQEBAQEAAABDAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAB1NDQUxFMTYAAAAAAAAAABAAAAAAA1NFUAIAAAACX18AAAAABUhBTEY4AAAAAAAC+vCAAAAAAAhFVUxFUlgxNgkAATYAAAABAABgkqET2NV0AAAAAARUV09YCQABNgAAAAEAAAAAAAAAAAIAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9eEAAAAAA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QAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAACAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAMJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAADAAAAAAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAAD3ilNDQ==", "chainId": 84, "height": 2139188, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FhW45equbmDZzSx5nXe3mk14NZi12LeWRqUNG3Bv2ZnZ Next: 5s3GhKTTrHxDhaSRzxDtkSrN7LvTeiwxTtxqK9rRqfG5 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 func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
7171
7272
7373 func keySwapAmountAParam () = "%s%s__config__swapAParam"
7474
7575
7676 func keySwapAmountBParam () = "%s%s__config__swapBParam"
7777
7878
7979 func keyNeutrinoAssetId () = "neutrino_asset_id"
8080
8181
8282 func keyLiquidationContractAddress () = "liquidation_contract"
8383
8484
8585 func keyAuctionContract () = "auction_contract"
8686
8787
8888 func keyContolContract () = "control_contract"
8989
9090
9191 func keyNsbtAssetId () = "bond_asset_id"
9292
9393
9494 func keySurfAssetId () = "surf_asset_id"
9595
9696
9797 func keyBalanceLocked () = "balance_lock_"
9898
9999
100100 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
101101
102102
103103 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
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 keyPrice () = "price"
116116
117117
118118 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
119119
120120
121121 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
122122
123123
124124 func getNumberByKey (address,key) = valueOrElse(getInteger(address, key), 0)
125125
126126
127127 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
128128
129129
130130 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
131131
132132
133133 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
134134
135135
136136 func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult))
137137
138138
139139 func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16))
140140
141141
142142 func asAnyList (val) = match val {
143143 case valAnyLyst: List[Any] =>
144144 valAnyLyst
145145 case _ =>
146146 throw("fail to cast into List[Any]")
147147 }
148148
149149
150150 func asInt (val) = match val {
151151 case valInt: Int =>
152152 valInt
153153 case _ =>
154154 throw("fail to cast into Int")
155155 }
156156
157157
158158 func asString (val) = match val {
159159 case valStr: String =>
160160 valStr
161161 case _ =>
162162 throw("fail to cast into String")
163163 }
164164
165165
166166 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
167167
168168 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
169169
170170 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
171171
172172 let liquidationContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyLiquidationContractAddress()))
173173
174174 let neutrinoAssetId = fromBase58String(getStringOrFail(neutrinoContract, keyNeutrinoAssetId()))
175175
176176 let nsbtAssetId = fromBase58String(getStringValue(neutrinoContract, keyNsbtAssetId()))
177177
178178 let surfAssetId = fromBase58String(getStringValue(auctionContract, keySurfAssetId()))
179179
180180 @Callable(i)
181181 func constructor (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this))
182182 then throw("not authorized")
183183 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)]
184184
185185
186186
187187 @Callable(i)
188188 func calcSwapLimitREADONLY (gNsbtAmount) = {
189189 let limitParamA = toBigInt(getIntOrFail(this, keySwapAmountAParam()))
190190 let limitParamB = toBigInt(getIntOrFail(this, keySwapAmountBParam()))
191191 let gNsbtAmountScale16 = toX16(gNsbtAmount, MULT6)
192192 let limitPowPart = pow(gNsbtAmountScale16, 16, limitParamB, 16, 8, CEILING)
193193 let limit = fraction(limitParamA, limitPowPart, MULTX10)
194194 $Tuple2(nil, toInt(limit))
195195 }
196196
197197
198198
199199 @Callable(i)
200200 func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = {
201201 let EXP = toBigInt(2718281)
202202 let EXPSCALE = 6
203203 let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3)
204204 let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10))
205205 let wReservesInUsdn = convertWavesToNeutrino(wRaw, price)
206206 let multBR = fraction(wReservesInUsdn, MULT8, uRaw)
207207 if ((multBR > 10678564816))
208208 then throw("BR > 10678.564816% will overflow exponent")
209209 else {
210210 let multPower = (a * (multBR - MULT8))
211211 let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN)
212212 let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6)
213213 $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)])
214214 }
215215 }
216216
217217
218218
219219 @Callable(i)
220220 func curveFunctionREADONLY (wavesPayRaw) = {
221221 let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil))
222222 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
223223 let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve])
224224 let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply])
225225 let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply])
226226 let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply])
227227 let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil))
228228 let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr]))
229229 let usdnPay = convertWavesToNeutrino(wavesPayRaw, price)
230230 let bigMaxNsbtSupply = toBigInt(mRaw)
231231 let bigNsbtSupply = toBigInt((mRaw - sRaw))
232232 let step1 = fraction(toBigInt(usdnPay), MULTX16, multK)
233233 let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply)
234234 let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply)))
235235 let nsbtAmountRaw = ((mRaw - sRaw) - step3)
236236 $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])
237237 }
238238
239239
240240
241241 @Callable(i)
242242 func surfFunctionREADONLY (amount,assetId) = {
243243 let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil))
244244 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
245245 let priceBig = toBigInt(price)
246246 let reserve = asInt(neutrinoMetrics[nMetricIdxReserve])
247247 let reserveBig = toBigInt(reserve)
248248 let supply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply])
249249 let supplyBig = toBigInt(supply)
250250 let BR = asInt(neutrinoMetrics[nMetricIdxBR])
251251 if ((BR >= MULT6))
252252 then throw((("BR = " + toString(BR)) + ", cannot buy SURF"))
253253 else {
254254 let maxWavesPay = (fraction(supply, MULT8, price) - reserve)
255255 let maxUsdnPay = (supply - fraction(reserve, price, MULT8))
256256 let useAmount = if ((assetId == neutrinoAssetId))
257257 then if ((amount > maxUsdnPay))
258258 then maxUsdnPay
259259 else amount
260260 else if ((assetId == WAVESID))
261261 then if ((amount > maxWavesPay))
262262 then maxWavesPay
263263 else amount
264264 else 0
265265 let amountBig = toBigInt(useAmount)
266266 if ((assetId == neutrinoAssetId))
267267 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])
268268 else if ((assetId == WAVESID))
269269 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])
270270 else throw("Unsupported asset")
271271 }
272272 }
273273
274274
275275
276276 @Callable(i)
277277 func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = {
278278 let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil))
279279 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
280280 let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve])
281281 let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA)
282282 let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA)
283283 let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply])
284284 let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil))
285285 let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr]))
286286 let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw)))
287287 let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16)
288288 let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16)
289289 let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16))
290290 let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price)
291291 $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice])
292292 }
293293
294294
295295
296296 @Callable(i)
297297 func calcNeutinoMetricsREADONLY () = {
298298 let currentPrice = getIntegerValue(controlContract, keyPrice())
299299 let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0)
300300 let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0)
301301 let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance)
302302 let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice)
303303 let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
304304 let surplus = (reservesInUsdn - neutrinoSupply)
305305 let deficit = (neutrinoSupply - reservesInUsdn)
306306 let surplusPercent = if ((neutrinoSupply == 0))
307307 then 0
308308 else (fraction(surplus, MULT6, neutrinoSupply) * 100)
309309 let BR = if ((neutrinoSupply == 0))
310310 then 0
311311 else fraction(reservesInUsdn, MULT6, neutrinoSupply)
312312 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
313313 let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId))
314314 let surfSupply = value(assetInfo(surfAssetId)).quantity
315315 $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, surplus, surplusPercent, BR, nsbtSupply, nsbtSupplyMAX, surfSupply])
316316 }
317317
318318
319319
320320 @Callable(i)
321321 func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8))
322322
323323
324324
325325 @Callable(i)
326326 func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = {
327327 let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8)
328328 let v = fraction((amount1 + amount2), MULT8, (amount1 + w))
329329 $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8)))
330330 }
331331
332332
333333 @Verifier(tx)
334334 func verify () = {
335335 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"], SEP)
336336 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
337337 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
338338 then 1
339339 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
340340 then 1
341341 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
342342 then 1
343343 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
344344 then 2
345345 else 0))
346346 (count >= 3)
347347 }
348348

github/deemru/w8io/026f985 
39.31 ms