tx · FisWfXcmP2HDisjzh8QUDSVtj5gya5bWqp5HuzvvbgSt

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02500000 Waves

2023.08.14 12:53 [2710082] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "FisWfXcmP2HDisjzh8QUDSVtj5gya5bWqp5HuzvvbgSt", "fee": 2500000, "feeAssetId": null, "timestamp": 1692006844043, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "3GqaFfiX53uWLFBJnetJJfmMPWdz3JZgkeGqDyuXNoYLvA8wGXgaBXiM1X95FabnsSkBiaCn7A4th7fQqMaf3Eq6" ], "script": "base64:BgLOLQgCEggKBggIAQEBCBIFCgMBCAISAwoBARIECgIICBIECgIICBIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIEgASABIFCgMICAQSAwoBCBIDCgEIEgQKAggIEgQKAggIIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIhBjb250cmFjdEZpbGVuYW1lIgdTQ0FMRTE4IgZNVUxUMTgiCE1VTFQxOEJJIhVkdXJhdGlvbk1vbnRoc0FsbG93ZWQiC2Jsb2Nrc0luRGF5Ig1ibG9ja3NJbk1vbnRoIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIMZ2V0SW50T3JaZXJvIg9nZXRJbnRPckRlZmF1bHQiCmRlZmF1bHRWYWwiDGdldEludE9yRmFpbCIDYWJzIgN2YWwiDmVuc3VyZVBvc2l0aXZlIgF2IgFtIhtrZXlSZWZlcnJhbHNDb250cmFjdEFkZHJlc3MiHnJlZmVycmFsc0NvbnRyYWN0QWRkcmVzc09yRmFpbCIWa2V5UmVmZ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YU4DCQAAAgUCZUYFAmVGCQECZEUACQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFOARJvblN0YWtlZFZvdGVVcGRhdGUDAmJGAmJOAmRxBAJlRgMJAAACCAUCYU4GY2FsbGVyBQJiUQYJAQJhTQEFAmFOAwkAAAIFAmVGBQJlRgQCZHQJAQJkcAMFAmJGBQJiTgUCZHEJAJQKAgUCZHQFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYU4BHWdldFZvdGluZ1Jlc3VsdFN0YWtlZFJFQURPTkxZAQJiRgkAlAoCBQNuaWwJAQJjVQEFAmJGAmFOASVnZXRWb3RpbmdSZXN1bHRTdGFrZWRJbnRlZ3JhbFJFQURPTkxZAQJiRgkAlAoCBQNuaWwJAQJjWQEFAmJGAmFOARxnZXRVc2VyVm90ZUZpbmFsaXplZFJFQURPTkxZAgJiRgJiTgkAlAoCBQNuaWwJAQJjTgIFAmJGBQJiTgJhTgEhZ2V0VXNlclZvdGVTdGFrZWRJbnRlZ3JhbFJFQURPTkxZAgJiRgJiTgkAlAoCBQNuaWwJAQJkaQIFAmJGBQJiTgECZVgBAmVZAAQCZVoEAmFJCQECYUsAAwkAAQIFAmFJAgpCeXRlVmVjdG9yBAJhUAUCYUkFAmFQAwkAAQIFAmFJAgRVbml0CAUCZVgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmVYCWJvZHlCeXRlcwkAkQMCCAUCZVgGcHJvb2ZzAAAFAmVay5RQ+A==", "height": 2710082, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HNuyo542xzNyJZ8fWbNgw4Y9zsDqt61JkAmxSk7M3QJc Next: 319rJAAw9xqhiwHhkf2aoRxkpy2JsiWLU9sKv1ym55HG Diff:
OldNewDifferences
142142
143143
144144 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
145-
146-
147-func keyNextPergetIntOrDefault () = "%s__nextPeriod"
148-
149-
150-func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
151145
152146
153147 let IdxCfgAssetId = 1
436430
437431
438432 func getVotingEmissionEpochInfo () = {
439- let $t01521215502 = {
433+ let $t01505115341 = {
440434 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
441435 let lastFinalizedEpoch = (currentEpochUi - 1)
442436 if ((0 > lastFinalizedEpoch))
443437 then throwErr("invalid epoch")
444438 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
445439 }
446- let currentEpochUi = $t01521215502._1
447- let lastFinalizedEpoch = $t01521215502._2
440+ let currentEpochUi = $t01505115341._1
441+ let lastFinalizedEpoch = $t01505115341._2
448442 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
449443 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
450444 }
477471
478472 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
479473 let userAddress = addressFromStringValue(userAddressStr)
480- let $t01619316273 = getVotingEmissionEpochInfo()
481- let lastFinalizedEpoch = $t01619316273._1
482- let currentEpochStartHeight = $t01619316273._2
483- let $t01627616351 = getPoolAssetsByLpAssetId(lpAssetIdStr)
484- let amountAssetId = $t01627616351._1
485- let priceAssetId = $t01627616351._2
474+ let $t01603216112 = getVotingEmissionEpochInfo()
475+ let lastFinalizedEpoch = $t01603216112._1
476+ let currentEpochStartHeight = $t01603216112._2
477+ let $t01611516190 = getPoolAssetsByLpAssetId(lpAssetIdStr)
478+ let amountAssetId = $t01611516190._1
479+ let priceAssetId = $t01611516190._2
486480 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
487481 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
488482 userVote
499493
500494
501495 func getVotingResultStaked (lpAssetIdStr) = {
502- let $t01689516975 = getVotingEmissionEpochInfo()
503- let lastFinalizedEpoch = $t01689516975._1
504- let currentEpochStartHeight = $t01689516975._2
496+ let $t01673416814 = getVotingEmissionEpochInfo()
497+ let lastFinalizedEpoch = $t01673416814._1
498+ let currentEpochStartHeight = $t01673416814._2
505499 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
506500 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
507501 votingResultStaked
509503
510504
511505 func getVotingResultStakedIntegral (lpAssetIdStr) = {
512- let $t01733717417 = getVotingEmissionEpochInfo()
513- let lastFinalizedEpoch = $t01733717417._1
514- let currentEpochStartHeight = $t01733717417._2
506+ let $t01717617256 = getVotingEmissionEpochInfo()
507+ let lastFinalizedEpoch = $t01717617256._1
508+ let currentEpochStartHeight = $t01717617256._2
515509 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
516510 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
517511 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
522516
523517
524518 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
525- let $t01825418334 = getVotingEmissionEpochInfo()
526- let lastFinalizedEpoch = $t01825418334._1
527- let currentEpochStartHeight = $t01825418334._2
519+ let $t01809318173 = getVotingEmissionEpochInfo()
520+ let lastFinalizedEpoch = $t01809318173._1
521+ let currentEpochStartHeight = $t01809318173._2
528522 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
529523 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
530524 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
533527
534528
535529 func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = {
536- let $t01894519025 = getVotingEmissionEpochInfo()
537- let lastFinalizedEpoch = $t01894519025._1
538- let currentEpochStartHeight = $t01894519025._2
530+ let $t01878418864 = getVotingEmissionEpochInfo()
531+ let lastFinalizedEpoch = $t01878418864._1
532+ let currentEpochStartHeight = $t01878418864._2
539533 let userAddress = addressFromStringValue(userAddressStr)
540534 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
541535 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
547541
548542
549543 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
550- let $t01981319893 = getVotingEmissionEpochInfo()
551- let lastFinalizedEpoch = $t01981319893._1
552- let currentEpochStartHeight = $t01981319893._2
544+ let $t01965219732 = getVotingEmissionEpochInfo()
545+ let lastFinalizedEpoch = $t01965219732._1
546+ let currentEpochStartHeight = $t01965219732._2
553547 let userAddress = addressFromStringValue(userAddressStr)
554548 let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
555549 let actions = if ((userVoteFinalized == 0))
568562
569563
570564 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
571- let $t02074720827 = getVotingEmissionEpochInfo()
572- let lastFinalizedEpoch = $t02074720827._1
573- let currentEpochStartHeight = $t02074720827._2
565+ let $t02058620666 = getVotingEmissionEpochInfo()
566+ let lastFinalizedEpoch = $t02058620666._1
567+ let currentEpochStartHeight = $t02058620666._2
574568 let userAddress = addressFromStringValue(userAddressStr)
575569 let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
576570 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0)
629623 if ((0 > userBoostEmissionIntegral))
630624 then throwErr("wrong calculations")
631625 else {
632- let $t02436924508 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
633- let stakedVotesIntegralsActions = $t02436924508._1
634- let userVoteIntegralDiff = $t02436924508._2
635- let totalVotesIntegralDiff = $t02436924508._3
626+ let $t02420824347 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
627+ let stakedVotesIntegralsActions = $t02420824347._1
628+ let userVoteIntegralDiff = $t02420824347._2
629+ let totalVotesIntegralDiff = $t02420824347._3
636630 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
637631 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
638632 then 0
727721
728722 @Callable(i)
729723 func lockRef (duration,referrerAddress,signature) = {
730- let $t02930729372 = lockActions(i, duration)
731- let lockActionsResult = $t02930729372._1
732- let gWxAmountStart = $t02930729372._2
724+ let $t02914629211 = lockActions(i, duration)
725+ let lockActionsResult = $t02914629211._1
726+ let gWxAmountStart = $t02914629211._2
733727 let referralAddress = toString(i.caller)
734728 let refInv = if (if ((referrerAddress == ""))
735729 then true
750744
751745 @Callable(i)
752746 func lock (duration) = {
753- let $t02983029895 = lockActions(i, duration)
754- let lockActionsResult = $t02983029895._1
755- let gWxAmountStart = $t02983029895._2
747+ let $t02966929734 = lockActions(i, duration)
748+ let lockActionsResult = $t02966929734._1
749+ let gWxAmountStart = $t02966929734._2
756750 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
757751 if ((updateRefActivity == updateRefActivity))
758752 then $Tuple2(lockActionsResult, unit)
765759 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
766760 then throwErr("permissions denied")
767761 else {
768- let $t03020530307 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
769- let userBoostAvailable = $t03020530307._1
770- let dataState = $t03020530307._2
771- let debug = $t03020530307._3
762+ let $t03004430146 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
763+ let userBoostAvailable = $t03004430146._1
764+ let dataState = $t03004430146._2
765+ let debug = $t03004430146._3
772766 $Tuple2(dataState, [userBoostAvailable])
773767 }
774768
776770
777771 @Callable(i)
778772 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
779- let $t03043930540 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
780- let userBoostAvailable = $t03043930540._1
781- let dataState = $t03043930540._2
782- let debug = $t03043930540._3
773+ let $t03027830379 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
774+ let userBoostAvailable = $t03027830379._1
775+ let dataState = $t03027830379._2
776+ let debug = $t03027830379._3
783777 $Tuple2(nil, [userBoostAvailable, debug])
784778 }
785779
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let SCALE8 = 8
77
88 let MULT8 = 100000000
99
1010 let POOLWEIGHTMULT = MULT8
1111
1212 let contractFilename = "boosting.ride"
1313
1414 let SCALE18 = 18
1515
1616 let MULT18 = 1000000000000000000
1717
1818 let MULT18BI = toBigInt(MULT18)
1919
2020 let durationMonthsAllowed = [1, 3, 6, 12, 24, 48]
2121
2222 let blocksInDay = 1440
2323
2424 let blocksInMonth = 43800
2525
2626 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
2727
2828
2929 func throwErr (msg) = throw(wrapErr(msg))
3030
3131
3232 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
3333
3434
3535 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
3636
3737
3838 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
3939
4040
4141 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
4242
4343
4444 func abs (val) = if ((0 > val))
4545 then -(val)
4646 else val
4747
4848
4949 func ensurePositive (v,m) = if ((v >= 0))
5050 then v
5151 else throwErr((valueOrElse(m, "value") + " should be positive"))
5252
5353
5454 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
5555
5656
5757 let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(this, keyReferralsContractAddress()))
5858
5959 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
6060
6161 let referralProgramNameDefault = "wxlock"
6262
6363 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
6464
6565 func keyFactoryAddress () = "%s%s__config__factoryAddress"
6666
6767
6868 let IdxFactoryCfgStakingDapp = 1
6969
7070 let IdxFactoryCfgBoostingDapp = 2
7171
7272 let IdxFactoryCfgIdoDapp = 3
7373
7474 let IdxFactoryCfgTeamDapp = 4
7575
7676 let IdxFactoryCfgEmissionDapp = 5
7777
7878 let IdxFactoryCfgRestDapp = 6
7979
8080 let IdxFactoryCfgSlippageDapp = 7
8181
8282 let IdxFactoryCfgDaoDapp = 8
8383
8484 let IdxFactoryCfgMarketingDapp = 9
8585
8686 let IdxFactoryCfgGwxRewardDapp = 10
8787
8888 let IdxFactoryCfgBirdsDapp = 11
8989
9090 func keyFactoryCfg () = "%s__factoryConfig"
9191
9292
9393 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9494
9595
9696 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
9797
9898
9999 func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
100100
101101
102102 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress()))
103103
104104
105105 func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP)
106106
107107
108108 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
109109
110110
111111 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
112112
113113
114114 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
115115
116116
117117 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
118118
119119
120120 func keyManagerPublicKey () = "%s__managerPublicKey"
121121
122122
123123 func keyManagerVaultAddress () = "%s__managerVaultAddress"
124124
125125
126126 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
127127
128128
129129 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
130130
131131
132132 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
133133
134134
135135 func keyBoostingV2LastUpdateHeight () = "%s%s__boostingV2__startBlock"
136136
137137
138138 func keyBoostingV2Integral () = "%s%s__boostingV2__integral"
139139
140140
141141 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
142142
143143
144144 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
145-
146-
147-func keyNextPergetIntOrDefault () = "%s__nextPeriod"
148-
149-
150-func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
151145
152146
153147 let IdxCfgAssetId = 1
154148
155149 let IdxCfgMinLockAmount = 2
156150
157151 let IdxCfgMinLockDuration = 3
158152
159153 let IdxCfgMaxLockDuration = 4
160154
161155 let IdxCfgMathContract = 5
162156
163157 let IdxCfgBlocksInPeriod = 6
164158
165159 func keyConfig () = "%s__config"
166160
167161
168162 func readConfigArrayOrFail () = split(getStringOrFail(this, keyConfig()), SEP)
169163
170164
171165 let cfgArray = readConfigArrayOrFail()
172166
173167 let assetId = fromBase58String(cfgArray[IdxCfgAssetId])
174168
175169 let minLockAmount = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMinLockAmount]), wrapErr("invalid min lock amount"))
176170
177171 let minLockDuration = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMinLockDuration]), wrapErr("invalid min lock duration"))
178172
179173 let maxLockDuration = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMaxLockDuration]), wrapErr("invalid max lock duration"))
180174
181175 let mathContract = valueOrErrorMessage(addressFromString(cfgArray[IdxCfgMathContract]), wrapErr("invalid math contract address"))
182176
183177 let blocksInPeriod = valueOrErrorMessage(parseInt(cfgArray[IdxCfgBlocksInPeriod]), wrapErr("invalid blocks in period"))
184178
185179 func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d%s", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP)
186180
187181
188182 func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract)
189183
190184
191185 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
192186 case s: String =>
193187 addressFromStringValue(s)
194188 case _ =>
195189 this
196190 }
197191
198192
199193 func managerPublicKeyOrUnit () = {
200194 let managerVaultAddress = getManagerVaultAddressOrThis()
201195 match getString(managerVaultAddress, keyManagerPublicKey()) {
202196 case s: String =>
203197 fromBase58String(s)
204198 case _: Unit =>
205199 unit
206200 case _ =>
207201 throw("Match error")
208202 }
209203 }
210204
211205
212206 func mustManager (i) = {
213207 let pd = throwErr("Permission denied")
214208 match managerPublicKeyOrUnit() {
215209 case pk: ByteVector =>
216210 if ((i.callerPublicKey == pk))
217211 then true
218212 else pd
219213 case _: Unit =>
220214 if ((i.caller == this))
221215 then true
222216 else pd
223217 case _ =>
224218 throw("Match error")
225219 }
226220 }
227221
228222
229223 let IdxLockAmount = 1
230224
231225 let IdxLockStart = 2
232226
233227 let IdxLockDuration = 3
234228
235229 let IdxLockLastUpdateTimestamp = 4
236230
237231 let IdxLockGwxAmount = 5
238232
239233 let IdxLockWxClaimed = 6
240234
241235 func keyLockParamsRecord (userAddress,txId) = makeString(["%s%s%s__lock", toString(userAddress), match txId {
242236 case b: ByteVector =>
243237 toBase58String(b)
244238 case _: Unit =>
245239 "legacy"
246240 case _ =>
247241 throw("Match error")
248242 }], SEP)
249243
250244
251245 func readLockParamsRecordOrFail (userAddress,txId) = split(getStringOrFail(this, keyLockParamsRecord(userAddress, txId)), SEP)
252246
253247
254248 func keyUserGwxAmountTotal (userAddress) = makeString(["%s%s__gwxAmountTotal", toString(userAddress)], SEP)
255249
256250
257251 func formatLockParamsRecord (amount,start,duration,gwxAmount,wxClaimed) = makeString(["%d%d%d%d%d%d", toString(amount), toString(start), toString(duration), toString(lastBlock.timestamp), toString(gwxAmount), toString(wxClaimed)], SEP)
258252
259253
260254 func keyNextUserNum () = "%s__nextUserNum"
261255
262256
263257 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
264258
265259
266260 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
267261
268262
269263 func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
270264
271265
272266 func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
273267
274268
275269 func keyStatsLocksCount () = "%s%s__stats__locksCount"
276270
277271
278272 func keyStatsUsersCount () = "%s%s__stats__activeUsersCount"
279273
280274
281275 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(userNum)], SEP)
282276
283277
284278 func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(userNum), lpAssetId], SEP)
285279
286280
287281 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", toString(userNum)], SEP)
288282
289283
290284 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
291285
292286
293287 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", toString(userNum)], SEP)
294288
295289
296290 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", toString(userNum)], SEP)
297291
298292
299293 func keyGwxTotal () = "%s%s__gwx__total"
300294
301295
302296 func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
303297
304298
305299 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
306300
307301
308302 func keyCurrentEpochUi () = makeString(["%s", "currentEpochUi"], SEP)
309303
310304
311305 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
312306
313307
314308 func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
315309
316310
317311 func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
318312
319313
320314 func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
321315
322316
323317 func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
324318
325319
326320 func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
327321
328322
329323 func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
330324
331325
332326 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
333327
334328
335329 let factoryContract = readFactoryAddressOrFail()
336330
337331 let factoryCfg = readFactoryCfgOrFail(factoryContract)
338332
339333 let emissionContract = getEmissionAddressOrFail(factoryCfg)
340334
341335 let stakingContract = getStakingAddressOrFail(factoryCfg)
342336
343337 let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg)
344338
345339 let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], SEP)), wrapErr("lp_staking_pools contract address is undefined"))), wrapErr("invalid lp_staking_pools contract address"))
346340
347341 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
348342
349343 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract))
350344
351345 let keyVotingEmissionRateContract = makeString(["%s", "votingEmissionRateContract"], SEP)
352346
353347 let boostCoeff = {
354348 let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
355349 if ($isInstanceOf(@, "Int"))
356350 then @
357351 else throw(($getType(@) + " couldn't be cast to Int"))
358352 }
359353
360354 func userNumberByAddressOrFail (userAddress) = match getString(this, keyUser2NumMapping(toString(userAddress))) {
361355 case s: String =>
362356 valueOrErrorMessage(parseInt(s), wrapErr("invalid user number"))
363357 case _: Unit =>
364358 throwErr("invalid user")
365359 case _ =>
366360 throw("Match error")
367361 }
368362
369363
370364 func getGwxAmountTotal () = valueOrElse(getInteger(this, keyGwxTotal()), 0)
371365
372366
373367 func getLockedGwxAmount (userAddress) = {
374368 let functionName = "getLockedGwxAmount"
375369 let votingEmissionRateContract = valueOrErrorMessage( match getString(votingEmissionContract, keyVotingEmissionRateContract) {
376370 case _: Unit =>
377371 unit
378372 case s: String =>
379373 addressFromString(s)
380374 case _ =>
381375 throw("Match error")
382376 }, wrapErr("invalid voting emission rate address"))
383377 let lockedVotingEmissionRate = {
384378 let @ = invoke(votingEmissionContract, functionName, [toString(userAddress)], nil)
385379 if ($isInstanceOf(@, "Int"))
386380 then @
387381 else throw(($getType(@) + " couldn't be cast to Int"))
388382 }
389383 let lockedVotingEmission = {
390384 let @ = invoke(votingEmissionRateContract, functionName, [toString(userAddress)], nil)
391385 if ($isInstanceOf(@, "Int"))
392386 then @
393387 else throw(($getType(@) + " couldn't be cast to Int"))
394388 }
395389 let locked = max([lockedVotingEmissionRate, lockedVotingEmission])
396390 locked
397391 }
398392
399393
400394 func HistoryEntry (type,user,amount,lockStart,duration,gwxAmount,i) = {
401395 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
402396 let historyDATA = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(lockStart), toString(duration), toString(gwxAmount)], SEP)
403397 StringEntry(historyKEY, historyDATA)
404398 }
405399
406400
407401 func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = {
408402 let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks()
409403 let locksCountKEY = keyStatsLocksCount()
410404 let usersCountKEY = keyStatsUsersCount()
411405 let totalAmountKEY = keyLockParamTotalAmount()
412406 let locksDurationSumInBlocks = getIntOrZero(this, locksDurationSumInBlocksKEY)
413407 let locksCount = getIntOrZero(this, locksCountKEY)
414408 let usersCount = getIntOrZero(this, usersCountKEY)
415409 let totalAmount = getIntOrZero(this, totalAmountKEY)
416410 [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))]
417411 }
418412
419413
420414 func LockParamsEntry (userAddress,txId,amount,start,duration,gwxAmount,wxClaimed) = [StringEntry(keyLockParamsRecord(userAddress, txId), formatLockParamsRecord(amount, start, duration, gwxAmount, wxClaimed))]
421415
422416
423417 func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1))
424418 then throwErr("only one payment is allowed")
425419 else if ((size(i.payments) == 0))
426420 then 0
427421 else {
428422 let pmt = i.payments[0]
429423 if ((value(pmt.assetId) != expectedAssetId))
430424 then throwErr("invalid asset id in payment")
431425 else pmt.amount
432426 }
433427
434428
435429 func getUserGwxAmountTotal (userAddress) = valueOrElse(getInteger(this, keyUserGwxAmountTotal(userAddress)), 0)
436430
437431
438432 func getVotingEmissionEpochInfo () = {
439- let $t01521215502 = {
433+ let $t01505115341 = {
440434 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
441435 let lastFinalizedEpoch = (currentEpochUi - 1)
442436 if ((0 > lastFinalizedEpoch))
443437 then throwErr("invalid epoch")
444438 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
445439 }
446- let currentEpochUi = $t01521215502._1
447- let lastFinalizedEpoch = $t01521215502._2
440+ let currentEpochUi = $t01505115341._1
441+ let lastFinalizedEpoch = $t01505115341._2
448442 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
449443 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
450444 }
451445
452446
453447 func getPoolAssetsByLpAssetId (lpAssetIdStr) = {
454448 let idxAmountAssetId = 4
455449 let idxPriceAssetId = 5
456450 let poolCfg = {
457451 let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
458452 if ($isInstanceOf(@, "List[Any]"))
459453 then @
460454 else throw(($getType(@) + " couldn't be cast to List[Any]"))
461455 }
462456 let amountAssetId = {
463457 let @ = poolCfg[idxAmountAssetId]
464458 if ($isInstanceOf(@, "String"))
465459 then @
466460 else throw(($getType(@) + " couldn't be cast to String"))
467461 }
468462 let priceAssetId = {
469463 let @ = poolCfg[idxPriceAssetId]
470464 if ($isInstanceOf(@, "String"))
471465 then @
472466 else throw(($getType(@) + " couldn't be cast to String"))
473467 }
474468 $Tuple2(amountAssetId, priceAssetId)
475469 }
476470
477471
478472 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
479473 let userAddress = addressFromStringValue(userAddressStr)
480- let $t01619316273 = getVotingEmissionEpochInfo()
481- let lastFinalizedEpoch = $t01619316273._1
482- let currentEpochStartHeight = $t01619316273._2
483- let $t01627616351 = getPoolAssetsByLpAssetId(lpAssetIdStr)
484- let amountAssetId = $t01627616351._1
485- let priceAssetId = $t01627616351._2
474+ let $t01603216112 = getVotingEmissionEpochInfo()
475+ let lastFinalizedEpoch = $t01603216112._1
476+ let currentEpochStartHeight = $t01603216112._2
477+ let $t01611516190 = getPoolAssetsByLpAssetId(lpAssetIdStr)
478+ let amountAssetId = $t01611516190._1
479+ let priceAssetId = $t01611516190._2
486480 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
487481 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
488482 userVote
489483 }
490484
491485
492486 func getUserVoteStaked (lpAssetIdStr,userAddressStr) = {
493487 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(userAddressStr, lpAssetIdStr)), 0)
494488 let userVote = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
495489 if ((stakedByUser == 0))
496490 then 0
497491 else userVote
498492 }
499493
500494
501495 func getVotingResultStaked (lpAssetIdStr) = {
502- let $t01689516975 = getVotingEmissionEpochInfo()
503- let lastFinalizedEpoch = $t01689516975._1
504- let currentEpochStartHeight = $t01689516975._2
496+ let $t01673416814 = getVotingEmissionEpochInfo()
497+ let lastFinalizedEpoch = $t01673416814._1
498+ let currentEpochStartHeight = $t01673416814._2
505499 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
506500 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
507501 votingResultStaked
508502 }
509503
510504
511505 func getVotingResultStakedIntegral (lpAssetIdStr) = {
512- let $t01733717417 = getVotingEmissionEpochInfo()
513- let lastFinalizedEpoch = $t01733717417._1
514- let currentEpochStartHeight = $t01733717417._2
506+ let $t01717617256 = getVotingEmissionEpochInfo()
507+ let lastFinalizedEpoch = $t01717617256._1
508+ let currentEpochStartHeight = $t01717617256._2
515509 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
516510 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
517511 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
518512 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
519513 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
520514 votingResultStakedIntegral
521515 }
522516
523517
524518 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
525- let $t01825418334 = getVotingEmissionEpochInfo()
526- let lastFinalizedEpoch = $t01825418334._1
527- let currentEpochStartHeight = $t01825418334._2
519+ let $t01809318173 = getVotingEmissionEpochInfo()
520+ let lastFinalizedEpoch = $t01809318173._1
521+ let currentEpochStartHeight = $t01809318173._2
528522 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
529523 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
530524 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
531525 [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedNew), IntegerEntry(keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch), height), IntegerEntry(keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedIntegral)]
532526 }
533527
534528
535529 func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = {
536- let $t01894519025 = getVotingEmissionEpochInfo()
537- let lastFinalizedEpoch = $t01894519025._1
538- let currentEpochStartHeight = $t01894519025._2
530+ let $t01878418864 = getVotingEmissionEpochInfo()
531+ let lastFinalizedEpoch = $t01878418864._1
532+ let currentEpochStartHeight = $t01878418864._2
539533 let userAddress = addressFromStringValue(userAddressStr)
540534 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
541535 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
542536 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)), currentEpochStartHeight)
543537 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
544538 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
545539 userVoteStakedIntegral
546540 }
547541
548542
549543 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
550- let $t01981319893 = getVotingEmissionEpochInfo()
551- let lastFinalizedEpoch = $t01981319893._1
552- let currentEpochStartHeight = $t01981319893._2
544+ let $t01965219732 = getVotingEmissionEpochInfo()
545+ let lastFinalizedEpoch = $t01965219732._1
546+ let currentEpochStartHeight = $t01965219732._2
553547 let userAddress = addressFromStringValue(userAddressStr)
554548 let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
555549 let actions = if ((userVoteFinalized == 0))
556550 then nil
557551 else {
558552 let stakedVoteDelta = if (edge)
559553 then userVoteFinalized
560554 else -(userVoteFinalized)
561555 let votingResultActions = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
562556 let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr)
563557 let voteActions = [IntegerEntry(keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch), height), IntegerEntry(keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch), userVoteStakedIntegral)]
564558 (votingResultActions ++ voteActions)
565559 }
566560 actions
567561 }
568562
569563
570564 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
571- let $t02074720827 = getVotingEmissionEpochInfo()
572- let lastFinalizedEpoch = $t02074720827._1
573- let currentEpochStartHeight = $t02074720827._2
565+ let $t02058620666 = getVotingEmissionEpochInfo()
566+ let lastFinalizedEpoch = $t02058620666._1
567+ let currentEpochStartHeight = $t02058620666._2
574568 let userAddress = addressFromStringValue(userAddressStr)
575569 let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
576570 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0)
577571 let votingResultStakedIntegralLastKey = keyVotingResultStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
578572 let votingResultStakedIntegralLast = valueOrElse(getInteger(this, votingResultStakedIntegralLastKey), 0)
579573 let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr)
580574 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
581575 let userVoteStakedIntegralDiff = (userVoteStakedIntegral - userVoteStakedIntegralLast)
582576 let votingResultStakedIntegralDiff = (votingResultStakedIntegral - votingResultStakedIntegralLast)
583577 $Tuple3([IntegerEntry(userVoteStakedIntegralLastKey, userVoteStakedIntegral), IntegerEntry(votingResultStakedIntegralLastKey, votingResultStakedIntegral)], userVoteStakedIntegralDiff, votingResultStakedIntegralDiff)
584578 }
585579
586580
587581 func refreshBoostEmissionIntegral () = {
588582 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
589583 let boostingV2LastUpdateHeightOption = getInteger(this, keyBoostingV2LastUpdateHeight())
590584 let boostingV2IngergalOption = getInteger(this, keyBoostingV2Integral())
591585 let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock())
592586 let h = if ((height > emissionEnd))
593587 then emissionEnd
594588 else height
595589 let dh = match boostingV2LastUpdateHeightOption {
596590 case lastUpdateHeight: Int =>
597591 max([(h - lastUpdateHeight), 0])
598592 case _: Unit =>
599593 0
600594 case _ =>
601595 throw("Match error")
602596 }
603597 let boostEmissionPerBlock = ((wxEmissionPerBlock * (boostCoeff - 1)) / boostCoeff)
604598 let boostEmissionIntegralPrev = valueOrElse(boostingV2IngergalOption, 0)
605599 let boostEmissionIntegral = ((boostEmissionPerBlock * dh) + boostEmissionIntegralPrev)
606600 $Tuple2([IntegerEntry(keyBoostingV2Integral(), boostEmissionIntegral), IntegerEntry(keyBoostingV2LastUpdateHeight(), height)], boostEmissionIntegral)
607601 }
608602
609603
610604 func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = {
611605 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
612606 let userNum = userNumberByAddressOrFail(userAddress)
613607 if ((userNum == userNum))
614608 then {
615609 let EMPTYSTR = "empty"
616610 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
617611 then {
618612 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
619613 getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
620614 }
621615 else if (readOnly)
622616 then 0
623617 else throwErr(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
624618 let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNum, lpAssetIdStr)
625619 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNum)
626620 let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), getIntOrZero(this, userBoostEmissionLastIntegralKEY))
627621 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
628622 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
629623 if ((0 > userBoostEmissionIntegral))
630624 then throwErr("wrong calculations")
631625 else {
632- let $t02436924508 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
633- let stakedVotesIntegralsActions = $t02436924508._1
634- let userVoteIntegralDiff = $t02436924508._2
635- let totalVotesIntegralDiff = $t02436924508._3
626+ let $t02420824347 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
627+ let stakedVotesIntegralsActions = $t02420824347._1
628+ let userVoteIntegralDiff = $t02420824347._2
629+ let totalVotesIntegralDiff = $t02420824347._3
636630 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
637631 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
638632 then 0
639633 else fraction(poolUserBoostEmissionIntegral, userVoteIntegralDiff, totalVotesIntegralDiff)
640634 let dataState = ([IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] ++ stakedVotesIntegralsActions)
641635 let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(poolWeight), toString(userVoteIntegralDiff), toString(totalVotesIntegralDiff)], ":")
642636 $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug)
643637 }
644638 }
645639 else throw("Strict value is not equal to itself.")
646640 }
647641
648642
649643 func lockActions (i,durationMonths) = if (!(containsElement(durationMonthsAllowed, durationMonths)))
650644 then throwErr("invalid duration")
651645 else {
652646 let duration = (durationMonths * blocksInMonth)
653647 let assetIdStr = toBase58String(assetId)
654648 if ((size(i.payments) != 1))
655649 then throwErr("invalid payment - exact one payment must be attached")
656650 else {
657651 let pmt = i.payments[0]
658652 let pmtAmount = pmt.amount
659653 if ((assetId != value(pmt.assetId)))
660654 then throwErr((("invalid asset is in payment - " + assetIdStr) + " is expected"))
661655 else {
662656 let nextUserNumKEY = keyNextUserNum()
663657 let userAddress = i.caller
664658 let userAddressStr = toString(userAddress)
665659 let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr)))
666660 let userNumStr = if (userIsExisting)
667661 then value(getString(keyUser2NumMapping(userAddressStr)))
668662 else toString(getIntOrFail(this, nextUserNumKEY))
669663 let userNum = parseIntValue(userNumStr)
670664 let lockStart = height
671665 if (if ((minLockAmount > pmtAmount))
672666 then (userAddress != lpStakingPoolsContract)
673667 else false)
674668 then throwErr(("amount is less then minLockAmount=" + toString(minLockAmount)))
675669 else if ((minLockDuration > duration))
676670 then throwErr(("passed duration is less then minLockDuration=" + toString(minLockDuration)))
677671 else if ((duration > maxLockDuration))
678672 then throwErr(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration)))
679673 else {
680674 let gWxAmountStart = fraction(pmtAmount, duration, maxLockDuration)
681675 let gwxAmountTotal = getGwxAmountTotal()
682676 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNum)
683677 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
684678 let userGwxAmountTotal = getUserGwxAmountTotal(userAddress)
685679 let gwxRewardInv = reentrantInvoke(gwxRewardContract, "refreshUserReward", [userAddress.bytes], nil)
686680 if ((gwxRewardInv == gwxRewardInv))
687681 then {
688682 let arr = if (userIsExisting)
689683 then nil
690684 else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)]
691685 $Tuple2(((((arr ++ LockParamsEntry(userAddress, i.transactionId, pmtAmount, lockStart, duration, gWxAmountStart, 0)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting)
692686 then 0
693687 else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, gWxAmountStart, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyGwxTotal(), (gwxAmountTotal + gWxAmountStart)), IntegerEntry(keyUserGwxAmountTotal(userAddress), (userGwxAmountTotal + gWxAmountStart))]), gWxAmountStart)
694688 }
695689 else throw("Strict value is not equal to itself.")
696690 }
697691 }
698692 }
699693 }
700694
701695
702696 func getWxWithdrawable (userAddress,txIdOption) = {
703697 let userRecordArray = readLockParamsRecordOrFail(userAddress, txIdOption)
704698 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
705699 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
706700 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
707701 let lockEnd = (lockStart + lockDuration)
708702 let wxClaimed = parseIntValue(userRecordArray[IdxLockWxClaimed])
709703 let t = ((height - lockStart) / blocksInPeriod)
710704 let exponent = fraction(toBigInt(t), (toBigInt((8 * blocksInPeriod)) * MULT18BI), toBigInt(lockDuration))
711705 let wxWithdrawable = if ((height > lockEnd))
712706 then userAmount
713707 else (toInt(fraction(toBigInt(userAmount), (MULT18BI - pow(toBigInt(5), 1, exponent, SCALE18, SCALE18, DOWN)), MULT18BI)) - wxClaimed)
714708 wxWithdrawable
715709 }
716710
717711
718712 @Callable(i)
719713 func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = {
720714 let checkCaller = mustManager(i)
721715 if ((checkCaller == checkCaller))
722716 then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0))
723717 else throw("Strict value is not equal to itself.")
724718 }
725719
726720
727721
728722 @Callable(i)
729723 func lockRef (duration,referrerAddress,signature) = {
730- let $t02930729372 = lockActions(i, duration)
731- let lockActionsResult = $t02930729372._1
732- let gWxAmountStart = $t02930729372._2
724+ let $t02914629211 = lockActions(i, duration)
725+ let lockActionsResult = $t02914629211._1
726+ let gWxAmountStart = $t02914629211._2
733727 let referralAddress = toString(i.caller)
734728 let refInv = if (if ((referrerAddress == ""))
735729 then true
736730 else (signature == base58''))
737731 then unit
738732 else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil)
739733 if ((refInv == refInv))
740734 then {
741735 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
742736 if ((updateRefActivity == updateRefActivity))
743737 then $Tuple2(lockActionsResult, unit)
744738 else throw("Strict value is not equal to itself.")
745739 }
746740 else throw("Strict value is not equal to itself.")
747741 }
748742
749743
750744
751745 @Callable(i)
752746 func lock (duration) = {
753- let $t02983029895 = lockActions(i, duration)
754- let lockActionsResult = $t02983029895._1
755- let gWxAmountStart = $t02983029895._2
747+ let $t02966929734 = lockActions(i, duration)
748+ let lockActionsResult = $t02966929734._1
749+ let gWxAmountStart = $t02966929734._2
756750 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
757751 if ((updateRefActivity == updateRefActivity))
758752 then $Tuple2(lockActionsResult, unit)
759753 else throw("Strict value is not equal to itself.")
760754 }
761755
762756
763757
764758 @Callable(i)
765759 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
766760 then throwErr("permissions denied")
767761 else {
768- let $t03020530307 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
769- let userBoostAvailable = $t03020530307._1
770- let dataState = $t03020530307._2
771- let debug = $t03020530307._3
762+ let $t03004430146 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
763+ let userBoostAvailable = $t03004430146._1
764+ let dataState = $t03004430146._2
765+ let debug = $t03004430146._3
772766 $Tuple2(dataState, [userBoostAvailable])
773767 }
774768
775769
776770
777771 @Callable(i)
778772 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
779- let $t03043930540 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
780- let userBoostAvailable = $t03043930540._1
781- let dataState = $t03043930540._2
782- let debug = $t03043930540._3
773+ let $t03027830379 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
774+ let userBoostAvailable = $t03027830379._1
775+ let dataState = $t03027830379._2
776+ let debug = $t03027830379._3
783777 $Tuple2(nil, [userBoostAvailable, debug])
784778 }
785779
786780
787781
788782 @Callable(i)
789783 func unlock (txIdStr) = {
790784 let userAddress = i.caller
791785 let userAddressStr = toString(userAddress)
792786 let txId = fromBase58String(txIdStr)
793787 let userRecordArray = readLockParamsRecordOrFail(userAddress, if ((txIdStr == ""))
794788 then unit
795789 else txId)
796790 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
797791 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
798792 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
799793 let wxClaimed = parseIntValue(userRecordArray[IdxLockWxClaimed])
800794 let gwxAmount = parseIntValue(userRecordArray[IdxLockGwxAmount])
801795 let t = ((height - lockStart) / blocksInPeriod)
802796 let wxWithdrawable = getWxWithdrawable(userAddress, if ((txIdStr == ""))
803797 then unit
804798 else txId)
805799 let gWxAmountStart = fraction(userAmount, lockDuration, maxLockDuration)
806800 let gwxBurned = min([fraction((t * blocksInPeriod), gWxAmountStart, maxLockDuration), gwxAmount])
807801 let gwxRemaining = ensurePositive((gwxAmount - gwxBurned), "gwxRemaining")
808802 let lockedGwxAmount = getLockedGwxAmount(userAddress)
809803 if ((0 >= userAmount))
810804 then throwErr("nothing to unlock")
811805 else {
812806 let gwxAmountTotal = getGwxAmountTotal()
813807 let userGwxAmountTotal = getUserGwxAmountTotal(userAddress)
814808 let userGwxAmountTotalNew = ensurePositive((userGwxAmountTotal - gwxBurned), "userGwxAmountTotalNew")
815809 if ((lockedGwxAmount > userGwxAmountTotalNew))
816810 then throwErr(("locked gwx amount: " + toString(lockedGwxAmount)))
817811 else {
818812 let gwxRewardInv = reentrantInvoke(gwxRewardContract, "refreshUserReward", [userAddress.bytes], nil)
819813 if ((gwxRewardInv == gwxRewardInv))
820814 then ((((LockParamsEntry(userAddress, txId, userAmount, lockStart, lockDuration, gwxRemaining, (wxClaimed + wxWithdrawable)) ++ StatsEntry(-(wxWithdrawable), 0, 0, 0)) :+ HistoryEntry("unlock", userAddressStr, wxWithdrawable, lockStart, lockDuration, gwxBurned, i)) :+ ScriptTransfer(userAddress, wxWithdrawable, assetId)) ++ [IntegerEntry(keyGwxTotal(), ensurePositive((gwxAmountTotal - gwxBurned), "gwxTotal")), IntegerEntry(keyUserGwxAmountTotal(userAddress), userGwxAmountTotalNew)])
821815 else throw("Strict value is not equal to itself.")
822816 }
823817 }
824818 }
825819
826820
827821
828822 @Callable(i)
829823 func gwxUserInfoREADONLY (userAddressStr) = {
830824 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
831825 let gwxAmount = getUserGwxAmountTotal(userAddress)
832826 $Tuple2(nil, [gwxAmount])
833827 }
834828
835829
836830
837831 @Callable(i)
838832 func userMaxDurationREADONLY (userAddressStr) = $Tuple2(nil, $Tuple2("increaseLock", maxLockDuration))
839833
840834
841835
842836 @Callable(i)
843837 func getUserGwxAmountAtHeightREADONLY (userAddressStr,targetHeight) = {
844838 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
845839 let gwxAmount = getUserGwxAmountTotal(userAddress)
846840 $Tuple2(nil, gwxAmount)
847841 }
848842
849843
850844
851845 @Callable(i)
852846 func getUserGwxAmount (userAddressStr) = {
853847 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
854848 let gwxAmount = getUserGwxAmountTotal(userAddress)
855849 $Tuple2(nil, gwxAmount)
856850 }
857851
858852
859853
860854 @Callable(i)
861855 func getGwxTotalREADONLY () = $Tuple2(nil, getGwxAmountTotal())
862856
863857
864858
865859 @Callable(i)
866860 func onBoostEmissionUpdate () = {
867861 let checkCaller = if ((i.caller == emissionContract))
868862 then true
869863 else mustManager(i)
870864 if ((checkCaller == checkCaller))
871865 then refreshBoostEmissionIntegral()
872866 else throw("Strict value is not equal to itself.")
873867 }
874868
875869
876870
877871 @Callable(i)
878872 func onStakedVoteUpdate (lpAssetIdStr,userAddressStr,edge) = {
879873 let checkCaller = if ((i.caller == stakingContract))
880874 then true
881875 else mustManager(i)
882876 if ((checkCaller == checkCaller))
883877 then {
884878 let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge)
885879 $Tuple2(actions, unit)
886880 }
887881 else throw("Strict value is not equal to itself.")
888882 }
889883
890884
891885
892886 @Callable(i)
893887 func getVotingResultStakedREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStaked(lpAssetIdStr))
894888
895889
896890
897891 @Callable(i)
898892 func getVotingResultStakedIntegralREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStakedIntegral(lpAssetIdStr))
899893
900894
901895
902896 @Callable(i)
903897 func getUserVoteFinalizedREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteFinalized(lpAssetIdStr, userAddressStr))
904898
905899
906900
907901 @Callable(i)
908902 func getUserVoteStakedIntegralREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr))
909903
910904
911905 @Verifier(tx)
912906 func verify () = {
913907 let targetPublicKey = match managerPublicKeyOrUnit() {
914908 case pk: ByteVector =>
915909 pk
916910 case _: Unit =>
917911 tx.senderPublicKey
918912 case _ =>
919913 throw("Match error")
920914 }
921915 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
922916 }
923917

github/deemru/w8io/026f985 
106.89 ms