tx · C4gLMcgjmiKZU6Dw92dqeHpmv9MSRbSUWqN6s9oVLad8

3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd:  -0.04000000 Waves

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

{ "type": 13, "id": "C4gLMcgjmiKZU6Dw92dqeHpmv9MSRbSUWqN6s9oVLad8", "fee": 4000000, "feeAssetId": null, "timestamp": 1657789452888, "version": 1, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "2kKfYMEACiH6N4p454Cg65kjvWapXG1SCfCpbJ4qudSG2MRgKQ8YQj8LFvSjNuLW27hYMUVCdgs5gDU3VYbbYDV9", "3yZXTce4jfb3sYpaWahYBZmPXcP1zMT2TqXaVPPXp5uh6YV4w92NH4K4X1rzUDzrSQq8o71wikepZrvbbLsHuE1M", "3ks5HtHDVG6rqnm2GCEAMDDUnBG3f7mSwtZa5iz5v7LNQ6QC2QzWRjbC89tATsCPHLwcN7VEK4ffeWXWqukf9U6S" ], "script": "base64:AAIFAAAAAAAAACcIAhIFCgMIAQESBAoCAQESABIAEgMKAQgSABIAEgASABIFCgMBAQQAAABbAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAEAAAAWZ2V0Qm9vbEJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5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zZQAAAAIJAAQdAAAAAgUAAAAPY29udHJvbENvbnRyYWN0AgAAAAwlc19fbXVsdGlzaWcFAAAAE3B1YktleUFkbWluc0xpc3RTdHIFAAAAA1NFUAQAAAAFY291bnQJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAEAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAwkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAMAAAAAAAAAAAIAAAAAAAAAAAAJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAMwLxiG", "chainId": 84, "height": 2139188, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6GA7ucYtfzAXBiimctuFKH6uWuL3YP1fr4PffZPRPWrS Next: 6RZsF65DgtCDhNMdqx7ALk8FrxViNV3WdQcVEpCrftij Diff:
OldNewDifferences
4242
4343 let SEP = "__"
4444
45-let MULT4 = 10000
46-
4745 let MULT6 = 1000000
4846
4947 let MULT8 = 100000000
48+
49+let MULTX10 = toBigInt(10000000000)
50+
51+let MULTX12 = toBigInt(1000000000000)
5052
5153 let MULTX16 = toBigInt(10000000000000000)
5254
361363 then throw((("min " + toString((minWavesAmountSurfBuy / MULT8))) + " WAVES expected"))
362364 else {
363365 let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [amt, pmtAssetId], nil))
366+ let spentWaves = asInt(surfResult[bFuncIdxWaves])
367+ let spentUsdn = asInt(surfResult[bFuncIdxUsdn])
364368 let surfAmount = asInt(surfResult[bFuncIdxSurf])
365- let spendWanted = fraction(averagePriceWanted, surfAmount, if ((pmtAssetId == WAVESID))
366- then MULT4
367- else MULT6)
368- let spentActual = if ((pmtAssetId == WAVESID))
369- then asInt(surfResult[bFuncIdxWaves])
370- else asInt(surfResult[bFuncIdxUsdn])
371- let impactPerc = fraction((spentActual - spendWanted), MULT6, spendWanted)
372- if ((impactPerc > maxTolerancePerc))
373- then throw(((("Tolerance " + toString(maxTolerancePerc)) + " exceeded: ") + toString(impactPerc)))
369+ let surfAmountX6 = toBigInt(surfAmount)
370+ let spentActualX18 = if ((pmtAssetId == WAVESID))
371+ then (toBigInt(spentWaves) * MULTX10)
372+ else (toBigInt(spentUsdn) * MULTX12)
373+ if ((spentActualX18 > ((toBigInt((maxTolerancePerc + MULT6)) * toBigInt(averagePriceWanted)) * surfAmountX6)))
374+ then throw((((((("Tolerance " + toString(maxTolerancePerc)) + " exceeded: spent ") + (if ((pmtAssetId == WAVESID))
375+ then (toString(spentWaves) + " WAVES")
376+ else (toString(spentUsdn) + " USDN"))) + " for ") + toString(surfAmount)) + " SURF"))
374377 else {
375378 let rest = asInt(surfResult[bFuncIdxRest])
376379 let transfer = if ((pmtAssetId == WAVESID))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
55
66
77 func getStringByKey (key) = valueOrElse(getString(this, key), "")
88
99
1010 func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false)
1111
1212
1313 func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "")
1414
1515
1616 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0)
1717
1818
1919 func asAnyList (val) = match val {
2020 case valAnyLyst: List[Any] =>
2121 valAnyLyst
2222 case _ =>
2323 throw("fail to cast into List[Any]")
2424 }
2525
2626
2727 func asString (val) = match val {
2828 case valStr: String =>
2929 valStr
3030 case _ =>
3131 throw("fail to cast into String")
3232 }
3333
3434
3535 func asInt (val) = match val {
3636 case valInt: Int =>
3737 valInt
3838 case _ =>
3939 throw("fail to cast into Int")
4040 }
4141
4242
4343 let SEP = "__"
4444
45-let MULT4 = 10000
46-
4745 let MULT6 = 1000000
4846
4947 let MULT8 = 100000000
48+
49+let MULTX10 = toBigInt(10000000000)
50+
51+let MULTX12 = toBigInt(1000000000000)
5052
5153 let MULTX16 = toBigInt(10000000000000000)
5254
5355 let CANCELED = "canceled"
5456
5557 let NEW = "new"
5658
5759 let FILLED = "filled"
5860
5961 let WAVESID = fromBase58String("WAVES")
6062
6163 let nMetricIdxPrice = 0
6264
6365 let nMetricIdxUsdnLockedBalance = 1
6466
6567 let nMetricIdxWavesLockedBalance = 2
6668
6769 let nMetricIdxReserve = 3
6870
6971 let nMetricIdxReserveInUsdn = 4
7072
7173 let nMetricIdxUsdnSupply = 5
7274
7375 let nMetricIdxSurplus = 6
7476
7577 let nMetricIdxSurplusPercent = 7
7678
7779 let nMetricIdxBR = 8
7880
7981 let nMetricIdxNsbtSupply = 9
8082
8183 let nMetricIdxMaxNsbtSupply = 10
8284
8385 let nMetricIdxSurfSupply = 11
8486
8587 let bFuncIdxSurf = 0
8688
8789 let bFuncIdxWaves = 1
8890
8991 let bFuncIdxUsdn = 2
9092
9193 let bFuncIdxReserveStart = 3
9294
9395 let bFuncIdxSupplyStart = 4
9496
9597 let bFuncIdxBRStart = 5
9698
9799 let bFuncIdxReserveEnd = 6
98100
99101 let bFuncIdxSupplyEnd = 7
100102
101103 let bFuncIdxBREnd = 8
102104
103105 let bFuncIdxRest = 9
104106
105107 let bFuncIdxWavesPrice = 10
106108
107109 let PriceKey = "price"
108110
109111 let NsbtAssetIdKey = "bond_asset_id"
110112
111113 let NeutrinoAssetIdKey = "neutrino_asset_id"
112114
113115 let SurfAssetIdKey = "surf_asset_id"
114116
115117 let BalanceLockedkKey = "balance_lock_"
116118
117119 let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
118120
119121 let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
120122
121123 let FirstOrderKey = "order_first"
122124
123125 let MathContractKey = "math_contract"
124126
125127 let MinWavesForNsbtBuyKey = "min_waves_nsbt_buy"
126128
127129 let MinNsbtSellKey = "min_nsbt_sell"
128130
129131 let MinWavesForSurfBuyKey = "min_waves_surf_buy"
130132
131133 let MinUsdnForSurfBuyKey = "min_usdn_surf_buy"
132134
133135 func getRoiByOrderIdKey (orderId) = ("debug_order_roi_" + orderId)
134136
135137
136138 func getOrderPriceKey (orderId) = ("order_price_" + orderId)
137139
138140
139141 func getOrderTotalKey (orderId) = ("order_total_" + orderId)
140142
141143
142144 func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
143145
144146
145147 func getOrderHeightKey (orderId) = ("order_height_" + orderId)
146148
147149
148150 func getOrderStatusKey (orderId) = ("order_status_" + orderId)
149151
150152
151153 func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
152154
153155
154156 func getPrevOrderKey (orderId) = ("order_prev_" + orderId)
155157
156158
157159 func getNextOrderKey (orderId) = ("order_next_" + orderId)
158160
159161
160162 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
161163
162164
163165 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
164166
165167
166168 func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult))
167169
168170
169171 func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16))
170172
171173
172174 let neutrinoContract = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj')
173175
174176 let controlContract = Address(base58'3MrwvfA9VRYwhHy4NuWPQGdxCtZdhH4LMMa')
175177
176178 let liquidationContract = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N')
177179
178180 let mathContract = addressFromStringValue(getStringByKey(MathContractKey))
179181
180182 let neutrinoAssetId = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
181183
182184 let nsbtAssetId = base58'F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z'
183185
184186 let isBlocked = getBoolByAddressAndKey(controlContract, "is_blocked")
185187
186188 let minWavesAmountNsbtBuy = valueOrElse(getInteger(this, MinWavesForNsbtBuyKey), 1000000000)
187189
188190 let minNsbtSell = valueOrElse(getInteger(this, MinNsbtSellKey), 1000000)
189191
190192 let minWavesAmountSurfBuy = valueOrElse(getInteger(this, MinWavesForSurfBuyKey), 100000000)
191193
192194 let minUsdnAmountSurfBuy = valueOrElse(getInteger(this, MinUsdnForSurfBuyKey), 10000000)
193195
194196 let firstOrder = getStringByKey(FirstOrderKey)
195197
196198 func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id))
197199
198200
199201 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
200202
201203
202204 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
203205
204206
205207 func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
206208
207209
208210 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
209211
210212
211213 func getPrevOrder (id) = getStringByKey(getPrevOrderKey(id))
212214
213215
214216 func getNextOrder (id) = getStringByKey(getNextOrderKey(id))
215217
216218
217219 func getReversePrice (price) = ((MULT6 * MULT6) / price)
218220
219221
220222 func calcNsbt2WavesPriceRaw (spentWavesRaw,receivedNsbtRaw) = fraction(toBigInt(spentWavesRaw), toBigInt((MULT6 * MULT6)), toBigInt(receivedNsbtRaw))
221223
222224
223225 func orderData (orderId,totalWavelets,filledWavelets,owner,status,roi,price,currentPrice) = [StringEntry(getOrderPriceKey(orderId), toString(price)), IntegerEntry(getOrderTotalKey(orderId), totalWavelets), IntegerEntry(getOrderFilledTotalKey(orderId), filledWavelets), StringEntry(getOrderOwnerKey(orderId), owner), IntegerEntry(getOrderHeightKey(orderId), height), StringEntry(getOrderStatusKey(orderId), status), IntegerEntry(("debug_order_currentPrice_" + orderId), currentPrice), IntegerEntry(getRoiByOrderIdKey(orderId), roi)]
224226
225227
226228 func toStr (name,curveResult) = (((((((((((((((((((((((((((((((((((name + "[nsbtAmountRaw=") + toString(asInt(curveResult[0]))) + " usdnPayment=") + toString(asInt(curveResult[1]))) + " wRaw=") + toString(asInt(curveResult[2]))) + " uRaw=") + toString(asInt(curveResult[3]))) + " mRaw=") + toString(asInt(curveResult[4]))) + " sRaw=") + toString(asInt(curveResult[5]))) + " nsbtCurveParam_a=") + toString(asInt(curveResult[6]))) + " nsbtCurveParam_b=") + toString(asInt(curveResult[7]))) + " wReservesInUsdn=") + toString(asInt(curveResult[8]))) + " price=") + toString(asInt(curveResult[9]))) + " multBR=") + toString(asInt(curveResult[10]))) + " multPower=") + toString(asInt(curveResult[11]))) + " multExpInPower=") + asString(curveResult[12])) + " multK=") + asString(curveResult[13])) + " step1=") + asString(curveResult[14])) + " step2=") + asString(curveResult[15])) + " step3=") + toString(asInt(curveResult[16]))) + "]")
227229
228230
229231 func surfData (surfResult) = StringEntry("debug_surfResult", makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(asInt(surfResult[bFuncIdxSurf])), toString(asInt(surfResult[bFuncIdxWaves])), toString(asInt(surfResult[bFuncIdxUsdn])), toString(asInt(surfResult[bFuncIdxReserveStart])), toString(asInt(surfResult[bFuncIdxSupplyStart])), toString(asInt(surfResult[bFuncIdxBRStart])), toString(asInt(surfResult[bFuncIdxReserveEnd])), toString(asInt(surfResult[bFuncIdxSupplyEnd])), toString(asInt(surfResult[bFuncIdxBREnd])), toString(asInt(surfResult[bFuncIdxRest])), toString(asInt(surfResult[bFuncIdxWavesPrice]))], SEP))
230232
231233
232234 @Callable(i)
233235 func constructor (mathContractAddress,minWavesForNsbtBuy,minNsbtSell) = if ((i.caller != this))
234236 then throw("Permission denied")
235237 else [StringEntry(MathContractKey, mathContractAddress), IntegerEntry(MinNsbtSellKey, minNsbtSell), IntegerEntry(MinWavesForNsbtBuyKey, minWavesForNsbtBuy)]
236238
237239
238240
239241 @Callable(i)
240242 func constructorV2 (minWavesForSurfBuyKey,minUsdnForSurfBuyKey) = if ((i.caller != this))
241243 then throw("Permission denied")
242244 else {
243245 let issue = Issue("SURF", "Smart Utility Recapitalization Feature token", 0, 6, true, unit, 0)
244246 let assetId = calculateAssetId(issue)
245247 [issue, StringEntry(SurfAssetIdKey, toBase58String(assetId)), IntegerEntry(MinWavesForSurfBuyKey, minWavesForSurfBuyKey), IntegerEntry(MinUsdnForSurfBuyKey, minUsdnForSurfBuyKey)]
246248 }
247249
248250
249251
250252 @Callable(i)
251253 func buyNsbt () = {
252254 let pmt = value(i.payments[0])
253255 let pmtAmount = pmt.amount
254256 let wavesPay = pmtAmount
255257 if (isBlocked)
256258 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
257259 else if (isDefined(pmt.assetId))
258260 then throw("can use waves only")
259261 else if ((minWavesAmountNsbtBuy > pmtAmount))
260262 then throw((("min " + toString((minWavesAmountNsbtBuy / MULT8))) + " waves expected"))
261263 else {
262264 let ownerAddress = i.caller
263265 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
264266 let currentPrice = asInt(neutrinoMetrics[0])
265267 let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil))
266268 let nsbtAmount = asInt(curveResult[0])
267269 if ((0 >= nsbtAmount))
268270 then throw("nsbtAmount <= 0")
269271 else {
270272 let nsbt2WavesPriceRaw = calcNsbt2WavesPriceRaw(wavesPay, nsbtAmount)
271273 let roi = 0
272274 let amountLeased = invoke(neutrinoContract, "acceptWaves", nil, i.payments)
273275 if ((amountLeased == amountLeased))
274276 then $Tuple2((orderData(toBase58String(i.transactionId), pmtAmount, pmtAmount, toString(ownerAddress), FILLED, roi, nsbt2WavesPriceRaw, currentPrice) ++ [ScriptTransfer(ownerAddress, nsbtAmount, nsbtAssetId), StringEntry("debug_curveResult", toStr("curveResult", curveResult))]), nsbtAmount)
275277 else throw("Strict value is not equal to itself.")
276278 }
277279 }
278280 }
279281
280282
281283
282284 @Callable(i)
283285 func sellNsbt () = if (isBlocked)
284286 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
285287 else {
286288 let pmt = value(i.payments[0])
287289 let pmtAmount = pmt.amount
288290 if ((pmt.assetId != nsbtAssetId))
289291 then throw("can use NSBT only")
290292 else if ((minNsbtSell > pmtAmount))
291293 then throw((("min " + toString((minNsbtSell / MULT6))) + " nsbt expected"))
292294 else {
293295 let newPrice = asInt(asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [-(pmtAmount)], nil))[0])
294296 if ((MULT6 > newPrice))
295297 then throw((("resulting nsbt price would be < 1 (" + toString(newPrice)) + " usdn)"))
296298 else {
297299 let transf = invoke(neutrinoContract, "transferUsdnToUser", [pmtAmount, toString(i.caller)], nil)
298300 if ((transf == transf))
299301 then $Tuple2(nil, newPrice)
300302 else throw("Strict value is not equal to itself.")
301303 }
302304 }
303305 }
304306
305307
306308
307309 @Callable(i)
308310 func cancelOrder (orderId) = {
309311 let owner = getOrderOwner(orderId)
310312 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
311313 let caller = toString(i.caller)
312314 let nextOrder = getNextOrder(orderId)
313315 let prevOrder = getPrevOrder(orderId)
314316 if ((getOrderStatus(orderId) != NEW))
315317 then throw("invalid order status")
316318 else [StringEntry(FirstOrderKey, if ((firstOrder == orderId))
317319 then nextOrder
318320 else firstOrder), StringEntry(getNextOrderKey(prevOrder), nextOrder), StringEntry(getPrevOrderKey(nextOrder), prevOrder), StringEntry(getOrderStatusKey(orderId), CANCELED), ScriptTransfer(i.caller, amount, unit)]
319321 }
320322
321323
322324
323325 @Callable(i)
324326 func minWavesAmountNsbtBuySYSREADONLY () = $Tuple2(nil, minWavesAmountNsbtBuy)
325327
326328
327329
328330 @Callable(i)
329331 func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, minNsbtSell)
330332
331333
332334
333335 @Callable(i)
334336 func minWavesAmountSurfBuySYSREADONLY () = $Tuple2(nil, minWavesAmountSurfBuy)
335337
336338
337339
338340 @Callable(i)
339341 func minUsdnAmountSurfBuySYSREADONLY () = $Tuple2(nil, minUsdnAmountSurfBuy)
340342
341343
342344
343345 @Callable(i)
344346 func buySurf (averagePriceWanted,maxTolerancePerc,autoStake) = if ((size(i.payments) != 1))
345347 then throw("exactly 1 payment must be attached")
346348 else {
347349 let pmt = i.payments[0]
348350 let amt = pmt.amount
349351 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
350352 if (if ((pmtAssetId != neutrinoAssetId))
351353 then (pmtAssetId != WAVESID)
352354 else false)
353355 then throw("Unsupported payment asset")
354356 else if (if ((pmtAssetId == neutrinoAssetId))
355357 then (minUsdnAmountSurfBuy > amt)
356358 else false)
357359 then throw((("min " + toString((minUsdnAmountSurfBuy / MULT6))) + " USDN expected"))
358360 else if (if ((pmtAssetId == WAVESID))
359361 then (minWavesAmountSurfBuy > amt)
360362 else false)
361363 then throw((("min " + toString((minWavesAmountSurfBuy / MULT8))) + " WAVES expected"))
362364 else {
363365 let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [amt, pmtAssetId], nil))
366+ let spentWaves = asInt(surfResult[bFuncIdxWaves])
367+ let spentUsdn = asInt(surfResult[bFuncIdxUsdn])
364368 let surfAmount = asInt(surfResult[bFuncIdxSurf])
365- let spendWanted = fraction(averagePriceWanted, surfAmount, if ((pmtAssetId == WAVESID))
366- then MULT4
367- else MULT6)
368- let spentActual = if ((pmtAssetId == WAVESID))
369- then asInt(surfResult[bFuncIdxWaves])
370- else asInt(surfResult[bFuncIdxUsdn])
371- let impactPerc = fraction((spentActual - spendWanted), MULT6, spendWanted)
372- if ((impactPerc > maxTolerancePerc))
373- then throw(((("Tolerance " + toString(maxTolerancePerc)) + " exceeded: ") + toString(impactPerc)))
369+ let surfAmountX6 = toBigInt(surfAmount)
370+ let spentActualX18 = if ((pmtAssetId == WAVESID))
371+ then (toBigInt(spentWaves) * MULTX10)
372+ else (toBigInt(spentUsdn) * MULTX12)
373+ if ((spentActualX18 > ((toBigInt((maxTolerancePerc + MULT6)) * toBigInt(averagePriceWanted)) * surfAmountX6)))
374+ then throw((((((("Tolerance " + toString(maxTolerancePerc)) + " exceeded: spent ") + (if ((pmtAssetId == WAVESID))
375+ then (toString(spentWaves) + " WAVES")
376+ else (toString(spentUsdn) + " USDN"))) + " for ") + toString(surfAmount)) + " SURF"))
374377 else {
375378 let rest = asInt(surfResult[bFuncIdxRest])
376379 let transfer = if ((pmtAssetId == WAVESID))
377380 then {
378381 let wavesAmt = invoke(neutrinoContract, "acceptWaves", nil, [AttachedPayment(unit, (amt - rest))])
379382 if ((wavesAmt == wavesAmt))
380383 then if ((rest > 0))
381384 then [ScriptTransfer(i.caller, rest, unit)]
382385 else nil
383386 else throw("Strict value is not equal to itself.")
384387 }
385388 else if ((rest > 0))
386389 then [ScriptTransfer(neutrinoContract, (amt - rest), neutrinoAssetId), ScriptTransfer(i.caller, rest, neutrinoAssetId)]
387390 else [ScriptTransfer(neutrinoContract, (amt - rest), neutrinoAssetId)]
388391 let surfAssetId = fromBase58String(getStringValue(SurfAssetIdKey))
389392 (transfer ++ [Reissue(surfAssetId, surfAmount, true), ScriptTransfer(i.caller, surfAmount, surfAssetId), surfData(surfResult)])
390393 }
391394 }
392395 }
393396
394397
395398 @Verifier(tx)
396399 func verify () = {
397400 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"], SEP)
398401 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
399402 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
400403 then 1
401404 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
402405 then 1
403406 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
404407 then 1
405408 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
406409 then 2
407410 else 0))
408411 (count >= 3)
409412 }
410413

github/deemru/w8io/026f985 
60.73 ms