tx · AQJ7Zrp7GS9nYjJoXJfZVRRgRfHBTmufx9EeaeUXLaov

3N9be2mwrA52WJho6DiesZkk4351GvpnWuj:  -0.04200000 Waves

2023.03.28 07:49 [2509345] smart account 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj > SELF 0.00000000 Waves

{ "type": 13, "id": "AQJ7Zrp7GS9nYjJoXJfZVRRgRfHBTmufx9EeaeUXLaov", "fee": 4200000, "feeAssetId": null, "timestamp": 1679979001827, "version": 2, "chainId": 84, "sender": "3N9be2mwrA52WJho6DiesZkk4351GvpnWuj", "senderPublicKey": "6mzmbCza9iqbzxMEELcEA4Xc9NeF4CYpbTtz1zMK3C7x", "proofs": [ "3oZ6ULgtdnLZsrRtW1ApQRgnv3YBAwLKUKqp7FWGqSkUQ9tQSxJMrTTTy5PSHFVw9sXEDu8cS464iGyyBNg1CtC5", "4kW9SEFaQi4tC3GHppiCJZxzf5zb6ZGHBhEWGNwoUy7Ks8DBjiWeaJxoonABDmSHwxS67QRBmZpxz1k8dBMcXXDr", "3DJhe1nHoGW82Z1WJ3LoGpLEcPoLCpQD9F6xTBPFH6r8jqnuJEHoSpCHXMxuABDnP6yHPNq3zyFTTMmexNvn6gxb" ], "script": "base64:BgJjCAISDgoMCAgICAgIAQEBAQEBEgUKAwgIARIHCgUYAQEBARIAEgASBAoCCAESBQoDCAEIEgMKAQESBAoCAQgSABIFCgMIAQESBAoCAQESBAoCCAESBgoECAEBCBIGCgQICAEBuAEBD2dldFN0cmluZ09yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuCQDMCAIFA2tleQkAzAgCAg8gaXMgbm90IGRlZmluZWQFA25pbAIAAQVsY2FsYwEBbAkAuQgBBQFsAQ5nZXROdW1iZXJCeUtleQEDa2V5CQELdmFsdWVPckV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ktleUFkbWluc0xpc3QAAgABAAADCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwADCQDZBAEJAJEDAgUQcHViS2V5QWRtaW5zTGlzdAADAAIAAAMDBQlpc0Jsb2NrZWQJAAACCQERQGV4dHJOYXRpdmUoMTA1MykCBQ9jb250cm9sQ29udHJhY3QCEWlzX2Jsb2NrZWRfY2FsbGVyCQClCAEFC2dvdkNvbnRyYWN0BwkBDnZhbGlkYXRlVXBkYXRlAQUCdHgEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACFVNwb25zb3JGZWVUcmFuc2FjdGlvbgQJc3BvbnNvclR4BQckbWF0Y2gwAwkBG2NoZWNrSXNWYWxpZE1pblNwb25zb3JlZEZlZQEFCXNwb25zb3JUeAkAZwIFBWNvdW50AAMHCQBnAgUFY291bnQAAxDUBcM=", "height": 2509345, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5SCn7iV7KEbqt5TrKx39Kxsox49yM92aEtpL1qhmD3Ag Next: AvNrG9CVaJFj6kotychDAMghmhwuteNvXQXQompHiRyE Diff:
OldNewDifferences
8282 let MULT6 = 1000000
8383
8484 let DEFAULTSWAPFEE = 20000
85+
86+let DEFAULTBURNFEE = 5000
87+
88+let DEFAULTMAXFEE = 150000
8589
8690 let BRPROTECTED = 100000
8791
210214
211215 let WavesOutFeePartKey = "wavesOut_swap_feePart"
212216
217+let BasketOutFeePartKey = "multiOut_swap_feePart"
218+
213219 func keyNodeRegistry (address) = ("%s__" + address)
214220
215221
296302 func keyPriceByAsset (assetId) = ("%s%s%s__common__priceByAsset__" + assetId)
297303
298304
305+func maxFeeKey () = "%s%s__common__maxAllowedFee"
306+
307+
308+func multiOutFeeREAD () = valueOrElse(getInteger(BasketOutFeePartKey), valueOrElse(getInteger(WavesOutFeePartKey), DEFAULTBURNFEE))
309+
310+
299311 func minSwapAmountREAD (swapType,assetId) = if ((swapType == "outMulti"))
300312 then valueOrElse(getInteger(MinNeutrinoSwapAmountKey), getNumberByKey(LegacyMinNeutrinoSwapAmountKey))
301313 else getNumberByKey(MinTokenSwapAmountKey(assetId))
370382 then MULT8
371383 else (neutrinoPrice * 100))
372384 let multiplier = ((MULT6 + d6) - pp6)
373- let netAmount = fraction(outAmountGross, multiplier, MULT6)
374- let feeAmount = if ((netAmount >= outAmountGross))
375- then 0
376- else (outAmountGross - netAmount)
377-[outAmountGross, netAmount, feeAmount]
385+ if ((0 >= multiplier))
386+ then throw(("Non-positive multiplier = " + toString(multiplier)))
387+ else {
388+ let discounted = fraction(outAmountGross, multiplier, MULT6)
389+ let masterFee = valueOrElse(getInteger(NeutrinoOutFeePartKey), DEFAULTSWAPFEE)
390+ let feeAmount = fraction(discounted, masterFee, MULT6)
391+[discounted, (discounted - feeAmount), feeAmount, multiplier]
392+ }
378393 }
379394
380395
381396 func convertNeutrinoToBasket (amount,basketInfoStr,neutrinoSupply) = {
382397 let basketInfo = split_4C(basketInfoStr, "_")
398+ let k6 = value(getInteger(basketKKey()))
399+ let d6 = value(getInteger(basketDKey()))
400+ let outPart = (MULT6 - fraction(k6, d6, MULT6))
383401 func conv (acc,item) = {
384402 let parts = split(item, LISTSEP)
385403 let assetId = parts[0]
389407 if ((neutrinoSupply == 0))
390408 then throw("Attempt to burn neutrino at zero supply")
391409 else {
392- let outAmount = fraction(amount, reserv, neutrinoSupply)
410+ let outAmount = fraction(fraction(amount, reserv, neutrinoSupply), outPart, MULT6)
393411 let wavesTuple = if ((assetId == "WAVES"))
394412 then $Tuple2(outAmount, price)
395413 else $Tuple2(acc._2, acc._3)
504522
505523
506524 func applyFeesBasket (basketOut) = {
507- let k6 = value(getInteger(basketKKey()))
508- let d6 = value(getInteger(basketDKey()))
509- let feePart = fraction(k6, d6, MULT6)
525+ let feePart = multiOutFeeREAD()
510526 func feeApplier (acc,item) = {
511527 let feeAmount = fraction(item._2, feePart, MULT6)
512528 (acc :+ makeString([item._1, toString(item._3), toString((item._2 - feeAmount)), toString(feeAmount), toString(item._4)], LISTSEP))
627643 let basketInfo = asString(neutrinoMetrics[nMetricBasketInfo])
628644 let weightedPrice = asInt(neutrinoMetrics[nMetricWeightedPrice])
629645 let out = convertBasketItemToNeutrino(pmtAmount, inAsset, basketInfo, weightedPrice)
646+ let maxFee = valueOrElse(getInteger(maxFeeKey()), DEFAULTMAXFEE)
630647 if (if ((swapType == "outNeutrino"))
631- then (0 >= out[1])
648+ then ((MULT6 - maxFee) > out[3])
632649 else false)
633- then throw((((((("Net amount is non-positive, cannot swap. (gross, net, fee) = (" + toString(out[0])) + ", ") + toString(out[1])) + ", ") + toString(out[2])) + ")"))
650+ then throw(("Max allowed fee exceeded, multiplier = " + toString(out[3])))
634651 else {
635652 let leasePart = if (if ((swapType == "outNeutrino"))
636653 then (inAsset == "WAVES")
10241041 if ((i.callerPublicKey != mngPub))
10251042 then throw("approveLeasings not authorized")
10261043 else {
1027- let $t04442544487 = readNodeInfo(0)
1028- let nAddr0 = $t04442544487._1
1029- let lAmtKEY0 = $t04442544487._2
1030- let lAmt0 = $t04442544487._3
1031- let lIdKEY0 = $t04442544487._4
1032- let lId0 = $t04442544487._5
1044+ let $t04534345405 = readNodeInfo(0)
1045+ let nAddr0 = $t04534345405._1
1046+ let lAmtKEY0 = $t04534345405._2
1047+ let lAmt0 = $t04534345405._3
1048+ let lIdKEY0 = $t04534345405._4
1049+ let lId0 = $t04534345405._5
10331050 let newL0 = Lease(nAddr0, (lAmt0 - (lAmt * expCount)))
10341051 let validation = invoke(nodeRegAddr, "validateAndApproveLeasings", [nListS], nil)
10351052 if ((validation == validation))
10741091 then throw("rebalanceLeasings not authorized")
10751092 else {
10761093 let unleaseAmt = ((amount / size(nList)) + 1)
1077- let $t04572745789 = readNodeInfo(0)
1078- let nAddr0 = $t04572745789._1
1079- let lAmtKEY0 = $t04572745789._2
1080- let lAmt0 = $t04572745789._3
1081- let lIdKEY0 = $t04572745789._4
1082- let lId0 = $t04572745789._5
1094+ let $t04664546707 = readNodeInfo(0)
1095+ let nAddr0 = $t04664546707._1
1096+ let lAmtKEY0 = $t04664546707._2
1097+ let lAmt0 = $t04664546707._3
1098+ let lIdKEY0 = $t04664546707._4
1099+ let lId0 = $t04664546707._5
10831100 let newL0 = Lease(nAddr0, (lAmt0 + (unleaseAmt * size(nList))))
10841101 func forEachNodeDoUnlease (a,i) = {
10851102 let node = nList[i]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
55
66
77 func lcalc (l) = calculateLeaseId(l)
88
99
1010 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1111
1212
1313 func getStringByKey (key) = valueOrElse(getString(this, key), "")
1414
1515
1616 func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false)
1717
1818
1919 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0)
2020
2121
2222 func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "")
2323
2424
2525 func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false)
2626
2727
2828 func asAnyList (v) = match v {
2929 case l: List[Any] =>
3030 l
3131 case _ =>
3232 throw("fail to cast into List[Any]")
3333 }
3434
3535
3636 func asString (v) = match v {
3737 case s: String =>
3838 s
3939 case _ =>
4040 throw("fail to cast into String")
4141 }
4242
4343
4444 func asInt (v) = match v {
4545 case i: Int =>
4646 i
4747 case _ =>
4848 throw("fail to cast into Int")
4949 }
5050
5151
5252 func asBytes (val) = match val {
5353 case valByte: ByteVector =>
5454 valByte
5555 case _ =>
5656 throw("fail to cast into ByteVector")
5757 }
5858
5959
6060 func asPayment (v) = match v {
6161 case p: AttachedPayment =>
6262 p
6363 case _ =>
6464 throw("fail to cast into AttachedPayment")
6565 }
6666
6767
6868 func asSwapParamsSTRUCT (v) = match v {
6969 case struct: (Int, Int, Int, Int, Int, Int, Int) =>
7070 struct
7171 case _ =>
7272 throw("fail to cast into Tuple5 ints")
7373 }
7474
7575
7676 let SEP = "__"
7777
7878 let LISTSEP = ":"
7979
8080 let MULT8 = 100000000
8181
8282 let MULT6 = 1000000
8383
8484 let DEFAULTSWAPFEE = 20000
85+
86+let DEFAULTBURNFEE = 5000
87+
88+let DEFAULTMAXFEE = 150000
8589
8690 let BRPROTECTED = 100000
8791
8892 let WAVESID = base58'WAVES'
8993
9094 let nMetricIdxPrice = 0
9195
9296 let nMetricIdxUsdnLockedBalance = 1
9397
9498 let nMetricIdxWavesLockedBalance = 2
9599
96100 let nMetricIdxReserve = 3
97101
98102 let nMetricIdxReserveInUsdn = 4
99103
100104 let nMetricIdxUsdnSupply = 5
101105
102106 let nMetricIdxSurplus = 6
103107
104108 let nMetricIdxSurplusPercent = 7
105109
106110 let nMetricIdxBR = 8
107111
108112 let nMetricIdxNsbtSupply = 9
109113
110114 let nMetricIdxMaxNsbtSupply = 10
111115
112116 let nMetricIdxSurfSupply = 11
113117
114118 let nMetricUsdnUsdtPeg = 12
115119
116120 let nMetricCurrentPriceAdj = 13
117121
118122 let nMetricBasketInfo = 14
119123
120124 let nMetricWeightedPrice = 15
121125
122126 let nMetricTotalReservesUsd = 16
123127
124128 let IdxControlCfgNeutrinoDapp = 1
125129
126130 let IdxControlCfgAuctionDapp = 2
127131
128132 let IdxControlCfgRpdDapp = 3
129133
130134 let IdxControlCfgMathDapp = 4
131135
132136 let IdxControlCfgLiquidationDapp = 5
133137
134138 let IdxControlCfgRestDapp = 6
135139
136140 let IdxControlCfgNodeRegistryDapp = 7
137141
138142 let IdxControlCfgNsbtStakingDapp = 8
139143
140144 let IdxControlCfgMediatorDapp = 9
141145
142146 let IdxControlCfgSurfStakingDapp = 10
143147
144148 let IdxControlCfgGnsbtControllerDapp = 11
145149
146150 let IdxControlCfgRestV2Dapp = 12
147151
148152 let IdxControlCfgGovernanceDapp = 13
149153
150154 func keyControlAddress () = "%s%s__config__controlAddress"
151155
152156
153157 func keyControlCfg () = "%s__controlConfig"
154158
155159
156160 func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
157161
158162
159163 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
160164
161165
162166 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
163167
164168 let controlCfg = readControlCfgOrFail(controlContract)
165169
166170 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
167171
168172 let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp)
169173
170174 let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp)
171175
172176 let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp)
173177
174178 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
175179
176180 let nodeRegistryContract = getContractAddressOrFail(controlCfg, IdxControlCfgNodeRegistryDapp)
177181
178182 let govContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp)
179183
180184 let NeutrinoAssetIdKey = "neutrino_asset_id"
181185
182186 let BondAssetIdKey = "bond_asset_id"
183187
184188 let AuctionContractKey = "auction_contract"
185189
186190 let NsbtStakingContractKey = "nsbtStakingContract"
187191
188192 let LiquidationContractKey = "liquidation_contract"
189193
190194 let RPDContractKey = "rpd_contract"
191195
192196 let ContolContractKey = "control_contract"
193197
194198 let MathContractKey = "math_contract"
195199
196200 let BalanceWavesLockIntervalKey = "balance_waves_lock_interval"
197201
198202 let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval"
199203
200204 func MinTokenSwapAmountKey (assetId) = ("min_outNeutrino_swap_amount_" + assetId)
201205
202206
203207 let MinNeutrinoSwapAmountKey = "min_outMulti_swap_amount"
204208
205209 let LegacyMinNeutrinoSwapAmountKey = "min_neutrino_swap_amount"
206210
207211 let NodeOracleProviderPubKeyKey = "node_oracle_provider"
208212
209213 let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart"
210214
211215 let WavesOutFeePartKey = "wavesOut_swap_feePart"
212216
217+let BasketOutFeePartKey = "multiOut_swap_feePart"
218+
213219 func keyNodeRegistry (address) = ("%s__" + address)
214220
215221
216222 let PriceKey = "price"
217223
218224 let PriceIndexKey = "price_index"
219225
220226 let IsBlockedKey = "is_blocked"
221227
222228 func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
223229
224230
225231 func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index))
226232
227233
228234 func getStakingNodeByIndex (idx) = getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP))
229235
230236
231237 func getStakingNodeAddressByIndex (idx) = addressFromStringValue(getStakingNodeByIndex(idx))
232238
233239
234240 func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * MULT8))
235241
236242
237243 func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner)
238244
239245
240246 func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP)
241247
242248
243249 func getLeaseIdByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "id"], SEP)
244250
245251
246252 func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP)
247253
248254
249255 func getLeaseAmountByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "amount"], SEP)
250256
251257
252258 func getLeaseGroupNodeListKey (groupNum) = makeString(["%s%d%s", "leaseGroup", toString(groupNum), "nodeList"], SEP)
253259
254260
255261 func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount")
256262
257263
258264 func totalLockedKEY (swapType,assetId) = makeString(["%s%s%s", "balanceLock", swapType, assetId], SEP)
259265
260266
261267 func totalLockedByUserKEY (swapType,owner,assetId) = makeString(["%s%s%s%s", "balanceLock", swapType, owner, assetId], "_")
262268
263269
264270 func balanceLockIntervalKEY (swapType) = if ((swapType == "outMulti"))
265271 then BalanceNeutrinoLockIntervalKey
266272 else BalanceWavesLockIntervalKey
267273
268274
269275 func nodeBalanceLockIntervalKEY () = "balance_node_lock_interval"
270276
271277
272278 func swapsTimeframeKEY () = "swaps_timeframe"
273279
274280
275281 func brProtectedKEY () = "min_BR_protection_level"
276282
277283
278284 func basketAssetsKey () = "%s%s__common__basketAssets"
279285
280286
281287 func basketDKey () = "%s%s__common__basketD"
282288
283289
284290 func basketKKey () = "%s%s__common__basketK"
285291
286292
287293 func basketBKey () = "%s%s__common__basketB"
288294
289295
290296 func basketLogbDeltaKey () = "%s%s__common__basketLogbDelta"
291297
292298
293299 func basketWeightByAssetKey (assetId) = ("%s%s%s__common__weightByAsset__" + assetId)
294300
295301
296302 func keyPriceByAsset (assetId) = ("%s%s%s__common__priceByAsset__" + assetId)
297303
298304
305+func maxFeeKey () = "%s%s__common__maxAllowedFee"
306+
307+
308+func multiOutFeeREAD () = valueOrElse(getInteger(BasketOutFeePartKey), valueOrElse(getInteger(WavesOutFeePartKey), DEFAULTBURNFEE))
309+
310+
299311 func minSwapAmountREAD (swapType,assetId) = if ((swapType == "outMulti"))
300312 then valueOrElse(getInteger(MinNeutrinoSwapAmountKey), getNumberByKey(LegacyMinNeutrinoSwapAmountKey))
301313 else getNumberByKey(MinTokenSwapAmountKey(assetId))
302314
303315
304316 func swapsTimeframeREAD () = valueOrElse(getInteger(this, swapsTimeframeKEY()), 1440)
305317
306318
307319 func totalLockedREAD (swapType,assetId) = valueOrElse(getInteger(this, totalLockedKEY(swapType, assetId)), 0)
308320
309321
310322 func totalLockedByUserREAD (swapType,owner,assetId) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner, assetId)), 0)
311323
312324
313325 func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440)
314326
315327
316328 func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1)
317329
318330
319331 func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP)
320332
321333
322334 func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP)
323335
324336
325337 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
326338
327339
328340 func convertTokenToUsd (amount,price) = fraction(amount, price, MULT8)
329341
330342
331343 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
332344
333345
334346 func convertWavesToBond (amount,price) = convertTokenToUsd(amount, price)
335347
336348
337349 func convertJsonArrayToList (jsonArray) = split(jsonArray, ",")
338350
339351
340352 func convertBasketItemToNeutrino (inAmount,inAsset,basketInfoStr,neutrinoPrice) = {
341353 let basketInfo = split_4C(basketInfoStr, "_")
342354 func findItem (acc,item) = {
343355 let bItem = split(item, LISTSEP)
344356 if ((bItem[0] == inAsset))
345357 then bItem
346358 else acc
347359 }
348360
349361 let it = {
350362 let $l = basketInfo
351363 let $s = size($l)
352364 let $acc0 = nil
353365 func $f0_1 ($a,$i) = if (($i >= $s))
354366 then $a
355367 else findItem($a, $l[$i])
356368
357369 func $f0_2 ($a,$i) = if (($i >= $s))
358370 then $a
359371 else throw("List size exceeds 10")
360372
361373 $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)
362374 }
363375 let dlog6 = value(getInteger(basketLogbDeltaKey()))
364376 let d6 = value(getInteger(basketDKey()))
365377 let b6 = value(getInteger(basketBKey()))
366378 let w6 = value(getInteger(basketWeightByAssetKey(inAsset)))
367379 let p6 = ((dlog6 - w6) + parseIntValue(it[1]))
368380 let pp6 = pow(b6, 6, p6, 6, 6, HALFUP)
369381 let outAmountGross = fraction(inAmount, parseIntValue(it[2]), if ((neutrinoPrice == 0))
370382 then MULT8
371383 else (neutrinoPrice * 100))
372384 let multiplier = ((MULT6 + d6) - pp6)
373- let netAmount = fraction(outAmountGross, multiplier, MULT6)
374- let feeAmount = if ((netAmount >= outAmountGross))
375- then 0
376- else (outAmountGross - netAmount)
377-[outAmountGross, netAmount, feeAmount]
385+ if ((0 >= multiplier))
386+ then throw(("Non-positive multiplier = " + toString(multiplier)))
387+ else {
388+ let discounted = fraction(outAmountGross, multiplier, MULT6)
389+ let masterFee = valueOrElse(getInteger(NeutrinoOutFeePartKey), DEFAULTSWAPFEE)
390+ let feeAmount = fraction(discounted, masterFee, MULT6)
391+[discounted, (discounted - feeAmount), feeAmount, multiplier]
392+ }
378393 }
379394
380395
381396 func convertNeutrinoToBasket (amount,basketInfoStr,neutrinoSupply) = {
382397 let basketInfo = split_4C(basketInfoStr, "_")
398+ let k6 = value(getInteger(basketKKey()))
399+ let d6 = value(getInteger(basketDKey()))
400+ let outPart = (MULT6 - fraction(k6, d6, MULT6))
383401 func conv (acc,item) = {
384402 let parts = split(item, LISTSEP)
385403 let assetId = parts[0]
386404 let share = parseIntValue(parts[1])
387405 let price = parseIntValue(parts[2])
388406 let reserv = parseIntValue(parts[3])
389407 if ((neutrinoSupply == 0))
390408 then throw("Attempt to burn neutrino at zero supply")
391409 else {
392- let outAmount = fraction(amount, reserv, neutrinoSupply)
410+ let outAmount = fraction(fraction(amount, reserv, neutrinoSupply), outPart, MULT6)
393411 let wavesTuple = if ((assetId == "WAVES"))
394412 then $Tuple2(outAmount, price)
395413 else $Tuple2(acc._2, acc._3)
396414 $Tuple3((acc._1 :+ $Tuple4(assetId, outAmount, price, share)), wavesTuple._1, wavesTuple._2)
397415 }
398416 }
399417
400418 let $l = basketInfo
401419 let $s = size($l)
402420 let $acc0 = $Tuple3(nil, 0, 0)
403421 func $f0_1 ($a,$i) = if (($i >= $s))
404422 then $a
405423 else conv($a, $l[$i])
406424
407425 func $f0_2 ($a,$i) = if (($i >= $s))
408426 then $a
409427 else throw("List size exceeds 10")
410428
411429 $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)
412430 }
413431
414432
415433 func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount)))
416434
417435
418436 func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
419437
420438
421439 func priceIndexFAIL (index,priceIndex,indexHeight,unlockHeight,prevIndexHeight) = throw(((((((((("invalid price history index: index=" + toString(index)) + " priceIndex=") + toString(priceIndex)) + " indexHeight=") + toString(indexHeight)) + " unlockHeight=") + toString(unlockHeight)) + " prevIndexHeight=") + toString(prevIndexHeight)))
422440
423441
424442 let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
425443
426444 let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey)
427445
428446 let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey)
429447
430448 let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey))
431449
432450 let bondAssetId = fromBase58String("F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z")
433451
434452 let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF")
435453
436454 let neutrinoContract = this
437455
438456 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
439457
440458 func checkIsValidMinSponsoredFee (tx) = {
441459 let MINTRANSFERFEE = 100000
442460 let SponsoredFeeUpperBound = 1000
443461 let realNeutrinoFee = convertTokenToUsd(MINTRANSFERFEE, currentPrice)
444462 let minNeutrinoFee = (realNeutrinoFee * 2)
445463 let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100)
446464 let inputFee = value(tx.minSponsoredAssetFee)
447465 if (if ((inputFee >= minNeutrinoFee))
448466 then (maxNeutrinoFee >= inputFee)
449467 else false)
450468 then (tx.assetId == neutrinoAssetId)
451469 else false
452470 }
453471
454472
455473 func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block))
456474
457475
458476 func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index))
459477
460478
461479 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
462480
463481
464482 let sIdxSwapType = 1
465483
466484 let sIdxStatus = 2
467485
468486 let sIdxInAmount = 3
469487
470488 let sIdxStartHeight = 7
471489
472490 let sIdxStartTimestamp = 8
473491
474492 let sIdxSelfUnlockHeight = 11
475493
476494 let sIdxMinRand = 15
477495
478496 let sIdxMaxRand = 16
479497
480498 let sIdxInAsset = 20
481499
482500 func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP)
483501
484502
485503 func strSwapDATA (swapType,status,inAmount,price,outNetAmount,outFeeAmount,startHeight,startTimestamp,endHeight,endTimestamp,selfUnlockHeight,randUnlockHeight,index,withdrawTxId,randMin,randMax,outSurfAmt,br,basketData,inAsset) = makeString_2C(["%s%s%d%d%d%d%d%d%d%d%d%d%d%s%d%d%d%d%s%s", swapType, status, inAmount, price, outNetAmount, outFeeAmount, startHeight, startTimestamp, endHeight, endTimestamp, selfUnlockHeight, randUnlockHeight, index, withdrawTxId, randMin, randMax, outSurfAmt, br, basketData, inAsset], SEP)
486504
487505
488506 func pendingSwapDATA (swapType,inAssetAmount,selfUnlockHeight,inAsset) = strSwapDATA(swapType, "PENDING", toString(inAssetAmount), "0", "0", "0", toString(height), toString(lastBlock.timestamp), "0", "0", toString(selfUnlockHeight), "0", "0", "NULL", "0", "0", "0", "0", "", inAsset)
489507
490508
491509 func finishSwapDATA (dataArray,price,outNetAmount,outFeeAmount,randUnlockHeight,index,withdrawTxId,outSurfAmt,br,basketData,inAsset) = strSwapDATA(dataArray[sIdxSwapType], "FINISHED", dataArray[sIdxInAmount], toString(price), toString(outNetAmount), toString(outFeeAmount), dataArray[sIdxStartHeight], dataArray[sIdxStartTimestamp], toString(height), toString(lastBlock.timestamp), dataArray[sIdxSelfUnlockHeight], toString(randUnlockHeight), toString(index), withdrawTxId, dataArray[sIdxMinRand], dataArray[sIdxMaxRand], toString(outSurfAmt), toString(br), basketData, inAsset)
492510
493511
494512 func swapDataFailOrREAD (userAddress,swapTxId) = {
495513 let swapKey = swapKEY(userAddress, swapTxId)
496514 split_4C(valueOrErrorMessage(getString(swapKey), ("no swap data for " + swapKey)), SEP)
497515 }
498516
499517
500518 func applyFees (amountOutGross,inAmtToSURF,feePart) = {
501519 let feeAmount = fraction(amountOutGross, feePart, MULT6)
502520 [(amountOutGross - feeAmount), feeAmount]
503521 }
504522
505523
506524 func applyFeesBasket (basketOut) = {
507- let k6 = value(getInteger(basketKKey()))
508- let d6 = value(getInteger(basketDKey()))
509- let feePart = fraction(k6, d6, MULT6)
525+ let feePart = multiOutFeeREAD()
510526 func feeApplier (acc,item) = {
511527 let feeAmount = fraction(item._2, feePart, MULT6)
512528 (acc :+ makeString([item._1, toString(item._3), toString((item._2 - feeAmount)), toString(feeAmount), toString(item._4)], LISTSEP))
513529 }
514530
515531 let a = {
516532 let $l = basketOut
517533 let $s = size($l)
518534 let $acc0 = nil
519535 func $f0_1 ($a,$i) = if (($i >= $s))
520536 then $a
521537 else feeApplier($a, $l[$i])
522538
523539 func $f0_2 ($a,$i) = if (($i >= $s))
524540 then $a
525541 else throw("List size exceeds 10")
526542
527543 $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)
528544 }
529545 makeString_2C(a, "_")
530546 }
531547
532548
533549 func abs (x) = if ((0 > x))
534550 then -(x)
535551 else x
536552
537553
538554 func selectNode (unleaseAmount) = {
539555 let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship())
540556 let oldLeased0 = getNumberByKey(getLeaseAmountKey(0))
541557 let oldLeased1 = getNumberByKey(getLeaseAmountKey(1))
542558 let newLeased0 = (amountToLease + oldLeased0)
543559 let newLeased1 = (amountToLease + oldLeased1)
544560 if (if ((newLeased0 > 0))
545561 then true
546562 else (newLeased1 > 0))
547563 then {
548564 let delta0 = abs((newLeased0 - oldLeased1))
549565 let delta1 = abs((newLeased1 - oldLeased0))
550566 if ((delta1 >= delta0))
551567 then $Tuple2(0, newLeased0)
552568 else $Tuple2(1, newLeased1)
553569 }
554570 else $Tuple2(-1, 0)
555571 }
556572
557573
558574 func thisOnly (i) = if ((i.caller != this))
559575 then throw("Permission denied: this contract only allowed")
560576 else true
561577
562578
563579 func prepareUnleaseAndLease (unleaseAmount) = {
564580 let nodeTuple = selectNode(unleaseAmount)
565581 let nodeIndex = nodeTuple._1
566582 let newLeaseAmount = nodeTuple._2
567583 if ((newLeaseAmount > 0))
568584 then {
569585 let leaseIdKey = getLeaseIdKey(nodeIndex)
570586 let oldLease = getBinary(this, leaseIdKey)
571587 let unleaseOrEmpty = if (isDefined(oldLease))
572588 then [LeaseCancel(value(oldLease))]
573589 else nil
574590 let leaseAmountKey = getLeaseAmountKey(nodeIndex)
575591 let lease = Lease(getStakingNodeAddressByIndex(nodeIndex), newLeaseAmount)
576592 (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, lcalc(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)])
577593 }
578594 else nil
579595 }
580596
581597
582598 func readNodeInfo (nodeIdx) = {
583599 let nodeAddress = getStakingNodeAddressByIndex(nodeIdx)
584600 let leasedAmtKEY = getLeaseAmountKey(nodeIdx)
585601 let leasedAmt = getNumberByKey(leasedAmtKEY)
586602 let leaseIdKEY = getLeaseIdKey(nodeIdx)
587603 let leaseId = value(getBinary(this, leaseIdKEY))
588604 $Tuple5(nodeAddress, leasedAmtKEY, leasedAmt, leaseIdKEY, leaseId)
589605 }
590606
591607
592608 func commonSwap (swapType,pmtAmount,inAsset,userAddressStr,txId58) = {
593609 let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
594610 let tokenSwapLimitUsd = swapParamsSTRUCT._1
595611 let swapLimitSpent = swapParamsSTRUCT._2
596612 let blcks2LmtReset = swapParamsSTRUCT._3
597613 let usdnSwapLimitMax = swapParamsSTRUCT._7
598614 let minSwapAmount = minSwapAmountREAD(swapType, inAsset)
599615 let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr, inAsset)
600616 let nodeAddress = getStakingNodeByIndex(0)
601617 let isSwapByNode = (nodeAddress == userAddressStr)
602618 let balanceLockMaxInterval = if (isSwapByNode)
603619 then nodeBalanceLockIntervalREAD()
604620 else balanceLockIntervalREAD(swapType)
605621 let selfUnlockHeight = (height + balanceLockMaxInterval)
606622 let pr = value(getInteger(controlContract, keyPriceByAsset(inAsset)))
607623 let swapUsdnVolume = if ((swapType == "outNeutrino"))
608624 then convertTokenToUsd(pmtAmount, pr)
609625 else pmtAmount
610626 let swapLimitMax = if ((swapType == "outNeutrino"))
611627 then tokenSwapLimitUsd
612628 else usdnSwapLimitMax
613629 if ((minSwapAmount > pmtAmount))
614630 then minSwapAmountFAIL(swapType, minSwapAmount)
615631 else if (if (!(isSwapByNode))
616632 then (swapLimitSpent > 0)
617633 else false)
618634 then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((height + blcks2LmtReset))))
619635 else if (if (!(isSwapByNode))
620636 then (swapUsdnVolume > swapLimitMax)
621637 else false)
622638 then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimitMax)))
623639 else if (isBlocked)
624640 then emergencyShutdownFAIL()
625641 else {
626642 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
627643 let basketInfo = asString(neutrinoMetrics[nMetricBasketInfo])
628644 let weightedPrice = asInt(neutrinoMetrics[nMetricWeightedPrice])
629645 let out = convertBasketItemToNeutrino(pmtAmount, inAsset, basketInfo, weightedPrice)
646+ let maxFee = valueOrElse(getInteger(maxFeeKey()), DEFAULTMAXFEE)
630647 if (if ((swapType == "outNeutrino"))
631- then (0 >= out[1])
648+ then ((MULT6 - maxFee) > out[3])
632649 else false)
633- then throw((((((("Net amount is non-positive, cannot swap. (gross, net, fee) = (" + toString(out[0])) + ", ") + toString(out[1])) + ", ") + toString(out[2])) + ")"))
650+ then throw(("Max allowed fee exceeded, multiplier = " + toString(out[3])))
634651 else {
635652 let leasePart = if (if ((swapType == "outNeutrino"))
636653 then (inAsset == "WAVES")
637654 else false)
638655 then prepareUnleaseAndLease(0)
639656 else nil
640657 $Tuple2(([IntegerEntry(keySwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr, inAsset), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight, inAsset))] ++ leasePart), unit)
641658 }
642659 }
643660 }
644661
645662
646663 let bFuncIdxSurf = 0
647664
648665 let bFuncIdxWaves = 1
649666
650667 let bFuncIdxUsdn = 2
651668
652669 let bFuncIdxReserveStart = 3
653670
654671 let bFuncIdxSupplyStart = 4
655672
656673 let bFuncIdxBRStart = 5
657674
658675 let bFuncIdxReserveEnd = 6
659676
660677 let bFuncIdxSupplyEnd = 7
661678
662679 let bFuncIdxBREnd = 8
663680
664681 let bFuncIdxRest = 9
665682
666683 let bFuncIdxWavesPrice = 10
667684
668685 func calcWithdrawT2U (inAmount,inAsset,basketInfo,weightedPrice) = {
669686 let outAmt = convertBasketItemToNeutrino(inAmount, inAsset, basketInfo, weightedPrice)
670687 $Tuple12(outAmt[0], neutrinoAssetId, 0, inAsset, 0, weightedPrice, inAmount, 0, 0, 0, nil, [outAmt[1], outAmt[2]])
671688 }
672689
673690
674691 func calcWithdrawU2Basket (usdnIn,basketInfo,neutrinoSupply) = {
675692 let outAmtGross = convertNeutrinoToBasket(usdnIn, basketInfo, neutrinoSupply)
676693 $Tuple12(outAmtGross._2, unit, 0, neutrinoAssetId, outAmtGross._2, outAmtGross._3, usdnIn, neutrinoSupply, usdnIn, 0, outAmtGross._1, nil)
677694 }
678695
679696
680697 func calcWithdraw (swapType,inAmount,price,neutrinoMetrics,inAsset) = {
681698 let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply])
682699 let basketInfo = asString(neutrinoMetrics[nMetricBasketInfo])
683700 let weightedPrice = asInt(neutrinoMetrics[nMetricWeightedPrice])
684701 let outDataTuple = if ((swapType == "outNeutrino"))
685702 then calcWithdrawT2U(inAmount, inAsset, basketInfo, weightedPrice)
686703 else if ((swapType == "outMulti"))
687704 then calcWithdrawU2Basket(inAmount, basketInfo, neutrinoSupply)
688705 else throw(("Unsupported swap type " + swapType))
689706 let outAmtGross = outDataTuple._1
690707 let outAssetId = outDataTuple._2
691708 let inAmtToSurfPart = outDataTuple._3
692709 let inAssetId = outDataTuple._4
693710 let unleaseAmt = outDataTuple._5
694711 let withdrawPrice = outDataTuple._6
695712 let basketData = outDataTuple._11
696713 let netFeeData = outDataTuple._12
697714 let outNetAmt = if ((swapType == "outNeutrino"))
698715 then netFeeData[0]
699716 else 0
700717 let outFeeAmt = if ((swapType == "outNeutrino"))
701718 then netFeeData[1]
702719 else 0
703720 let outSurfAmt = if ((0 >= inAmtToSurfPart))
704721 then 0
705722 else asInt(asAnyList(invoke(mathContract, "surfFunctionREADONLY", [inAmtToSurfPart, inAssetId], nil))[bFuncIdxSurf])
706723 let withdrawBasket = if ((swapType == "outMulti"))
707724 then applyFeesBasket(basketData)
708725 else ""
709726 $Tuple9(outNetAmt, outAssetId, outSurfAmt, inAmtToSurfPart, unleaseAmt, outFeeAmt, outAmtGross, withdrawPrice, withdrawBasket)
710727 }
711728
712729
713730 func keyApplyInProgress () = "%s__applyInProgress"
714731
715732
716733 func keyProposalDataById (proposalId) = ("%s%d__proposalData__" + toString(proposalId))
717734
718735
719736 let govIdxTxIds = 9
720737
721738 func validateUpdate (tx) = match tx {
722739 case o: Order =>
723740 throw("Orders aren't allowed")
724741 case t: DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|InvokeExpressionTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction =>
725742 let txId = toBase58String(t.id)
726743 let proposalId = valueOrErrorMessage(getInteger(govContract, keyApplyInProgress()), "Apply is not happening")
727744 let txList = split(split(getStringOrFail(govContract, keyProposalDataById(proposalId)), SEP)[govIdxTxIds], LISTSEP)
728745 if (!(isDefined(indexOf(txList, txId))))
729746 then throw(((("Unknown txId: " + txId) + " for proposalId=") + toString(proposalId)))
730747 else true
731748 case _ =>
732749 throw("Match error")
733750 }
734751
735752
736753 @Callable(i)
737754 func constructorV1 (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = {
738755 let checkCaller = thisOnly(i)
739756 if ((checkCaller == checkCaller))
740757 then if ((size(i.payments) != 0))
741758 then throw("no payments allowed")
742759 else [StringEntry(NeutrinoAssetIdKey, neutrinoAssetIdPrm), StringEntry(BondAssetIdKey, bondAssetIdPrm), StringEntry(AuctionContractKey, auctionContractPrm), StringEntry(LiquidationContractKey, liquidationContractPrm), StringEntry(RPDContractKey, rpdContractPrm), StringEntry(NodeOracleProviderPubKeyKey, nodeOracleProviderPubKeyPrm), IntegerEntry(BalanceWavesLockIntervalKey, balanceWavesLockIntervalPrm), IntegerEntry(BalanceNeutrinoLockIntervalKey, balanceNeutrinoLockIntervalPrm), IntegerEntry(MinTokenSwapAmountKey("WAVES"), minWavesSwapAmountPrm), IntegerEntry(MinNeutrinoSwapAmountKey, minNeutrinoSwapAmountPrm), IntegerEntry(NeutrinoOutFeePartKey, neutrinoOutFeePartPrm), IntegerEntry(WavesOutFeePartKey, wavesOutFeePartPrm)]
743760 else throw("Strict value is not equal to itself.")
744761 }
745762
746763
747764
748765 @Callable(i)
749766 func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = {
750767 let checkCaller = thisOnly(i)
751768 if ((checkCaller == checkCaller))
752769 then if ((size(i.payments) != 0))
753770 then throw("no payments allowed")
754771 else [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)]
755772 else throw("Strict value is not equal to itself.")
756773 }
757774
758775
759776
760777 @Callable(i)
761778 func constructorV3 (assetsWeightsMins,dParam,kParam,bParam,deltaParam) = {
762779 let checkCaller = thisOnly(i)
763780 if ((checkCaller == checkCaller))
764781 then if ((size(i.payments) != 0))
765782 then throw("no payments allowed")
766783 else {
767784 func prepare (acc,item) = {
768785 let parts = split(item, "_")
769786 let assetId = parts[0]
770787 let weight = parseIntValue(parts[1])
771788 let minVal = parseIntValue(parts[2])
772789 $Tuple2((acc._1 :+ assetId), ((acc._2 :+ IntegerEntry(basketWeightByAssetKey(assetId), weight)) :+ IntegerEntry(MinTokenSwapAmountKey(assetId), minVal)))
773790 }
774791
775792 let r = {
776793 let $l = assetsWeightsMins
777794 let $s = size($l)
778795 let $acc0 = $Tuple2(nil, nil)
779796 func $f0_1 ($a,$i) = if (($i >= $s))
780797 then $a
781798 else prepare($a, $l[$i])
782799
783800 func $f0_2 ($a,$i) = if (($i >= $s))
784801 then $a
785802 else throw("List size exceeds 10")
786803
787804 $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)
788805 }
789806 (((((r._2 :+ IntegerEntry(basketDKey(), dParam)) :+ IntegerEntry(basketKKey(), kParam)) :+ IntegerEntry(basketBKey(), bParam)) :+ IntegerEntry(basketLogbDeltaKey(), log(deltaParam, 6, bParam, 6, 6, HALFUP))) :+ StringEntry(basketAssetsKey(), makeString(r._1, SEP)))
790807 }
791808 else throw("Strict value is not equal to itself.")
792809 }
793810
794811
795812
796813 @Callable(i)
797814 func swapTokenToNeutrino () = if ((size(i.payments) != 1))
798815 then throw("swapTokenToNeutrino require only one payment")
799816 else {
800817 let pmt = value(i.payments[0])
801818 let basketAssets = value(getString(basketAssetsKey()))
802819 let pmtAssetIdStr = toBase58String(valueOrElse(pmt.assetId, WAVESID))
803820 if (!(contains(basketAssets, pmtAssetIdStr)))
804821 then throw(((pmtAssetIdStr + " is not one of basket tokens:") + basketAssets))
805822 else {
806823 let userAddress = toString(i.caller)
807824 let txId58 = toBase58String(i.transactionId)
808825 let totalLocked = totalLockedREAD("outNeutrino", pmtAssetIdStr)
809826 let pmtAmount = pmt.amount
810827 let saveTotalLocked = invoke(this, "internalSaveInteger", [totalLockedKEY("outNeutrino", pmtAssetIdStr), (totalLocked + pmtAmount)], nil)
811828 if ((saveTotalLocked == saveTotalLocked))
812829 then commonSwap("outNeutrino", pmtAmount, pmtAssetIdStr, userAddress, txId58)
813830 else throw("Strict value is not equal to itself.")
814831 }
815832 }
816833
817834
818835
819836 @Callable(i)
820837 func swapNeutrinoToBasket () = if ((size(i.payments) != 1))
821838 then throw("swapNeutrinoToBasket require only one payment")
822839 else {
823840 let pmt = value(i.payments[0])
824841 if ((pmt.assetId != neutrinoAssetId))
825842 then throw("Only appropriate Neutrino tokens are allowed for swapping.")
826843 else {
827844 let userAddress = toString(i.caller)
828845 let txId58 = toBase58String(i.transactionId)
829846 let neutrinoAssetIdStr = toBase58String(neutrinoAssetId)
830847 let totalLocked = totalLockedREAD("outMulti", neutrinoAssetIdStr)
831848 let pmtAmount = pmt.amount
832849 let saveTotalLocked = invoke(this, "internalSaveInteger", [totalLockedKEY("outMulti", neutrinoAssetIdStr), (totalLocked + pmtAmount)], nil)
833850 if ((saveTotalLocked == saveTotalLocked))
834851 then commonSwap("outMulti", pmt.amount, neutrinoAssetIdStr, userAddress, txId58)
835852 else throw("Strict value is not equal to itself.")
836853 }
837854 }
838855
839856
840857
841858 @Callable(i)
842859 func internalSaveInteger (key,amount) = if ((i.caller != this))
843860 then throw("internalSaveInteger is not public method")
844861 else [IntegerEntry(key, amount)]
845862
846863
847864
848865 @Callable(i)
849866 func withdraw (account,index,swapTxId) = {
850867 let txId = toBase58String(i.transactionId)
851868 if ((size(i.payments) != 0))
852869 then throw("no payments allowed")
853870 else {
854871 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
855872 let BR = asInt(neutrinoMetrics[nMetricIdxBR])
856873 let userAddress = addressFromStringValue(account)
857874 let dataArray = swapDataFailOrREAD(account, swapTxId)
858875 let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
859876 let swapType = dataArray[sIdxSwapType]
860877 let inAmount = parseIntValue(dataArray[sIdxInAmount])
861878 let swapStatus = dataArray[sIdxStatus]
862879 let startHeight = parseIntValue(dataArray[sIdxStartHeight])
863880 let inAsset = dataArray[sIdxInAsset]
864881 let totalLocked = totalLockedREAD(swapType, inAsset)
865882 let totalLockedByUser = totalLockedByUserREAD(swapType, account, inAsset)
866883 let unlockHeight = selfUnlockHeight
867884 let indexHeight = getHeightPriceByIndex(index)
868885 let prevIndexHeight = getHeightPriceByIndex((index - 1))
869886 let priceByIndex = getPriceHistory(indexHeight)
870887 if (isBlocked)
871888 then emergencyShutdownFAIL()
872889 else if ((swapStatus != "PENDING"))
873890 then throw("swap has been already processed")
874891 else if ((unlockHeight > height))
875892 then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
876893 else if (if (if ((index > priceIndex))
877894 then true
878895 else (unlockHeight > indexHeight))
879896 then true
880897 else if ((prevIndexHeight != 0))
881898 then (prevIndexHeight >= unlockHeight)
882899 else false)
883900 then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
884901 else {
885902 let withdrawTuple = calcWithdraw(swapType, inAmount, priceByIndex, neutrinoMetrics, inAsset)
886903 let outNetAmount = withdrawTuple._1
887904 let outAssetId = withdrawTuple._2
888905 let outSurfAmt = withdrawTuple._3
889906 let unleaseAmt = withdrawTuple._5
890907 let outFeeAmount = withdrawTuple._6
891908 let outAmtGross = withdrawTuple._7
892909 let withdrawPrice = withdrawTuple._8
893910 let withdrawBasket = withdrawTuple._9
894911 if (if ((swapType == "outNeutrino"))
895912 then (0 >= outAmtGross)
896913 else false)
897914 then throw("balance equals zero")
898915 else {
899916 let surfCondition = if ((outSurfAmt > 0))
900917 then {
901918 let issueResult = invoke(auctionContract, "issueSurf", [outSurfAmt, account], nil)
902919 if ((issueResult == issueResult))
903920 then 0
904921 else throw("Strict value is not equal to itself.")
905922 }
906923 else 0
907924 if ((surfCondition == surfCondition))
908925 then {
909926 let unleaseInvOrEmpty = invoke(this, "internalUnleaseAndLease", [unleaseAmt], nil)
910927 if ((unleaseInvOrEmpty == unleaseInvOrEmpty))
911928 then {
912929 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", ["", 0, 0], nil))
913930 let gnsbtAmtTotal = asInt(gnsbtData[1])
914931 let gnsbtAmtFromSurfTotal = asInt(asAnyList(gnsbtData[3])[3])
915932 let commonActions = [IntegerEntry(totalLockedByUserKEY(swapType, account, inAsset), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType, inAsset), (totalLocked - inAmount)), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, withdrawPrice, outNetAmount, outFeeAmount, unlockHeight, index, txId, outSurfAmt, BR, withdrawBasket, inAsset))]
916933 func deposits (surfFees,nsbtFees,surfPayments,nsbtPayments) = {
917934 let surfDeposit = if ((surfFees > 0))
918935 then asInt(invoke(surfStakingContract, "deposit", nil, surfPayments))
919936 else 0
920937 let nsbtDeposit = if ((nsbtFees > 0))
921938 then asInt(invoke(nsbtStakingContract, "deposit", nil, nsbtPayments))
922939 else 0
923940 (surfDeposit + nsbtDeposit)
924941 }
925942
926943 func divideFees (feeAmount) = {
927944 let surfAmt1 = if ((gnsbtAmtTotal != 0))
928945 then fraction(feeAmount, gnsbtAmtFromSurfTotal, gnsbtAmtTotal)
929946 else 0
930947 let surfAmt2 = if ((gnsbtAmtTotal != 0))
931948 then fraction(feeAmount, (MULT6 - BR), MULT6)
932949 else 0
933950 let surfAmt = max([surfAmt1, surfAmt2])
934951 let nsbtAmt = (feeAmount - surfAmt)
935952 [surfAmt, nsbtAmt]
936953 }
937954
938955 let transfers = if ((swapType == "outMulti"))
939956 then {
940957 let basket = split_4C(withdrawBasket, "_")
941958 func looper (acc,item) = {
942959 let it = split(item, LISTSEP)
943960 let tempAssetId = fromBase58String(it[0])
944961 let assetId = if ((tempAssetId == WAVESID))
945962 then unit
946963 else tempAssetId
947964 let netAmount = parseIntValue(it[2])
948965 let feeAmount = parseIntValue(it[3])
949966 let fees = divideFees(feeAmount)
950967 $Tuple5((acc._1 :+ ScriptTransfer(userAddress, netAmount, assetId)), (acc._2 :+ AttachedPayment(assetId, fees[0])), (acc._3 :+ AttachedPayment(assetId, fees[1])), (acc._4 + fees[0]), (acc._5 + fees[1]))
951968 }
952969
953970 let r = {
954971 let $l = basket
955972 let $s = size($l)
956973 let $acc0 = $Tuple5(nil, nil, nil, 0, 0)
957974 func $f0_1 ($a,$i) = if (($i >= $s))
958975 then $a
959976 else looper($a, $l[$i])
960977
961978 func $f0_2 ($a,$i) = if (($i >= $s))
962979 then $a
963980 else throw("List size exceeds 10")
964981
965982 $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)
966983 }
967984 let depoResult = deposits(r._4, r._5, r._2, r._3)
968985 $Tuple2(r._1, depoResult)
969986 }
970987 else {
971988 let fees = divideFees(outFeeAmount)
972989 let depoResult = deposits(fees[0], fees[1], [AttachedPayment(outAssetId, fees[0])], [AttachedPayment(outAssetId, fees[1])])
973990 $Tuple2([ScriptTransfer(userAddress, outNetAmount, outAssetId)], depoResult)
974991 }
975992 $Tuple2((commonActions ++ transfers._1), transfers._2)
976993 }
977994 else throw("Strict value is not equal to itself.")
978995 }
979996 else throw("Strict value is not equal to itself.")
980997 }
981998 }
982999 }
9831000 }
9841001
9851002
9861003
9871004 @Callable(i)
9881005 func internalUnleaseAndLease (unleaseAmount) = if ((i.caller != this))
9891006 then throw("internalUnleaseAndLease is not public method")
9901007 else prepareUnleaseAndLease(unleaseAmount)
9911008
9921009
9931010
9941011 @Callable(i)
9951012 func transferUsdnToUser (amount,addr) = if ((i.caller != auctionContract))
9961013 then throw("Only auction contract is authorized")
9971014 else [ScriptTransfer(addressFromStringValue(addr), amount, neutrinoAssetId)]
9981015
9991016
10001017
10011018 @Callable(i)
10021019 func acceptWaves () = if (if ((i.caller != auctionContract))
10031020 then (i.caller != govContract)
10041021 else false)
10051022 then throw("Currently only auction and governance contracts are allowed to call")
10061023 else $Tuple2(prepareUnleaseAndLease(0), "success")
10071024
10081025
10091026
10101027 @Callable(i)
10111028 func approveLeasings (nListS,groupNum,lAmt) = {
10121029 let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7]
10131030 let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur")
10141031 let mngPub = fromBase58String(mngPubS)
10151032 let nodeRegAddrStr = valueOrElse(getString("%s%s__cfg__nodesRegistryAddress"), "3P9vKqQKjUdmpXAfiWau8krREYAY1Xr69pE")
10161033 let nodeRegAddr = addressFromStringValue(nodeRegAddrStr)
10171034 let lGroupNodeListKEY = getLeaseGroupNodeListKey(groupNum)
10181035 let lGrNodeOpt = getString(this, lGroupNodeListKEY)
10191036 if (isDefined(lGrNodeOpt))
10201037 then throw((("group " + toString(groupNum)) + " already initialized"))
10211038 else {
10221039 let nList = split(nListS, SEP)
10231040 let expCount = size(nIdxs)
10241041 if ((i.callerPublicKey != mngPub))
10251042 then throw("approveLeasings not authorized")
10261043 else {
1027- let $t04442544487 = readNodeInfo(0)
1028- let nAddr0 = $t04442544487._1
1029- let lAmtKEY0 = $t04442544487._2
1030- let lAmt0 = $t04442544487._3
1031- let lIdKEY0 = $t04442544487._4
1032- let lId0 = $t04442544487._5
1044+ let $t04534345405 = readNodeInfo(0)
1045+ let nAddr0 = $t04534345405._1
1046+ let lAmtKEY0 = $t04534345405._2
1047+ let lAmt0 = $t04534345405._3
1048+ let lIdKEY0 = $t04534345405._4
1049+ let lId0 = $t04534345405._5
10331050 let newL0 = Lease(nAddr0, (lAmt0 - (lAmt * expCount)))
10341051 let validation = invoke(nodeRegAddr, "validateAndApproveLeasings", [nListS], nil)
10351052 if ((validation == validation))
10361053 then {
10371054 func forEachNodeValidateAndGenerateLease (a,i) = {
10381055 let node = nList[i]
10391056 let la = Lease(addressFromStringValue(node), lAmt)
10401057 (a ++ [la, BinaryEntry(getLeaseIdByAddressKey(node), lcalc(la)), IntegerEntry(getLeaseAmountByAddressKey(node), lAmt)])
10411058 }
10421059
10431060 ([StringEntry(lGroupNodeListKEY, nListS), BinaryEntry(lIdKEY0, lcalc(newL0)), IntegerEntry(lAmtKEY0, newL0.amount), LeaseCancel(lId0), newL0] ++ {
10441061 let $l = nIdxs
10451062 let $s = size($l)
10461063 let $acc0 = nil
10471064 func $f0_1 ($a,$i) = if (($i >= $s))
10481065 then $a
10491066 else forEachNodeValidateAndGenerateLease($a, $l[$i])
10501067
10511068 func $f0_2 ($a,$i) = if (($i >= $s))
10521069 then $a
10531070 else throw("List size exceeds 8")
10541071
10551072 $f0_2($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)
10561073 })
10571074 }
10581075 else throw("Strict value is not equal to itself.")
10591076 }
10601077 }
10611078 }
10621079
10631080
10641081
10651082 @Callable(i)
10661083 func rebalanceLeasings (amount,groupNum) = {
10671084 let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7]
10681085 let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur")
10691086 let mngPub = fromBase58String(mngPubS)
10701087 let lGroupNodeListKEY = getLeaseGroupNodeListKey(groupNum)
10711088 let nListS = getStringOrFail(this, lGroupNodeListKEY)
10721089 let nList = split(nListS, SEP)
10731090 if ((i.callerPublicKey != mngPub))
10741091 then throw("rebalanceLeasings not authorized")
10751092 else {
10761093 let unleaseAmt = ((amount / size(nList)) + 1)
1077- let $t04572745789 = readNodeInfo(0)
1078- let nAddr0 = $t04572745789._1
1079- let lAmtKEY0 = $t04572745789._2
1080- let lAmt0 = $t04572745789._3
1081- let lIdKEY0 = $t04572745789._4
1082- let lId0 = $t04572745789._5
1094+ let $t04664546707 = readNodeInfo(0)
1095+ let nAddr0 = $t04664546707._1
1096+ let lAmtKEY0 = $t04664546707._2
1097+ let lAmt0 = $t04664546707._3
1098+ let lIdKEY0 = $t04664546707._4
1099+ let lId0 = $t04664546707._5
10831100 let newL0 = Lease(nAddr0, (lAmt0 + (unleaseAmt * size(nList))))
10841101 func forEachNodeDoUnlease (a,i) = {
10851102 let node = nList[i]
10861103 let lIdKEY = getLeaseIdByAddressKey(node)
10871104 let lId = getBinaryValue(this, lIdKEY)
10881105 let lAmtKEY = getLeaseAmountByAddressKey(node)
10891106 let lAmt = getIntegerValue(this, lAmtKEY)
10901107 let ula = LeaseCancel(value(lId))
10911108 let la = Lease(addressFromStringValue(node), (lAmt - unleaseAmt))
10921109 (a ++ [LeaseCancel(value(lId)), la, BinaryEntry(lIdKEY, lcalc(la)), IntegerEntry(lAmtKEY, la.amount)])
10931110 }
10941111
10951112 ({
10961113 let $l = nIdxs
10971114 let $s = size($l)
10981115 let $acc0 = nil
10991116 func $f0_1 ($a,$i) = if (($i >= $s))
11001117 then $a
11011118 else forEachNodeDoUnlease($a, $l[$i])
11021119
11031120 func $f0_2 ($a,$i) = if (($i >= $s))
11041121 then $a
11051122 else throw("List size exceeds 8")
11061123
11071124 $f0_2($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)
11081125 } ++ [BinaryEntry(lIdKEY0, lcalc(newL0)), IntegerEntry(lAmtKEY0, newL0.amount), LeaseCancel(lId0), newL0])
11091126 }
11101127 }
11111128
11121129
11131130
11141131 @Callable(i)
11151132 func swapParamsByUserSYSREADONLY (userAddressStr,gnsbtDiff) = {
11161133 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStr, 0, 0], nil))
11171134 let gnsbtAmt = (asInt(gnsbtData[0]) + gnsbtDiff)
11181135 let gnsbtAmtTotal = (asInt(gnsbtData[1]) + gnsbtDiff)
11191136 let swapLimitData = asAnyList(invoke(mathContract, "calcSwapLimitREADONLY", [gnsbtAmt], nil))
11201137 let tokenSwapLimitInUsdMax = asInt(swapLimitData[0])
11211138 let usdnSwapLimitMax = asInt(swapLimitData[2])
11221139 let lastSwapHeight = valueOrElse(getInteger(this, keyUserLastSwapHeight(userAddressStr)), 0)
11231140 let swapLimitTimelifeBlocks = swapsTimeframeREAD()
11241141 let passedBlocksAfterLastSwap = (height - lastSwapHeight)
11251142 let isSwapTimelifeNew = (passedBlocksAfterLastSwap >= swapLimitTimelifeBlocks)
11261143 let swapLimitSpentInUsdn = if (isSwapTimelifeNew)
11271144 then 0
11281145 else valueOrElse(getInteger(this, keySwapUserSpentInPeriod(userAddressStr)), 0)
11291146 let blcks2LmtReset = if (isSwapTimelifeNew)
11301147 then 0
11311148 else (swapLimitTimelifeBlocks - passedBlocksAfterLastSwap)
11321149 $Tuple2(nil, $Tuple7(tokenSwapLimitInUsdMax, swapLimitSpentInUsdn, blcks2LmtReset, gnsbtAmt, gnsbtAmtTotal, 0, usdnSwapLimitMax))
11331150 }
11341151
11351152
11361153
11371154 @Callable(i)
11381155 func calcWithdrawResultSYSREADONLY (swapType,inAmount,price,inAsset) = {
11391156 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
11401157 $Tuple2(nil, calcWithdraw(swapType, inAmount, price, neutrinoMetrics, inAsset))
11411158 }
11421159
11431160
11441161
11451162 @Callable(i)
11461163 func replaceCommunityNode (oldAddrStr,newAddrStr,groupNum,penaltyAmount) = {
11471164 let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur")
11481165 let mngPub = fromBase58String(mngPubS)
11491166 if ((i.callerPublicKey != mngPub))
11501167 then throw("replaceCommunityNode not authorized")
11511168 else {
11521169 let groupKey = getLeaseGroupNodeListKey(groupNum)
11531170 let groupNodeListS = getStringOrFail(this, groupKey)
11541171 if (!(contains(groupNodeListS, oldAddrStr)))
11551172 then throw(((("Group " + toString(groupNum)) + " does not contain address ") + oldAddrStr))
11561173 else {
11571174 let doReplace = invoke(nodeRegistryContract, "replaceApprovedNode", [oldAddrStr, newAddrStr, groupNum, penaltyAmount], nil)
11581175 if ((doReplace == doReplace))
11591176 then {
11601177 let oldLeaseIdKey = getLeaseIdByAddressKey(oldAddrStr)
11611178 let oldLeaseAmtKey = getLeaseAmountByAddressKey(oldAddrStr)
11621179 let leaseAmt = getIntegerValue(oldLeaseAmtKey)
11631180 let newLeaseIdKey = getLeaseIdByAddressKey(newAddrStr)
11641181 let newLeaseAmtKey = getLeaseAmountByAddressKey(newAddrStr)
11651182 let newLease = Lease(addressFromStringValue(newAddrStr), leaseAmt)
11661183 let updatedGroupNodeListS = makeString(split(groupNodeListS, oldAddrStr), newAddrStr)
11671184 $Tuple2([LeaseCancel(getBinaryValue(oldLeaseIdKey)), DeleteEntry(oldLeaseIdKey), DeleteEntry(oldLeaseAmtKey), StringEntry(groupKey, updatedGroupNodeListS), newLease, BinaryEntry(newLeaseIdKey, lcalc(newLease)), IntegerEntry(newLeaseAmtKey, leaseAmt)], unit)
11681185 }
11691186 else throw("Strict value is not equal to itself.")
11701187 }
11711188 }
11721189 }
11731190
11741191
11751192 @Verifier(tx)
11761193 func verify () = {
11771194 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP)
11781195 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
11791196 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
11801197 then 1
11811198 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
11821199 then 1
11831200 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
11841201 then 1
11851202 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
11861203 then 2
11871204 else 0))
11881205 if (if (isBlocked)
11891206 then (getStringValue(controlContract, "is_blocked_caller") == toString(govContract))
11901207 else false)
11911208 then validateUpdate(tx)
11921209 else match tx {
11931210 case sponsorTx: SponsorFeeTransaction =>
11941211 if (checkIsValidMinSponsoredFee(sponsorTx))
11951212 then (count >= 3)
11961213 else false
11971214 case _ =>
11981215 (count >= 3)
11991216 }
12001217 }
12011218

github/deemru/w8io/026f985 
162.36 ms