tx · NiNbdY9WuBDMMPg76CeFVimKAJMj73kmkz2e7J1sDT9

3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE:  -0.02000000 Waves

2023.05.12 14:13 [2574647] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves

{ "type": 13, "id": "NiNbdY9WuBDMMPg76CeFVimKAJMj73kmkz2e7J1sDT9", "fee": 2000000, "feeAssetId": null, "timestamp": 1683890073338, "version": 2, "chainId": 84, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "5jjf2HuzoT7jXMWSjBojzwd2jQ1GdT53j8CvF9MWidJAzMr6MX1VA8cUie9FoCNSu6SaNHk3SHSFu9nCuPNCpJzP" ], "script": "base64:BgL5HAgCEgYKBAEYEQESBAoCCAESABIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESABIDCgEIEgcKBQgICAgIEgQKAhgREgASAwoBCCIDU0VQIgVTQ0FMRSIFTVVMVDgiCnplcm9CaWdJbnQiFHByb2Nlc3NpbmdTdGFnZVRvdGFsIhVwcm9jZXNzaW5nU3RhZ2VTaGFyZXMiC3dhdmVzU3RyaW5nIg5nZXROdW1iZXJCeUtleSIDa2V5Ig9nZXROdW1iZXJPckZhaWwiDmdldFN0cmluZ0J5S2V5Ig9nZXRTdHJpbmdPckZhaWwiDHBhcnNlQXNzZXRJZCIFaW5wdXQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiA2FicyIDdmFsIglhYnNCaWdJbnQiC2tleU1heERlcHRoIg9tYXhEZXB0aERlZmF1bHQiCG1heERlcHRoIhFrZXlGYWN0b3J5QWRkcmVzcyIRZmFjdG9yeUFkZHJlc3NTdHIiD2ZhY3RvcnlDb250cmFjdCISa2V5RW1pc3Npb25BZGRyZXNzIhlrZXlWb3RpbmdFbWlzc2lvbkNv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CQBnAgUCZHcJAJADAQUCYkkGCQEBcQECE1RvbyBtYW55IHJlY2lwaWVudHMJAMwIAgMFAmR2BgkBAXEBAhdBcmd1bWVudHMgc2l6ZSBtaXNtYXRjaAkAzAgCAwkAAAIFAmR5BQJhZwYJAQFxAQITV3JvbmcgYXNzZXQgcGF5bWVudAUDbmlsAwkAAAIFAmJMBQJiTAQCYk0JAPwHBAUEdGhpcwITdHJhZGVSZXdhcmRJbnRlcm5hbAkAzAgCBQJkegkAzAgCBQJiSQkAzAgCBQJiSgkAzAgCAAAFA25pbAUDbmlsAwkAAAIFAmJNBQJiTQkAlAoCBQNuaWwFAmJNCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFUARJjbGFpbVRyYWRpbmdSZXdhcmQABAJhVggFAmFUBmNhbGxlcgQCZEEJAQJiRwEJAKUIAQUCYVYDCQBmAgUCZEEAAAkAlAoCCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFAmFWBQJkQQUCYWcFA25pbAUCZEEJAQFxAQIQbm90aGluZyB0byBjbGFpbQJhVAEaY2xhaW1UcmFkaW5nUmV3YXJkUkVBRE9OTFkBAmFWCQCUCgIFA25pbAkBAmJHAQUCYVYBAmRCAQJkQwAEAmREBAJiZgkBAmJoAAMJAAECBQJiZgIKQnl0ZVZlY3RvcgQCYmwFAmJmBQJibAMJAAECBQJiZgIEVW5pdAgFAmRCD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJkQglib2R5Qnl0ZXMJAJEDAggFAmRCBnByb29mcwAABQJkRI32qhc=", "height": 2574647, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 121KLAoDzyHyfc45Y69acyfxP1nJKnQE1VHsU4juyXwD Next: ENKWA3RNDcDLpEK28C5qzF375AxfNGdY1j7RmbTG5U3r Diff:
OldNewDifferences
1313
1414 let processingStageShares = 1
1515
16+let wavesString = "WAVES"
17+
1618 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1719
1820
2325
2426
2527 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined"))
28+
29+
30+func parseAssetId (input) = if ((input == wavesString))
31+ then unit
32+ else fromBase58String(input)
33+
34+
35+func wrapErr (msg) = makeString(["gwx_reward.ride:", msg], " ")
36+
37+
38+func throwErr (msg) = throw(wrapErr(msg))
2639
2740
2841 func abs (val) = if ((0 > val))
5063
5164 func keyEmissionAddress () = "%s%s__config__emissionAddress"
5265
66+
67+func keyVotingEmissionContract () = makeString(["%s", "votingEmissionContract"], SEP)
68+
69+
70+let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract()))
5371
5472 func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP)
5573
99117 func keyConfig () = "%s__config"
100118
101119
120+func getEmissionAddress () = addressFromStringValue(valueOrErrorMessage(getString(this, keyEmissionAddress()), (("mandatory this." + keyEmissionAddress()) + " is not defined")))
121+
122+
123+let emissionAddress = getEmissionAddress()
124+
125+let wxAssetIdStr = split(value(getString(emissionAddress, keyConfig())), SEP)[1]
126+
127+let wxAssetId = fromBase58String(wxAssetIdStr)
128+
102129 func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP)
103130
104131
118145
119146
120147 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
148+
149+
150+func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current"
151+
152+
153+func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next"
121154
122155
123156 func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL"
181214
182215
183216 let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress()))
217+
218+func keyTradingRewardHistory (user,i) = makeString(["%s%s%s%s", "tradingReward", "history", user, toBase58String(i.transactionId)], SEP)
219+
220+
221+func keyTradingReward (userAddress) = makeString(["%s%s", "tradingReward", userAddress], SEP)
222+
223+
224+func keyMaxRecipients () = makeString(["%s", "maxRecipients"], SEP)
225+
184226
185227 func HistoryEntry (type,user,amount,i) = {
186228 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
304346 }
305347
306348
349+func getTradingReward (userAddress) = valueOrElse(getInteger(this, keyTradingReward(userAddress)), 0)
350+
351+
352+@Callable(i)
353+func tradeRewardInternal (paymentAmountLeftOver,userAddresses,rewards,currentIter) = if ((currentIter == size(userAddresses)))
354+ then nil
355+ else {
356+ let checks = [if ((i.caller == this))
357+ then true
358+ else throwErr("Permission denied"), if ((paymentAmountLeftOver >= rewards[currentIter]))
359+ then true
360+ else throwErr("insufficient payment assetId")]
361+ if ((checks == checks))
362+ then {
363+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [(paymentAmountLeftOver - rewards[currentIter]), userAddresses, rewards, (currentIter + 1)], nil)
364+ if ((tradeRewardInternal == tradeRewardInternal))
365+ then {
366+ let tradingRewardHistoryKey = keyTradingRewardHistory(userAddresses[currentIter], i)
367+ let userAddress = addressFromStringValue(userAddresses[currentIter])
368+ $Tuple2([IntegerEntry(tradingRewardHistoryKey, rewards[currentIter]), IntegerEntry(keyTradingReward(userAddresses[currentIter]), rewards[currentIter])], tradeRewardInternal)
369+ }
370+ else throw("Strict value is not equal to itself.")
371+ }
372+ else throw("Strict value is not equal to itself.")
373+ }
374+
375+
376+
307377 @Callable(i)
308378 func updateReferralActivity (userAddress,gWxAmountStart) = {
309379 let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress))
331401 then $Tuple2(nil, false)
332402 else if ((processingStage == processingStageTotal))
333403 then {
334- let $t01216712283 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
335- let userWeight = $t01216712283._1
336- let userActions = $t01216712283._2
404+ let $t01451014626 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
405+ let userWeight = $t01451014626._1
406+ let userActions = $t01451014626._2
337407 let totalWeightNew = (totalWeight + userWeight)
338408 let processingActions = if (((usersCount - 1) > currentUser))
339409 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
408478
409479 @Callable(i)
410480 func deposit () = {
411- let cfgArray = readConfigArrayOrFail()
412- if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress]))))
413- then throw("Wrong caller address")
414- else {
415- let assetId = value(value(i.payments[0]).assetId)
416- if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId])))
417- then throw("Wrong payment asset")
418- else {
419- let period = nextPeriod()
420- let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight()))
421- let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined"))
422- let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined"))
423- let auxAmount = fraction((deltaH * weight), emissionRate, MULT8)
424- let em = invoke(emissionContract, "emit", [auxAmount], nil)
481+ let checkCaller = if ((i.caller == votingEmissionContract))
482+ then true
483+ else mustManager(i)
484+ if ((checkCaller == checkCaller))
485+ then {
486+ let period = nextPeriod()
487+ let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight()))
488+ let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined"))
489+ let gwxHoldersRewardCurrent = valueOrElse(getInteger(emissionContract, keyGwxHoldersRewardCurrent()), 0)
490+ if ((gwxHoldersRewardCurrent == gwxHoldersRewardCurrent))
491+ then {
492+ let auxAmount = fraction((deltaH * gwxHoldersRewardCurrent), emissionRate, MULT8)
493+ let em = if ((auxAmount > 0))
494+ then invoke(emissionContract, "emit", [auxAmount], nil)
495+ else unit
425496 if ((em == em))
426497 then {
427- let matcherPart = value(i.payments[0]).amount
498+ let matcherPart = 0
428499 let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount)
429-[IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)]
500+ let gwxHoldersRewardUpdated = {
501+ let @ = invoke(emissionContract, "gwxHoldersRewardUpdate", nil, nil)
502+ if ($isInstanceOf(@, "Boolean"))
503+ then @
504+ else throw(($getType(@) + " couldn't be cast to Boolean"))
505+ }
506+ if ((gwxHoldersRewardUpdated == gwxHoldersRewardUpdated))
507+ then {
508+ let totalReward = (matcherPart + auxAmount)
509+ let actions = if (if ((totalReward == 0))
510+ then !(gwxHoldersRewardUpdated)
511+ else false)
512+ then nil
513+ else [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)]
514+ $Tuple2(actions, unit)
515+ }
516+ else throw("Strict value is not equal to itself.")
430517 }
431518 else throw("Strict value is not equal to itself.")
432519 }
520+ else throw("Strict value is not equal to itself.")
433521 }
522+ else throw("Strict value is not equal to itself.")
434523 }
435524
436525
439528 func claimReward () = {
440529 let cfgArray = readConfigArrayOrFail()
441530 let address = toString(i.caller)
442- let $t01762517675 = commonClaimReward(address)
443- let amount = $t01762517675._1
444- let actions = $t01762517675._2
531+ let $t01981519865 = commonClaimReward(address)
532+ let amount = $t01981519865._1
533+ let actions = $t01981519865._2
445534 let checkAmount = if ((amount > 0))
446535 then true
447536 else throw("Nothing to claim")
464553
465554 @Callable(i)
466555 func claimRewardREADONLY (address) = {
467- let $t01824818298 = commonClaimReward(address)
468- let amount = $t01824818298._1
469- let actions = $t01824818298._2
556+ let $t02043820488 = commonClaimReward(address)
557+ let amount = $t02043820488._1
558+ let actions = $t02043820488._2
470559 let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0)
471560 let totalAmount = (amount + referralUnclaimed)
472561 $Tuple2(nil, totalAmount)
533622 let ann = (amp * nCoins)
534623 let arr = [0, 1, 2, 3, 4, 5, 6]
535624 func calc (acc,cur) = {
536- let $t02093120958 = acc
537- let d = $t02093120958._1
538- let dPrev = $t02093120958._2
539- let found = $t02093120958._3
625+ let $t02312123148 = acc
626+ let d = $t02312123148._1
627+ let dPrev = $t02312123148._2
628+ let found = $t02312123148._3
540629 if ((found != unit))
541630 then acc
542631 else {
549638 }
550639 }
551640
552- let $t02155621619 = {
641+ let $t02374623809 = {
553642 let $l = arr
554643 let $s = size($l)
555644 let $acc0 = $Tuple3(s, unit, unit)
563652
564653 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7)
565654 }
566- let dNext = $t02155621619._1
567- let dPrev = $t02155621619._2
568- let found = $t02155621619._3
655+ let dNext = $t02374623809._1
656+ let dPrev = $t02374623809._2
657+ let found = $t02374623809._3
569658 if ((found != unit))
570659 then $Tuple2(nil, toString(dNext))
571660 else {
574663 }
575664 }
576665 }
666+
667+
668+
669+@Callable(i)
670+func tradeReward (userAddresses,rewards) = {
671+ let argsComparison = (size(userAddresses) == size(rewards))
672+ let maxRecipients = valueOrElse(getInteger(keyMaxRecipients()), 0)
673+ let payment = i.payments[0]
674+ let paymentAssetId = payment.assetId
675+ let paymentAmount = payment.amount
676+ let checks = [if ((maxRecipients >= size(userAddresses)))
677+ then true
678+ else throwErr("Too many recipients"), if (argsComparison)
679+ then true
680+ else throwErr("Arguments size mismatch"), if ((paymentAssetId == wxAssetId))
681+ then true
682+ else throwErr("Wrong asset payment")]
683+ if ((checks == checks))
684+ then {
685+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [paymentAmount, userAddresses, rewards, 0], nil)
686+ if ((tradeRewardInternal == tradeRewardInternal))
687+ then $Tuple2(nil, tradeRewardInternal)
688+ else throw("Strict value is not equal to itself.")
689+ }
690+ else throw("Strict value is not equal to itself.")
691+ }
692+
693+
694+
695+@Callable(i)
696+func claimTradingReward () = {
697+ let userAddress = i.caller
698+ let reward = getTradingReward(toString(userAddress))
699+ if ((reward > 0))
700+ then $Tuple2([ScriptTransfer(userAddress, reward, wxAssetId)], reward)
701+ else throwErr("nothing to claim")
702+ }
703+
704+
705+
706+@Callable(i)
707+func claimTradingRewardREADONLY (userAddress) = $Tuple2(nil, getTradingReward(userAddress))
577708
578709
579710 @Verifier(tx)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let SCALE = 1000
77
88 let MULT8 = 100000000
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let processingStageTotal = 0
1313
1414 let processingStageShares = 1
1515
16+let wavesString = "WAVES"
17+
1618 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1719
1820
1921 func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined"))
2022
2123
2224 func getStringByKey (key) = valueOrElse(getString(this, key), "")
2325
2426
2527 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined"))
28+
29+
30+func parseAssetId (input) = if ((input == wavesString))
31+ then unit
32+ else fromBase58String(input)
33+
34+
35+func wrapErr (msg) = makeString(["gwx_reward.ride:", msg], " ")
36+
37+
38+func throwErr (msg) = throw(wrapErr(msg))
2639
2740
2841 func abs (val) = if ((0 > val))
2942 then -(val)
3043 else val
3144
3245
3346 func absBigInt (val) = if ((zeroBigInt > val))
3447 then -(val)
3548 else val
3649
3750
3851 let keyMaxDepth = "%s__maxDepth"
3952
4053 let maxDepthDefault = 30
4154
4255 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
4356
4457 func keyFactoryAddress () = "%s%s__config__factoryAddress"
4558
4659
4760 let factoryAddressStr = getStringOrFail(keyFactoryAddress())
4861
4962 let factoryContract = addressFromStringValue(factoryAddressStr)
5063
5164 func keyEmissionAddress () = "%s%s__config__emissionAddress"
5265
66+
67+func keyVotingEmissionContract () = makeString(["%s", "votingEmissionContract"], SEP)
68+
69+
70+let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract()))
5371
5472 func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP)
5573
5674
5775 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
5876
5977 let referralProgramNameDefault = "wxlock"
6078
6179 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
6280
6381 let keyReferralMinGWxAmount = makeString(["%s%s", "referral", "minGWxAmount"], SEP)
6482
6583 let referralMinGWxAmountDefault = (500 * MULT8)
6684
6785 let referralMinGWxAmount = valueOrElse(getInteger(this, keyReferralMinGWxAmount), referralMinGWxAmountDefault)
6886
6987 let keyReferrerRewardPermille = makeString(["%s%s", "referral", "referrerRewardPermille"], SEP)
7088
7189 let referrerRewardPermilleDefault = 50
7290
7391 let referrerRewardPermille = valueOrElse(getInteger(this, keyReferrerRewardPermille), referrerRewardPermilleDefault)
7492
7593 let keyReferralRewardPermille = makeString(["%s%s", "referral", "referralRewardPermille"], SEP)
7694
7795 let referralRewardPermilleDefault = 50
7896
7997 let referralRewardPermille = valueOrElse(getInteger(this, keyReferralRewardPermille), referralRewardPermilleDefault)
8098
8199 func keyReferrer (referralAddress) = makeString(["%s%s%s", "referrer", referralProgramName, referralAddress], SEP)
82100
83101
84102 func keyUnclaimedReferral (programName,claimerAddress) = makeString(["%s%s%s", "unclaimedReferral", programName, claimerAddress], SEP)
85103
86104
87105 let emissionAddressStr = getStringOrFail(keyEmissionAddress())
88106
89107 let emissionContract = addressFromStringValue(emissionAddressStr)
90108
91109 let IdxCfgAssetId = 1
92110
93111 let IdxCfgPacemakerAddress = 2
94112
95113 let IdxCfgBoostingContract = 3
96114
97115 let IdxCfgMaxDepth = 4
98116
99117 func keyConfig () = "%s__config"
100118
101119
120+func getEmissionAddress () = addressFromStringValue(valueOrErrorMessage(getString(this, keyEmissionAddress()), (("mandatory this." + keyEmissionAddress()) + " is not defined")))
121+
122+
123+let emissionAddress = getEmissionAddress()
124+
125+let wxAssetIdStr = split(value(getString(emissionAddress, keyConfig())), SEP)[1]
126+
127+let wxAssetId = fromBase58String(wxAssetIdStr)
128+
102129 func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP)
103130
104131
105132 func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP)
106133
107134
108135 func boostingContractOrFail () = {
109136 let cfgArray = readConfigArrayOrFail()
110137 valueOrErrorMessage(addressFromString(cfgArray[IdxCfgBoostingContract]), "boosting contract address is not defined")
111138 }
112139
113140
114141 func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
115142
116143
117144 func keyUsersCount () = "%s__nextUserNum"
118145
119146
120147 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
148+
149+
150+func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current"
151+
152+
153+func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next"
121154
122155
123156 func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL"
124157
125158
126159 func keyNextProcessedUser () = "%s__nextProcessedUser"
127160
128161
129162 func keyLatestPeriod () = "%s__latestPeriod"
130163
131164
132165 func keyNextPeriod () = "%s__nextPeriod"
133166
134167
135168 func keyProcessingStage () = "%s__processingStage"
136169
137170
138171 func keyNextProcessedPeriod () = "%s__nextProcessedPeriod"
139172
140173
141174 func keyUserUnclaimed (userIndex) = makeString(["%s%d", "userUnclaimed", toString(userIndex)], SEP)
142175
143176
144177 func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP)
145178
146179
147180 func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP)
148181
149182
150183 func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP)
151184
152185
153186 func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP)
154187
155188
156189 func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP)
157190
158191
159192 func keyLastPayoutInfo () = "%s__lastPayoutInfo"
160193
161194
162195 func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP)
163196
164197
165198 func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP)
166199
167200
168201 func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP)
169202
170203
171204 func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP)
172205
173206
174207 func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP)
175208
176209
177210 func keyUserWeightForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "weight", toString(period)], SEP)
178211
179212
180213 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
181214
182215
183216 let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress()))
217+
218+func keyTradingRewardHistory (user,i) = makeString(["%s%s%s%s", "tradingReward", "history", user, toBase58String(i.transactionId)], SEP)
219+
220+
221+func keyTradingReward (userAddress) = makeString(["%s%s", "tradingReward", userAddress], SEP)
222+
223+
224+func keyMaxRecipients () = makeString(["%s", "maxRecipients"], SEP)
225+
184226
185227 func HistoryEntry (type,user,amount,i) = {
186228 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
187229 let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], SEP)
188230 StringEntry(historyKEY, historyDATA)
189231 }
190232
191233
192234 func keyManagerPublicKey () = "%s__managerPublicKey"
193235
194236
195237 func keyManagerVaultAddress () = "%s__managerVaultAddress"
196238
197239
198240 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
199241 case s: String =>
200242 addressFromStringValue(s)
201243 case _ =>
202244 this
203245 }
204246
205247
206248 func managerPublicKeyOrUnit () = {
207249 let managerVaultAddress = getManagerVaultAddressOrThis()
208250 match getString(managerVaultAddress, keyManagerPublicKey()) {
209251 case s: String =>
210252 fromBase58String(s)
211253 case _: Unit =>
212254 unit
213255 case _ =>
214256 throw("Match error")
215257 }
216258 }
217259
218260
219261 func mustManager (i) = {
220262 let pd = throw("Permission denied")
221263 match managerPublicKeyOrUnit() {
222264 case pk: ByteVector =>
223265 if ((i.callerPublicKey == pk))
224266 then true
225267 else pd
226268 case _: Unit =>
227269 if ((i.caller == this))
228270 then true
229271 else pd
230272 case _ =>
231273 throw("Match error")
232274 }
233275 }
234276
235277
236278 func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = {
237279 let kLast = keyLastProcessedPeriodOfUser(userIndex)
238280 let kKey = keyUserKValueForPeriod(period, userIndex)
239281 let kRaw = getInteger(boostingContractAddress, kKey)
240282 let kUserWeight = keyUserWeightForPeriod(period, userIndex)
241283 if (isDefined(kRaw))
242284 then {
243285 let k = value(kRaw)
244286 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex)))
245287 let w = ((k * heightForPeriod) + b)
246288 if ((w > 0))
247289 then $Tuple2((w / SCALE), [IntegerEntry(kLast, period), IntegerEntry(kUserWeight, w)])
248290 else $Tuple2(0, nil)
249291 }
250292 else {
251293 let p = getInteger(this, kLast)
252294 if (if (isDefined(p))
253295 then (period >= value(p))
254296 else false)
255297 then {
256298 let pv = value(p)
257299 let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex)))
258300 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex)))
259301 let w = ((k * heightForPeriod) + b)
260302 if ((w > 0))
261303 then $Tuple2((w / SCALE), [IntegerEntry(kUserWeight, w)])
262304 else $Tuple2(0, nil)
263305 }
264306 else $Tuple2(0, nil)
265307 }
266308 }
267309
268310
269311 func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex) = {
270312 let kUserWeight = keyUserWeightForPeriod(period, userIndex)
271313 let userWeightOrUnit = getInteger(kUserWeight)
272314 match userWeightOrUnit {
273315 case _: Unit =>
274316 0
275317 case w: Int =>
276318 (w / SCALE)
277319 case _ =>
278320 throw("Match error")
279321 }
280322 }
281323
282324
283325 func getUserIndexByAddress (boostingContractAddressStr,userAddress) = {
284326 let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP)
285327 parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key)))
286328 }
287329
288330
289331 func nextPeriod () = getNumberByKey(keyNextPeriod())
290332
291333
292334 func commonClaimReward (userAddress) = {
293335 let cfgArray = readConfigArrayOrFail()
294336 let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress)
295337 let userUnclaimedOption = getInteger(keyUserUnclaimed(userIdx))
296338 match userUnclaimedOption {
297339 case _: Unit =>
298340 $Tuple2(0, nil)
299341 case u: Int =>
300342 $Tuple2(u, [IntegerEntry(keyUserUnclaimed(userIdx), 0)])
301343 case _ =>
302344 throw("Match error")
303345 }
304346 }
305347
306348
349+func getTradingReward (userAddress) = valueOrElse(getInteger(this, keyTradingReward(userAddress)), 0)
350+
351+
352+@Callable(i)
353+func tradeRewardInternal (paymentAmountLeftOver,userAddresses,rewards,currentIter) = if ((currentIter == size(userAddresses)))
354+ then nil
355+ else {
356+ let checks = [if ((i.caller == this))
357+ then true
358+ else throwErr("Permission denied"), if ((paymentAmountLeftOver >= rewards[currentIter]))
359+ then true
360+ else throwErr("insufficient payment assetId")]
361+ if ((checks == checks))
362+ then {
363+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [(paymentAmountLeftOver - rewards[currentIter]), userAddresses, rewards, (currentIter + 1)], nil)
364+ if ((tradeRewardInternal == tradeRewardInternal))
365+ then {
366+ let tradingRewardHistoryKey = keyTradingRewardHistory(userAddresses[currentIter], i)
367+ let userAddress = addressFromStringValue(userAddresses[currentIter])
368+ $Tuple2([IntegerEntry(tradingRewardHistoryKey, rewards[currentIter]), IntegerEntry(keyTradingReward(userAddresses[currentIter]), rewards[currentIter])], tradeRewardInternal)
369+ }
370+ else throw("Strict value is not equal to itself.")
371+ }
372+ else throw("Strict value is not equal to itself.")
373+ }
374+
375+
376+
307377 @Callable(i)
308378 func updateReferralActivity (userAddress,gWxAmountStart) = {
309379 let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress))
310380 let activeReferralInv = if ((referrer == unit))
311381 then unit
312382 else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (gWxAmountStart >= referralMinGWxAmount)], nil)
313383 if ((activeReferralInv == activeReferralInv))
314384 then $Tuple2(nil, unit)
315385 else throw("Strict value is not equal to itself.")
316386 }
317387
318388
319389
320390 @Callable(i)
321391 func finalizeHelper () = {
322392 let processingStage = valueOrElse(getInteger(keyProcessingStage()), processingStageTotal)
323393 let currentPeriod = getNumberByKey(keyNextProcessedPeriod())
324394 let currentUser = getNumberByKey(keyNextProcessedUser())
325395 let latestPeriod = getNumberByKey(keyLatestPeriod())
326396 let usersCount = valueOrElse(getInteger(boostingContractOrFail(), keyUsersCount()), 0)
327397 let totalWeightKey = keyTotalWeightForPeriod(currentPeriod)
328398 let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod))
329399 let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod))
330400 if ((currentPeriod > latestPeriod))
331401 then $Tuple2(nil, false)
332402 else if ((processingStage == processingStageTotal))
333403 then {
334- let $t01216712283 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
335- let userWeight = $t01216712283._1
336- let userActions = $t01216712283._2
404+ let $t01451014626 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
405+ let userWeight = $t01451014626._1
406+ let userActions = $t01451014626._2
337407 let totalWeightNew = (totalWeight + userWeight)
338408 let processingActions = if (((usersCount - 1) > currentUser))
339409 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
340410 else [IntegerEntry(keyProcessingStage(), processingStageShares), IntegerEntry(keyNextProcessedUser(), 0)]
341411 $Tuple2((([IntegerEntry(totalWeightKey, totalWeightNew)] ++ processingActions) ++ userActions), true)
342412 }
343413 else if ((processingStage == processingStageShares))
344414 then {
345415 let userWeight = calcUserWeightForClaim(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
346416 let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight)
347417 let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight)
348418 let userTotalAmount = (userAmountEmissionForPeriod + userAmountMatcherForPeriod)
349419 let userUnclaimedOption = getInteger(keyUserUnclaimed(currentUser))
350420 let userAddress = getStringValue(boostingContractOrFail(), keyNumToUserMapping(currentUser))
351421 let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress))
352422 let activeReferralInv = if ((referrer == unit))
353423 then unit
354424 else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (userWeight >= referralMinGWxAmount)], nil)
355425 if ((activeReferralInv == activeReferralInv))
356426 then {
357427 let referralInv = if (if ((referrer == unit))
358428 then true
359429 else (referralMinGWxAmount > userWeight))
360430 then unit
361431 else {
362432 let referrerReward = fraction(userTotalAmount, referrerRewardPermille, SCALE)
363433 let referralReward = fraction(userTotalAmount, referralRewardPermille, SCALE)
364434 invoke(referralsContractAddressOrFail, "incUnclaimed", [referralProgramName, userAddress, referrerReward, referralReward], nil)
365435 }
366436 if ((referralInv == referralInv))
367437 then {
368438 let unclaimedActions = [IntegerEntry(keyUserUnclaimed(currentUser), (valueOrElse(userUnclaimedOption, 0) + userTotalAmount))]
369439 let processingActions = if (((usersCount - 1) > currentUser))
370440 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
371441 else [IntegerEntry(keyNextProcessedPeriod(), (currentPeriod + 1)), IntegerEntry(keyNextProcessedUser(), 0), DeleteEntry(keyProcessingStage())]
372442 $Tuple2((unclaimedActions ++ processingActions), true)
373443 }
374444 else throw("Strict value is not equal to itself.")
375445 }
376446 else throw("Strict value is not equal to itself.")
377447 }
378448 else throw("invalid processing stage")
379449 }
380450
381451
382452
383453 @Callable(i)
384454 func finalizeWrapper (counter) = {
385455 let result = {
386456 let @ = invoke(this, "finalizeHelper", nil, nil)
387457 if ($isInstanceOf(@, "Boolean"))
388458 then @
389459 else throw(($getType(@) + " couldn't be cast to Boolean"))
390460 }
391461 if ((result == result))
392462 then if (!(result))
393463 then if ((counter == maxDepth))
394464 then throw("Nothing to process")
395465 else $Tuple2(nil, unit)
396466 else if ((counter > 0))
397467 then $Tuple2(nil, invoke(this, "finalizeWrapper", [(counter - 1)], nil))
398468 else $Tuple2(nil, unit)
399469 else throw("Strict value is not equal to itself.")
400470 }
401471
402472
403473
404474 @Callable(i)
405475 func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [maxDepth], nil))
406476
407477
408478
409479 @Callable(i)
410480 func deposit () = {
411- let cfgArray = readConfigArrayOrFail()
412- if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress]))))
413- then throw("Wrong caller address")
414- else {
415- let assetId = value(value(i.payments[0]).assetId)
416- if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId])))
417- then throw("Wrong payment asset")
418- else {
419- let period = nextPeriod()
420- let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight()))
421- let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined"))
422- let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined"))
423- let auxAmount = fraction((deltaH * weight), emissionRate, MULT8)
424- let em = invoke(emissionContract, "emit", [auxAmount], nil)
481+ let checkCaller = if ((i.caller == votingEmissionContract))
482+ then true
483+ else mustManager(i)
484+ if ((checkCaller == checkCaller))
485+ then {
486+ let period = nextPeriod()
487+ let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight()))
488+ let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined"))
489+ let gwxHoldersRewardCurrent = valueOrElse(getInteger(emissionContract, keyGwxHoldersRewardCurrent()), 0)
490+ if ((gwxHoldersRewardCurrent == gwxHoldersRewardCurrent))
491+ then {
492+ let auxAmount = fraction((deltaH * gwxHoldersRewardCurrent), emissionRate, MULT8)
493+ let em = if ((auxAmount > 0))
494+ then invoke(emissionContract, "emit", [auxAmount], nil)
495+ else unit
425496 if ((em == em))
426497 then {
427- let matcherPart = value(i.payments[0]).amount
498+ let matcherPart = 0
428499 let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount)
429-[IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)]
500+ let gwxHoldersRewardUpdated = {
501+ let @ = invoke(emissionContract, "gwxHoldersRewardUpdate", nil, nil)
502+ if ($isInstanceOf(@, "Boolean"))
503+ then @
504+ else throw(($getType(@) + " couldn't be cast to Boolean"))
505+ }
506+ if ((gwxHoldersRewardUpdated == gwxHoldersRewardUpdated))
507+ then {
508+ let totalReward = (matcherPart + auxAmount)
509+ let actions = if (if ((totalReward == 0))
510+ then !(gwxHoldersRewardUpdated)
511+ else false)
512+ then nil
513+ else [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)]
514+ $Tuple2(actions, unit)
515+ }
516+ else throw("Strict value is not equal to itself.")
430517 }
431518 else throw("Strict value is not equal to itself.")
432519 }
520+ else throw("Strict value is not equal to itself.")
433521 }
522+ else throw("Strict value is not equal to itself.")
434523 }
435524
436525
437526
438527 @Callable(i)
439528 func claimReward () = {
440529 let cfgArray = readConfigArrayOrFail()
441530 let address = toString(i.caller)
442- let $t01762517675 = commonClaimReward(address)
443- let amount = $t01762517675._1
444- let actions = $t01762517675._2
531+ let $t01981519865 = commonClaimReward(address)
532+ let amount = $t01981519865._1
533+ let actions = $t01981519865._2
445534 let checkAmount = if ((amount > 0))
446535 then true
447536 else throw("Nothing to claim")
448537 if ((checkAmount == checkAmount))
449538 then {
450539 let amountFromEmission = 0
451540 let claimedReferral = {
452541 let @ = invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil)
453542 if ($isInstanceOf(@, "Int"))
454543 then @
455544 else throw(($getType(@) + " couldn't be cast to Int"))
456545 }
457546 let totalAmount = (amount + claimedReferral)
458547 $Tuple2(([ScriptTransfer(i.caller, totalAmount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, i)] ++ actions), [totalAmount, amountFromEmission])
459548 }
460549 else throw("Strict value is not equal to itself.")
461550 }
462551
463552
464553
465554 @Callable(i)
466555 func claimRewardREADONLY (address) = {
467- let $t01824818298 = commonClaimReward(address)
468- let amount = $t01824818298._1
469- let actions = $t01824818298._2
556+ let $t02043820488 = commonClaimReward(address)
557+ let amount = $t02043820488._1
558+ let actions = $t02043820488._2
470559 let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0)
471560 let totalAmount = (amount + referralUnclaimed)
472561 $Tuple2(nil, totalAmount)
473562 }
474563
475564
476565
477566 @Callable(i)
478567 func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1))
479568
480569
481570
482571 @Callable(i)
483572 func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo()))
484573
485574
486575
487576 @Callable(i)
488577 func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = {
489578 let lockEndHeight = (lockStartHeight + lockDurationBlocks)
490579 let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks))
491580 let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight)
492581 $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()])
493582 }
494583
495584
496585
497586 @Callable(i)
498587 func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = {
499588 let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration)
500589 let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8)
501590 $Tuple2(nil, [gWxAmountStart])
502591 }
503592
504593
505594
506595 @Callable(i)
507596 func onEmissionForGwxStart () = if ((i.caller != factoryContract))
508597 then throw("permissions denied")
509598 else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)]
510599
511600
512601
513602 @Callable(i)
514603 func latestPeriodEmissionRewardsREADONLY (address) = {
515604 let period = nextPeriod()
516605 $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))])
517606 }
518607
519608
520609
521610 @Callable(i)
522611 func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = {
523612 let nCoins = toBigInt(2)
524613 let aPrecision = parseBigIntValue(aPrecisionBigIntStr)
525614 let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr)
526615 let x1 = parseBigIntValue(x1BigIntStr)
527616 let x2 = parseBigIntValue(x2BigIntStr)
528617 let amp = (parseBigIntValue(ampBigIntStr) * aPrecision)
529618 let s = (x1 + x2)
530619 if ((s == zeroBigInt))
531620 then $Tuple2(nil, toString(zeroBigInt))
532621 else {
533622 let ann = (amp * nCoins)
534623 let arr = [0, 1, 2, 3, 4, 5, 6]
535624 func calc (acc,cur) = {
536- let $t02093120958 = acc
537- let d = $t02093120958._1
538- let dPrev = $t02093120958._2
539- let found = $t02093120958._3
625+ let $t02312123148 = acc
626+ let d = $t02312123148._1
627+ let dPrev = $t02312123148._2
628+ let found = $t02312123148._3
540629 if ((found != unit))
541630 then acc
542631 else {
543632 let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins))
544633 let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp)))
545634 let dDiff = absBigInt((dNext - value(d)))
546635 if ((targetPrecision >= dDiff))
547636 then $Tuple3(dNext, d, cur)
548637 else $Tuple3(dNext, d, unit)
549638 }
550639 }
551640
552- let $t02155621619 = {
641+ let $t02374623809 = {
553642 let $l = arr
554643 let $s = size($l)
555644 let $acc0 = $Tuple3(s, unit, unit)
556645 func $f0_1 ($a,$i) = if (($i >= $s))
557646 then $a
558647 else calc($a, $l[$i])
559648
560649 func $f0_2 ($a,$i) = if (($i >= $s))
561650 then $a
562651 else throw("List size exceeds 7")
563652
564653 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7)
565654 }
566- let dNext = $t02155621619._1
567- let dPrev = $t02155621619._2
568- let found = $t02155621619._3
655+ let dNext = $t02374623809._1
656+ let dPrev = $t02374623809._2
657+ let found = $t02374623809._3
569658 if ((found != unit))
570659 then $Tuple2(nil, toString(dNext))
571660 else {
572661 let dDiff = absBigInt((dNext - value(dPrev)))
573662 throw(("D calculation error, dDiff = " + toString(dDiff)))
574663 }
575664 }
576665 }
666+
667+
668+
669+@Callable(i)
670+func tradeReward (userAddresses,rewards) = {
671+ let argsComparison = (size(userAddresses) == size(rewards))
672+ let maxRecipients = valueOrElse(getInteger(keyMaxRecipients()), 0)
673+ let payment = i.payments[0]
674+ let paymentAssetId = payment.assetId
675+ let paymentAmount = payment.amount
676+ let checks = [if ((maxRecipients >= size(userAddresses)))
677+ then true
678+ else throwErr("Too many recipients"), if (argsComparison)
679+ then true
680+ else throwErr("Arguments size mismatch"), if ((paymentAssetId == wxAssetId))
681+ then true
682+ else throwErr("Wrong asset payment")]
683+ if ((checks == checks))
684+ then {
685+ let tradeRewardInternal = invoke(this, "tradeRewardInternal", [paymentAmount, userAddresses, rewards, 0], nil)
686+ if ((tradeRewardInternal == tradeRewardInternal))
687+ then $Tuple2(nil, tradeRewardInternal)
688+ else throw("Strict value is not equal to itself.")
689+ }
690+ else throw("Strict value is not equal to itself.")
691+ }
692+
693+
694+
695+@Callable(i)
696+func claimTradingReward () = {
697+ let userAddress = i.caller
698+ let reward = getTradingReward(toString(userAddress))
699+ if ((reward > 0))
700+ then $Tuple2([ScriptTransfer(userAddress, reward, wxAssetId)], reward)
701+ else throwErr("nothing to claim")
702+ }
703+
704+
705+
706+@Callable(i)
707+func claimTradingRewardREADONLY (userAddress) = $Tuple2(nil, getTradingReward(userAddress))
577708
578709
579710 @Verifier(tx)
580711 func verify () = {
581712 let targetPublicKey = match managerPublicKeyOrUnit() {
582713 case pk: ByteVector =>
583714 pk
584715 case _: Unit =>
585716 tx.senderPublicKey
586717 case _ =>
587718 throw("Match error")
588719 }
589720 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
590721 }
591722

github/deemru/w8io/169f3d6 
100.50 ms