tx · FSh4apSqk4CHYgJ6cjQxEpJdHyyNGeUDJDKd7Q8tkqro

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02500000 Waves

2023.08.22 12:26 [2721633] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "FSh4apSqk4CHYgJ6cjQxEpJdHyyNGeUDJDKd7Q8tkqro", "fee": 2500000, "feeAssetId": null, "timestamp": 1692696416996, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "3RgUi6grGmFiKgcXTp2cWQedSr5ki5MhESSvP6fXkvkiTZZxHuj7LUdWUDHrCE86wc5KGzwKSYZprAmgds1BzP51" ], "script": "base64:BgLdLAgCEgUKAwEIAhIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgSABIAEgUKAwgIBBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgiA1NFUCIGU0NBTEU4IgVNVUxUOCIOUE9PTFdFSUdIVE1VTFQiEGNvbnRyYWN0RmlsZW5hbWUiB1NDQUxFMTgiBk1VTFQxOCIITVVMVDE4QkkiDkRFQ0FZX0NPTlNUQU5UIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIMZ2V0SW50T3JaZXJvIg9nZXRJbnRPckRlZmF1bHQiCmRlZmF1bHRWYWwiDGdldEludE9yRmFpbCIDYWJzIgN2YWwiDmVuc3VyZVBvc2l0aXZlIgF2IgFtIhtrZXlSZWZlcnJhbHNDb250cmFjdEFkZHJlc3MiHnJlZmVycmFsc0NvbnRyYWN0QWRkcmVzc09yRmFpbCIWa2V5UmVmZXJyYWxQcm9ncmFtTmFtZSIacmVmZXJyYWxQcm9ncmFtTmFtZ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l6ZWRSRUFET05MWQICYkQCYkwJAJQKAgUDbmlsCQECY0wCBQJiRAUCYkwCYUwBIWdldFVzZXJWb3RlU3Rha2VkSW50ZWdyYWxSRUFET05MWQICYkQCYkwJAJQKAgUDbmlsCQECZGcCBQJiRAUCYkwBAmVRAQJlUgAEAmVTBAJhRwkBAmFJAAMJAAECBQJhRwIKQnl0ZVZlY3RvcgQCYU4FAmFHBQJhTgMJAAECBQJhRwIEVW5pdAgFAmVRD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJlUQlib2R5Qnl0ZXMJAJEDAggFAmVRBnByb29mcwAABQJlUxfbYHQ=", "height": 2721633, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9kSVPccAqNy6i9voTV2RoB6ELgB2DmFQWXPrxzTjnspa Next: GewRLnZ119PVbVbseprJXCa52sqFbhT9maERQSVhkuAC Diff:
OldNewDifferences
1616 let MULT18 = 1000000000000000000
1717
1818 let MULT18BI = toBigInt(MULT18)
19+
20+let DECAY_CONSTANT = 8
1921
2022 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
2123
422424
423425
424426 func getVotingEmissionEpochInfo () = {
425- let $t01449314783 = {
427+ let $t01451614806 = {
426428 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
427429 let lastFinalizedEpoch = (currentEpochUi - 1)
428430 if ((0 > lastFinalizedEpoch))
429431 then throwErr("invalid epoch")
430432 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
431433 }
432- let currentEpochUi = $t01449314783._1
433- let lastFinalizedEpoch = $t01449314783._2
434+ let currentEpochUi = $t01451614806._1
435+ let lastFinalizedEpoch = $t01451614806._2
434436 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
435437 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
436438 }
463465
464466 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
465467 let userAddress = addressFromStringValue(userAddressStr)
466- let $t01547415554 = getVotingEmissionEpochInfo()
467- let lastFinalizedEpoch = $t01547415554._1
468- let currentEpochStartHeight = $t01547415554._2
469- let $t01555715632 = getPoolAssetsByLpAssetId(lpAssetIdStr)
470- let amountAssetId = $t01555715632._1
471- let priceAssetId = $t01555715632._2
468+ let $t01549715577 = getVotingEmissionEpochInfo()
469+ let lastFinalizedEpoch = $t01549715577._1
470+ let currentEpochStartHeight = $t01549715577._2
471+ let $t01558015655 = getPoolAssetsByLpAssetId(lpAssetIdStr)
472+ let amountAssetId = $t01558015655._1
473+ let priceAssetId = $t01558015655._2
472474 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
473475 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
474476 userVote
485487
486488
487489 func getVotingResultStaked (lpAssetIdStr) = {
488- let $t01617616256 = getVotingEmissionEpochInfo()
489- let lastFinalizedEpoch = $t01617616256._1
490- let currentEpochStartHeight = $t01617616256._2
490+ let $t01619916279 = getVotingEmissionEpochInfo()
491+ let lastFinalizedEpoch = $t01619916279._1
492+ let currentEpochStartHeight = $t01619916279._2
491493 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
492494 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
493495 votingResultStaked
495497
496498
497499 func getVotingResultStakedIntegral (lpAssetIdStr) = {
498- let $t01661816698 = getVotingEmissionEpochInfo()
499- let lastFinalizedEpoch = $t01661816698._1
500- let currentEpochStartHeight = $t01661816698._2
500+ let $t01664116721 = getVotingEmissionEpochInfo()
501+ let lastFinalizedEpoch = $t01664116721._1
502+ let currentEpochStartHeight = $t01664116721._2
501503 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
502504 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
503505 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
508510
509511
510512 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
511- let $t01753517615 = getVotingEmissionEpochInfo()
512- let lastFinalizedEpoch = $t01753517615._1
513- let currentEpochStartHeight = $t01753517615._2
513+ let $t01755817638 = getVotingEmissionEpochInfo()
514+ let lastFinalizedEpoch = $t01755817638._1
515+ let currentEpochStartHeight = $t01755817638._2
514516 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
515517 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
516518 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
519521
520522
521523 func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = {
522- let $t01822618306 = getVotingEmissionEpochInfo()
523- let lastFinalizedEpoch = $t01822618306._1
524- let currentEpochStartHeight = $t01822618306._2
524+ let $t01824918329 = getVotingEmissionEpochInfo()
525+ let lastFinalizedEpoch = $t01824918329._1
526+ let currentEpochStartHeight = $t01824918329._2
525527 let userAddress = addressFromStringValue(userAddressStr)
526528 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
527529 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
533535
534536
535537 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
536- let $t01909419174 = getVotingEmissionEpochInfo()
537- let lastFinalizedEpoch = $t01909419174._1
538- let currentEpochStartHeight = $t01909419174._2
538+ let $t01911719197 = getVotingEmissionEpochInfo()
539+ let lastFinalizedEpoch = $t01911719197._1
540+ let currentEpochStartHeight = $t01911719197._2
539541 let userAddress = addressFromStringValue(userAddressStr)
540542 let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
541543 let actions = if ((userVoteFinalized == 0))
554556
555557
556558 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
557- let $t02002820108 = getVotingEmissionEpochInfo()
558- let lastFinalizedEpoch = $t02002820108._1
559- let currentEpochStartHeight = $t02002820108._2
559+ let $t02005120131 = getVotingEmissionEpochInfo()
560+ let lastFinalizedEpoch = $t02005120131._1
561+ let currentEpochStartHeight = $t02005120131._2
560562 let userAddress = addressFromStringValue(userAddressStr)
561563 let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
562564 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0)
615617 if ((0 > userBoostEmissionIntegral))
616618 then throwErr("wrong calculations")
617619 else {
618- let $t02365023789 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
619- let stakedVotesIntegralsActions = $t02365023789._1
620- let userVoteIntegralDiff = $t02365023789._2
621- let totalVotesIntegralDiff = $t02365023789._3
620+ let $t02367323812 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
621+ let stakedVotesIntegralsActions = $t02367323812._1
622+ let userVoteIntegralDiff = $t02367323812._2
623+ let totalVotesIntegralDiff = $t02367323812._3
622624 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
623625 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
624626 then 0
692694 let lockEnd = (lockStart + lockDuration)
693695 let wxClaimed = parseIntValue(userRecordArray[IdxLockWxClaimed])
694696 let t = ((height - lockStart) / blocksInPeriod)
695- let exponent = fraction(toBigInt(t), (toBigInt((8 * blocksInPeriod)) * MULT18BI), toBigInt(lockDuration))
697+ let exponent = fraction(toBigInt(t), (toBigInt((DECAY_CONSTANT * blocksInPeriod)) * MULT18BI), toBigInt(lockDuration))
696698 let wxWithdrawable = if ((height > lockEnd))
697699 then userAmount
698700 else (toInt(fraction(toBigInt(userAmount), (MULT18BI - pow(toBigInt(5), 1, exponent, SCALE18, SCALE18, DOWN)), MULT18BI)) - wxClaimed)
702704
703705 @Callable(i)
704706 func lockRef (duration,referrerAddress,signature) = {
705- let $t02810028165 = lockActions(i, duration)
706- let lockActionsResult = $t02810028165._1
707- let gWxAmountStart = $t02810028165._2
707+ let $t02813628201 = lockActions(i, duration)
708+ let lockActionsResult = $t02813628201._1
709+ let gWxAmountStart = $t02813628201._2
708710 let referralAddress = toString(i.caller)
709711 let refInv = if (if ((referrerAddress == ""))
710712 then true
725727
726728 @Callable(i)
727729 func lock (duration) = {
728- let $t02862328688 = lockActions(i, duration)
729- let lockActionsResult = $t02862328688._1
730- let gWxAmountStart = $t02862328688._2
730+ let $t02865928724 = lockActions(i, duration)
731+ let lockActionsResult = $t02865928724._1
732+ let gWxAmountStart = $t02865928724._2
731733 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
732734 if ((updateRefActivity == updateRefActivity))
733735 then $Tuple2(lockActionsResult, unit)
740742 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
741743 then throwErr("permissions denied")
742744 else {
743- let $t02899829100 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
744- let userBoostAvailable = $t02899829100._1
745- let dataState = $t02899829100._2
746- let debug = $t02899829100._3
745+ let $t02903429136 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
746+ let userBoostAvailable = $t02903429136._1
747+ let dataState = $t02903429136._2
748+ let debug = $t02903429136._3
747749 $Tuple2(dataState, [userBoostAvailable])
748750 }
749751
751753
752754 @Callable(i)
753755 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
754- let $t02923229333 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
755- let userBoostAvailable = $t02923229333._1
756- let dataState = $t02923229333._2
757- let debug = $t02923229333._3
756+ let $t02926829369 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
757+ let userBoostAvailable = $t02926829369._1
758+ let dataState = $t02926829369._2
759+ let debug = $t02926829369._3
758760 $Tuple2(nil, [userBoostAvailable, debug])
759761 }
760762
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)
19+
20+let DECAY_CONSTANT = 8
1921
2022 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
2123
2224
2325 func throwErr (msg) = throw(wrapErr(msg))
2426
2527
2628 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
2729
2830
2931 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
3032
3133
3234 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
3335
3436
3537 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
3638
3739
3840 func abs (val) = if ((0 > val))
3941 then -(val)
4042 else val
4143
4244
4345 func ensurePositive (v,m) = if ((v >= 0))
4446 then v
4547 else throwErr((valueOrElse(m, "value") + " should be positive"))
4648
4749
4850 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
4951
5052
5153 let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(this, keyReferralsContractAddress()))
5254
5355 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
5456
5557 let referralProgramNameDefault = "wxlock"
5658
5759 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
5860
5961 func keyFactoryAddress () = "%s%s__config__factoryAddress"
6062
6163
6264 let IdxFactoryCfgStakingDapp = 1
6365
6466 let IdxFactoryCfgBoostingDapp = 2
6567
6668 let IdxFactoryCfgIdoDapp = 3
6769
6870 let IdxFactoryCfgTeamDapp = 4
6971
7072 let IdxFactoryCfgEmissionDapp = 5
7173
7274 let IdxFactoryCfgRestDapp = 6
7375
7476 let IdxFactoryCfgSlippageDapp = 7
7577
7678 let IdxFactoryCfgDaoDapp = 8
7779
7880 let IdxFactoryCfgMarketingDapp = 9
7981
8082 let IdxFactoryCfgGwxRewardDapp = 10
8183
8284 let IdxFactoryCfgBirdsDapp = 11
8385
8486 func keyFactoryCfg () = "%s__factoryConfig"
8587
8688
8789 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
8890
8991
9092 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
9193
9294
9395 func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
9496
9597
9698 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress()))
9799
98100
99101 func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP)
100102
101103
102104 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
103105
104106
105107 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
106108
107109
108110 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
109111
110112
111113 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
112114
113115
114116 func keyManagerPublicKey () = "%s__managerPublicKey"
115117
116118
117119 func keyManagerVaultAddress () = "%s__managerVaultAddress"
118120
119121
120122 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
121123
122124
123125 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
124126
125127
126128 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
127129
128130
129131 func keyBoostingV2LastUpdateHeight () = "%s%s__boostingV2__startBlock"
130132
131133
132134 func keyBoostingV2Integral () = "%s%s__boostingV2__integral"
133135
134136
135137 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
136138
137139
138140 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
139141
140142
141143 let IdxCfgAssetId = 1
142144
143145 let IdxCfgMinLockAmount = 2
144146
145147 let IdxCfgMinLockDuration = 3
146148
147149 let IdxCfgMaxLockDuration = 4
148150
149151 let IdxCfgMathContract = 5
150152
151153 let IdxCfgBlocksInPeriod = 6
152154
153155 let IdxCfgLockStepBlocks = 7
154156
155157 func keyConfig () = "%s__config"
156158
157159
158160 func readConfigArrayOrFail () = split(getStringOrFail(this, keyConfig()), SEP)
159161
160162
161163 let cfgArray = readConfigArrayOrFail()
162164
163165 let assetId = fromBase58String(cfgArray[IdxCfgAssetId])
164166
165167 let minLockAmount = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMinLockAmount]), wrapErr("invalid min lock amount"))
166168
167169 let minLockDuration = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMinLockDuration]), wrapErr("invalid min lock duration"))
168170
169171 let maxLockDuration = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMaxLockDuration]), wrapErr("invalid max lock duration"))
170172
171173 let mathContract = valueOrErrorMessage(addressFromString(cfgArray[IdxCfgMathContract]), wrapErr("invalid math contract address"))
172174
173175 let blocksInPeriod = valueOrErrorMessage(parseInt(cfgArray[IdxCfgBlocksInPeriod]), wrapErr("invalid blocks in period"))
174176
175177 let lockStepBlocks = valueOrErrorMessage(parseInt(cfgArray[IdxCfgLockStepBlocks]), wrapErr("invalid lock step blocks"))
176178
177179 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
178180 case s: String =>
179181 addressFromStringValue(s)
180182 case _ =>
181183 this
182184 }
183185
184186
185187 func managerPublicKeyOrUnit () = {
186188 let managerVaultAddress = getManagerVaultAddressOrThis()
187189 match getString(managerVaultAddress, keyManagerPublicKey()) {
188190 case s: String =>
189191 fromBase58String(s)
190192 case _: Unit =>
191193 unit
192194 case _ =>
193195 throw("Match error")
194196 }
195197 }
196198
197199
198200 func mustManager (i) = {
199201 let pd = throwErr("Permission denied")
200202 match managerPublicKeyOrUnit() {
201203 case pk: ByteVector =>
202204 if ((i.callerPublicKey == pk))
203205 then true
204206 else pd
205207 case _: Unit =>
206208 if ((i.caller == this))
207209 then true
208210 else pd
209211 case _ =>
210212 throw("Match error")
211213 }
212214 }
213215
214216
215217 let IdxLockAmount = 1
216218
217219 let IdxLockStart = 2
218220
219221 let IdxLockDuration = 3
220222
221223 let IdxLockLastUpdateTimestamp = 4
222224
223225 let IdxLockGwxAmount = 5
224226
225227 let IdxLockWxClaimed = 6
226228
227229 func keyLockParamsRecord (userAddress,txId) = makeString(["%s%s%s__lock", toString(userAddress), match txId {
228230 case b: ByteVector =>
229231 toBase58String(b)
230232 case _: Unit =>
231233 "legacy"
232234 case _ =>
233235 throw("Match error")
234236 }], SEP)
235237
236238
237239 func readLockParamsRecordOrFail (userAddress,txId) = split(getStringOrFail(this, keyLockParamsRecord(userAddress, txId)), SEP)
238240
239241
240242 func keyUserGwxAmountTotal (userAddress) = makeString(["%s%s__gwxAmountTotal", toString(userAddress)], SEP)
241243
242244
243245 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)
244246
245247
246248 func keyNextUserNum () = "%s__nextUserNum"
247249
248250
249251 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
250252
251253
252254 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
253255
254256
255257 func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
256258
257259
258260 func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
259261
260262
261263 func keyStatsLocksCount () = "%s%s__stats__locksCount"
262264
263265
264266 func keyStatsUsersCount () = "%s%s__stats__activeUsersCount"
265267
266268
267269 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(userNum)], SEP)
268270
269271
270272 func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(userNum), lpAssetId], SEP)
271273
272274
273275 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", toString(userNum)], SEP)
274276
275277
276278 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
277279
278280
279281 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", toString(userNum)], SEP)
280282
281283
282284 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", toString(userNum)], SEP)
283285
284286
285287 func keyGwxTotal () = "%s%s__gwx__total"
286288
287289
288290 func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
289291
290292
291293 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
292294
293295
294296 func keyCurrentEpochUi () = makeString(["%s", "currentEpochUi"], SEP)
295297
296298
297299 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
298300
299301
300302 func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
301303
302304
303305 func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
304306
305307
306308 func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
307309
308310
309311 func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
310312
311313
312314 func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
313315
314316
315317 func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
316318
317319
318320 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
319321
320322
321323 let factoryContract = readFactoryAddressOrFail()
322324
323325 let factoryCfg = readFactoryCfgOrFail(factoryContract)
324326
325327 let emissionContract = getEmissionAddressOrFail(factoryCfg)
326328
327329 let stakingContract = getStakingAddressOrFail(factoryCfg)
328330
329331 let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg)
330332
331333 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"))
332334
333335 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
334336
335337 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract))
336338
337339 let keyVotingEmissionRateContract = makeString(["%s", "votingEmissionRateContract"], SEP)
338340
339341 let boostCoeff = {
340342 let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
341343 if ($isInstanceOf(@, "Int"))
342344 then @
343345 else throw(($getType(@) + " couldn't be cast to Int"))
344346 }
345347
346348 func userNumberByAddressOrFail (userAddress) = match getString(this, keyUser2NumMapping(toString(userAddress))) {
347349 case s: String =>
348350 valueOrErrorMessage(parseInt(s), wrapErr("invalid user number"))
349351 case _: Unit =>
350352 throwErr("invalid user")
351353 case _ =>
352354 throw("Match error")
353355 }
354356
355357
356358 func getGwxAmountTotal () = valueOrElse(getInteger(this, keyGwxTotal()), 0)
357359
358360
359361 func getLockedGwxAmount (userAddress) = {
360362 let functionName = "getLockedGwxAmount"
361363 let votingEmissionRateContract = valueOrErrorMessage( match getString(votingEmissionContract, keyVotingEmissionRateContract) {
362364 case _: Unit =>
363365 unit
364366 case s: String =>
365367 addressFromString(s)
366368 case _ =>
367369 throw("Match error")
368370 }, wrapErr("invalid voting emission rate address"))
369371 let lockedVotingEmissionRate = {
370372 let @ = invoke(votingEmissionContract, functionName, [toString(userAddress)], nil)
371373 if ($isInstanceOf(@, "Int"))
372374 then @
373375 else throw(($getType(@) + " couldn't be cast to Int"))
374376 }
375377 let lockedVotingEmission = {
376378 let @ = invoke(votingEmissionRateContract, functionName, [toString(userAddress)], nil)
377379 if ($isInstanceOf(@, "Int"))
378380 then @
379381 else throw(($getType(@) + " couldn't be cast to Int"))
380382 }
381383 let locked = max([lockedVotingEmissionRate, lockedVotingEmission])
382384 locked
383385 }
384386
385387
386388 func HistoryEntry (type,user,amount,lockStart,duration,gwxAmount,i) = {
387389 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
388390 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)
389391 StringEntry(historyKEY, historyDATA)
390392 }
391393
392394
393395 func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = {
394396 let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks()
395397 let locksCountKEY = keyStatsLocksCount()
396398 let usersCountKEY = keyStatsUsersCount()
397399 let totalAmountKEY = keyLockParamTotalAmount()
398400 let locksDurationSumInBlocks = getIntOrZero(this, locksDurationSumInBlocksKEY)
399401 let locksCount = getIntOrZero(this, locksCountKEY)
400402 let usersCount = getIntOrZero(this, usersCountKEY)
401403 let totalAmount = getIntOrZero(this, totalAmountKEY)
402404 [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))]
403405 }
404406
405407
406408 func LockParamsEntry (userAddress,txId,amount,start,duration,gwxAmount,wxClaimed) = [StringEntry(keyLockParamsRecord(userAddress, txId), formatLockParamsRecord(amount, start, duration, gwxAmount, wxClaimed))]
407409
408410
409411 func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1))
410412 then throwErr("only one payment is allowed")
411413 else if ((size(i.payments) == 0))
412414 then 0
413415 else {
414416 let pmt = i.payments[0]
415417 if ((value(pmt.assetId) != expectedAssetId))
416418 then throwErr("invalid asset id in payment")
417419 else pmt.amount
418420 }
419421
420422
421423 func getUserGwxAmountTotal (userAddress) = valueOrElse(getInteger(this, keyUserGwxAmountTotal(userAddress)), 0)
422424
423425
424426 func getVotingEmissionEpochInfo () = {
425- let $t01449314783 = {
427+ let $t01451614806 = {
426428 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
427429 let lastFinalizedEpoch = (currentEpochUi - 1)
428430 if ((0 > lastFinalizedEpoch))
429431 then throwErr("invalid epoch")
430432 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
431433 }
432- let currentEpochUi = $t01449314783._1
433- let lastFinalizedEpoch = $t01449314783._2
434+ let currentEpochUi = $t01451614806._1
435+ let lastFinalizedEpoch = $t01451614806._2
434436 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
435437 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
436438 }
437439
438440
439441 func getPoolAssetsByLpAssetId (lpAssetIdStr) = {
440442 let idxAmountAssetId = 4
441443 let idxPriceAssetId = 5
442444 let poolCfg = {
443445 let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
444446 if ($isInstanceOf(@, "List[Any]"))
445447 then @
446448 else throw(($getType(@) + " couldn't be cast to List[Any]"))
447449 }
448450 let amountAssetId = {
449451 let @ = poolCfg[idxAmountAssetId]
450452 if ($isInstanceOf(@, "String"))
451453 then @
452454 else throw(($getType(@) + " couldn't be cast to String"))
453455 }
454456 let priceAssetId = {
455457 let @ = poolCfg[idxPriceAssetId]
456458 if ($isInstanceOf(@, "String"))
457459 then @
458460 else throw(($getType(@) + " couldn't be cast to String"))
459461 }
460462 $Tuple2(amountAssetId, priceAssetId)
461463 }
462464
463465
464466 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
465467 let userAddress = addressFromStringValue(userAddressStr)
466- let $t01547415554 = getVotingEmissionEpochInfo()
467- let lastFinalizedEpoch = $t01547415554._1
468- let currentEpochStartHeight = $t01547415554._2
469- let $t01555715632 = getPoolAssetsByLpAssetId(lpAssetIdStr)
470- let amountAssetId = $t01555715632._1
471- let priceAssetId = $t01555715632._2
468+ let $t01549715577 = getVotingEmissionEpochInfo()
469+ let lastFinalizedEpoch = $t01549715577._1
470+ let currentEpochStartHeight = $t01549715577._2
471+ let $t01558015655 = getPoolAssetsByLpAssetId(lpAssetIdStr)
472+ let amountAssetId = $t01558015655._1
473+ let priceAssetId = $t01558015655._2
472474 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
473475 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
474476 userVote
475477 }
476478
477479
478480 func getUserVoteStaked (lpAssetIdStr,userAddressStr) = {
479481 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(userAddressStr, lpAssetIdStr)), 0)
480482 let userVote = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
481483 if ((stakedByUser == 0))
482484 then 0
483485 else userVote
484486 }
485487
486488
487489 func getVotingResultStaked (lpAssetIdStr) = {
488- let $t01617616256 = getVotingEmissionEpochInfo()
489- let lastFinalizedEpoch = $t01617616256._1
490- let currentEpochStartHeight = $t01617616256._2
490+ let $t01619916279 = getVotingEmissionEpochInfo()
491+ let lastFinalizedEpoch = $t01619916279._1
492+ let currentEpochStartHeight = $t01619916279._2
491493 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
492494 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
493495 votingResultStaked
494496 }
495497
496498
497499 func getVotingResultStakedIntegral (lpAssetIdStr) = {
498- let $t01661816698 = getVotingEmissionEpochInfo()
499- let lastFinalizedEpoch = $t01661816698._1
500- let currentEpochStartHeight = $t01661816698._2
500+ let $t01664116721 = getVotingEmissionEpochInfo()
501+ let lastFinalizedEpoch = $t01664116721._1
502+ let currentEpochStartHeight = $t01664116721._2
501503 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
502504 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
503505 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
504506 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
505507 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
506508 votingResultStakedIntegral
507509 }
508510
509511
510512 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
511- let $t01753517615 = getVotingEmissionEpochInfo()
512- let lastFinalizedEpoch = $t01753517615._1
513- let currentEpochStartHeight = $t01753517615._2
513+ let $t01755817638 = getVotingEmissionEpochInfo()
514+ let lastFinalizedEpoch = $t01755817638._1
515+ let currentEpochStartHeight = $t01755817638._2
514516 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
515517 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
516518 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
517519 [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedNew), IntegerEntry(keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch), height), IntegerEntry(keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedIntegral)]
518520 }
519521
520522
521523 func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = {
522- let $t01822618306 = getVotingEmissionEpochInfo()
523- let lastFinalizedEpoch = $t01822618306._1
524- let currentEpochStartHeight = $t01822618306._2
524+ let $t01824918329 = getVotingEmissionEpochInfo()
525+ let lastFinalizedEpoch = $t01824918329._1
526+ let currentEpochStartHeight = $t01824918329._2
525527 let userAddress = addressFromStringValue(userAddressStr)
526528 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
527529 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
528530 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)), currentEpochStartHeight)
529531 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
530532 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
531533 userVoteStakedIntegral
532534 }
533535
534536
535537 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
536- let $t01909419174 = getVotingEmissionEpochInfo()
537- let lastFinalizedEpoch = $t01909419174._1
538- let currentEpochStartHeight = $t01909419174._2
538+ let $t01911719197 = getVotingEmissionEpochInfo()
539+ let lastFinalizedEpoch = $t01911719197._1
540+ let currentEpochStartHeight = $t01911719197._2
539541 let userAddress = addressFromStringValue(userAddressStr)
540542 let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
541543 let actions = if ((userVoteFinalized == 0))
542544 then nil
543545 else {
544546 let stakedVoteDelta = if (edge)
545547 then userVoteFinalized
546548 else -(userVoteFinalized)
547549 let votingResultActions = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
548550 let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr)
549551 let voteActions = [IntegerEntry(keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch), height), IntegerEntry(keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch), userVoteStakedIntegral)]
550552 (votingResultActions ++ voteActions)
551553 }
552554 actions
553555 }
554556
555557
556558 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
557- let $t02002820108 = getVotingEmissionEpochInfo()
558- let lastFinalizedEpoch = $t02002820108._1
559- let currentEpochStartHeight = $t02002820108._2
559+ let $t02005120131 = getVotingEmissionEpochInfo()
560+ let lastFinalizedEpoch = $t02005120131._1
561+ let currentEpochStartHeight = $t02005120131._2
560562 let userAddress = addressFromStringValue(userAddressStr)
561563 let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
562564 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0)
563565 let votingResultStakedIntegralLastKey = keyVotingResultStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
564566 let votingResultStakedIntegralLast = valueOrElse(getInteger(this, votingResultStakedIntegralLastKey), 0)
565567 let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr)
566568 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
567569 let userVoteStakedIntegralDiff = (userVoteStakedIntegral - userVoteStakedIntegralLast)
568570 let votingResultStakedIntegralDiff = (votingResultStakedIntegral - votingResultStakedIntegralLast)
569571 $Tuple3([IntegerEntry(userVoteStakedIntegralLastKey, userVoteStakedIntegral), IntegerEntry(votingResultStakedIntegralLastKey, votingResultStakedIntegral)], userVoteStakedIntegralDiff, votingResultStakedIntegralDiff)
570572 }
571573
572574
573575 func refreshBoostEmissionIntegral () = {
574576 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
575577 let boostingV2LastUpdateHeightOption = getInteger(this, keyBoostingV2LastUpdateHeight())
576578 let boostingV2IngergalOption = getInteger(this, keyBoostingV2Integral())
577579 let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock())
578580 let h = if ((height > emissionEnd))
579581 then emissionEnd
580582 else height
581583 let dh = match boostingV2LastUpdateHeightOption {
582584 case lastUpdateHeight: Int =>
583585 max([(h - lastUpdateHeight), 0])
584586 case _: Unit =>
585587 0
586588 case _ =>
587589 throw("Match error")
588590 }
589591 let boostEmissionPerBlock = ((wxEmissionPerBlock * (boostCoeff - 1)) / boostCoeff)
590592 let boostEmissionIntegralPrev = valueOrElse(boostingV2IngergalOption, 0)
591593 let boostEmissionIntegral = ((boostEmissionPerBlock * dh) + boostEmissionIntegralPrev)
592594 $Tuple2([IntegerEntry(keyBoostingV2Integral(), boostEmissionIntegral), IntegerEntry(keyBoostingV2LastUpdateHeight(), height)], boostEmissionIntegral)
593595 }
594596
595597
596598 func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = {
597599 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
598600 let userNum = userNumberByAddressOrFail(userAddress)
599601 if ((userNum == userNum))
600602 then {
601603 let EMPTYSTR = "empty"
602604 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
603605 then {
604606 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
605607 getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
606608 }
607609 else if (readOnly)
608610 then 0
609611 else throwErr(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
610612 let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNum, lpAssetIdStr)
611613 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNum)
612614 let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), getIntOrZero(this, userBoostEmissionLastIntegralKEY))
613615 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
614616 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
615617 if ((0 > userBoostEmissionIntegral))
616618 then throwErr("wrong calculations")
617619 else {
618- let $t02365023789 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
619- let stakedVotesIntegralsActions = $t02365023789._1
620- let userVoteIntegralDiff = $t02365023789._2
621- let totalVotesIntegralDiff = $t02365023789._3
620+ let $t02367323812 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
621+ let stakedVotesIntegralsActions = $t02367323812._1
622+ let userVoteIntegralDiff = $t02367323812._2
623+ let totalVotesIntegralDiff = $t02367323812._3
622624 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
623625 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
624626 then 0
625627 else fraction(poolUserBoostEmissionIntegral, userVoteIntegralDiff, totalVotesIntegralDiff)
626628 let dataState = ([IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] ++ stakedVotesIntegralsActions)
627629 let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(poolWeight), toString(userVoteIntegralDiff), toString(totalVotesIntegralDiff)], ":")
628630 $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug)
629631 }
630632 }
631633 else throw("Strict value is not equal to itself.")
632634 }
633635
634636
635637 func lockActions (i,duration) = {
636638 let assetIdStr = toBase58String(assetId)
637639 if ((size(i.payments) != 1))
638640 then throwErr("invalid payment - exact one payment must be attached")
639641 else {
640642 let pmt = i.payments[0]
641643 let pmtAmount = pmt.amount
642644 if ((assetId != value(pmt.assetId)))
643645 then throwErr((("invalid asset is in payment - " + assetIdStr) + " is expected"))
644646 else {
645647 let nextUserNumKEY = keyNextUserNum()
646648 let userAddress = i.caller
647649 let userAddressStr = toString(userAddress)
648650 let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr)))
649651 let userNumStr = if (userIsExisting)
650652 then value(getString(keyUser2NumMapping(userAddressStr)))
651653 else toString(getIntOrFail(this, nextUserNumKEY))
652654 let userNum = parseIntValue(userNumStr)
653655 let lockStart = height
654656 if (if ((minLockAmount > pmtAmount))
655657 then (userAddress != lpStakingPoolsContract)
656658 else false)
657659 then throwErr(("amount is less then minLockAmount=" + toString(minLockAmount)))
658660 else if ((minLockDuration > duration))
659661 then throwErr(("passed duration is less then minLockDuration=" + toString(minLockDuration)))
660662 else if ((duration > maxLockDuration))
661663 then throwErr(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration)))
662664 else if (((duration % lockStepBlocks) != 0))
663665 then throwErr(("duration must be multiple of lockStepBlocks=" + toString(lockStepBlocks)))
664666 else {
665667 let gWxAmountStart = fraction(pmtAmount, duration, maxLockDuration)
666668 let gwxAmountTotal = getGwxAmountTotal()
667669 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNum)
668670 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
669671 let userGwxAmountTotal = getUserGwxAmountTotal(userAddress)
670672 let gwxRewardInv = invoke(gwxRewardContract, "refreshUserReward", [userAddress.bytes, userNum], nil)
671673 if ((gwxRewardInv == gwxRewardInv))
672674 then {
673675 let arr = if (userIsExisting)
674676 then nil
675677 else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)]
676678 $Tuple2(((((arr ++ LockParamsEntry(userAddress, i.transactionId, pmtAmount, lockStart, duration, gWxAmountStart, 0)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting)
677679 then 0
678680 else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, gWxAmountStart, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyGwxTotal(), (gwxAmountTotal + gWxAmountStart)), IntegerEntry(keyUserGwxAmountTotal(userAddress), (userGwxAmountTotal + gWxAmountStart))]), gWxAmountStart)
679681 }
680682 else throw("Strict value is not equal to itself.")
681683 }
682684 }
683685 }
684686 }
685687
686688
687689 func getWxWithdrawable (userAddress,txIdOption) = {
688690 let userRecordArray = readLockParamsRecordOrFail(userAddress, txIdOption)
689691 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
690692 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
691693 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
692694 let lockEnd = (lockStart + lockDuration)
693695 let wxClaimed = parseIntValue(userRecordArray[IdxLockWxClaimed])
694696 let t = ((height - lockStart) / blocksInPeriod)
695- let exponent = fraction(toBigInt(t), (toBigInt((8 * blocksInPeriod)) * MULT18BI), toBigInt(lockDuration))
697+ let exponent = fraction(toBigInt(t), (toBigInt((DECAY_CONSTANT * blocksInPeriod)) * MULT18BI), toBigInt(lockDuration))
696698 let wxWithdrawable = if ((height > lockEnd))
697699 then userAmount
698700 else (toInt(fraction(toBigInt(userAmount), (MULT18BI - pow(toBigInt(5), 1, exponent, SCALE18, SCALE18, DOWN)), MULT18BI)) - wxClaimed)
699701 wxWithdrawable
700702 }
701703
702704
703705 @Callable(i)
704706 func lockRef (duration,referrerAddress,signature) = {
705- let $t02810028165 = lockActions(i, duration)
706- let lockActionsResult = $t02810028165._1
707- let gWxAmountStart = $t02810028165._2
707+ let $t02813628201 = lockActions(i, duration)
708+ let lockActionsResult = $t02813628201._1
709+ let gWxAmountStart = $t02813628201._2
708710 let referralAddress = toString(i.caller)
709711 let refInv = if (if ((referrerAddress == ""))
710712 then true
711713 else (signature == base58''))
712714 then unit
713715 else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil)
714716 if ((refInv == refInv))
715717 then {
716718 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
717719 if ((updateRefActivity == updateRefActivity))
718720 then $Tuple2(lockActionsResult, unit)
719721 else throw("Strict value is not equal to itself.")
720722 }
721723 else throw("Strict value is not equal to itself.")
722724 }
723725
724726
725727
726728 @Callable(i)
727729 func lock (duration) = {
728- let $t02862328688 = lockActions(i, duration)
729- let lockActionsResult = $t02862328688._1
730- let gWxAmountStart = $t02862328688._2
730+ let $t02865928724 = lockActions(i, duration)
731+ let lockActionsResult = $t02865928724._1
732+ let gWxAmountStart = $t02865928724._2
731733 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
732734 if ((updateRefActivity == updateRefActivity))
733735 then $Tuple2(lockActionsResult, unit)
734736 else throw("Strict value is not equal to itself.")
735737 }
736738
737739
738740
739741 @Callable(i)
740742 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
741743 then throwErr("permissions denied")
742744 else {
743- let $t02899829100 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
744- let userBoostAvailable = $t02899829100._1
745- let dataState = $t02899829100._2
746- let debug = $t02899829100._3
745+ let $t02903429136 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
746+ let userBoostAvailable = $t02903429136._1
747+ let dataState = $t02903429136._2
748+ let debug = $t02903429136._3
747749 $Tuple2(dataState, [userBoostAvailable])
748750 }
749751
750752
751753
752754 @Callable(i)
753755 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
754- let $t02923229333 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
755- let userBoostAvailable = $t02923229333._1
756- let dataState = $t02923229333._2
757- let debug = $t02923229333._3
756+ let $t02926829369 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
757+ let userBoostAvailable = $t02926829369._1
758+ let dataState = $t02926829369._2
759+ let debug = $t02926829369._3
758760 $Tuple2(nil, [userBoostAvailable, debug])
759761 }
760762
761763
762764
763765 @Callable(i)
764766 func unlock (txIdStr) = {
765767 let userAddress = i.caller
766768 let userAddressStr = toString(userAddress)
767769 let txIdOption = if ((txIdStr == ""))
768770 then unit
769771 else fromBase58String(txIdStr)
770772 let userRecordArray = readLockParamsRecordOrFail(userAddress, txIdOption)
771773 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
772774 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
773775 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
774776 let wxClaimed = parseIntValue(userRecordArray[IdxLockWxClaimed])
775777 let gwxAmount = parseIntValue(userRecordArray[IdxLockGwxAmount])
776778 let t = ((height - lockStart) / blocksInPeriod)
777779 let wxWithdrawable = getWxWithdrawable(userAddress, txIdOption)
778780 let gWxAmountStart = fraction(userAmount, lockDuration, maxLockDuration)
779781 let gwxBurned = min([fraction((t * blocksInPeriod), gWxAmountStart, maxLockDuration), gwxAmount])
780782 let gwxRemaining = ensurePositive((gwxAmount - gwxBurned), "gwxRemaining")
781783 let lockedGwxAmount = getLockedGwxAmount(userAddress)
782784 if ((0 >= wxWithdrawable))
783785 then throwErr("nothing to unlock")
784786 else {
785787 let gwxAmountTotal = getGwxAmountTotal()
786788 let userGwxAmountTotal = getUserGwxAmountTotal(userAddress)
787789 let userGwxAmountTotalNew = ensurePositive((userGwxAmountTotal - gwxBurned), "userGwxAmountTotalNew")
788790 if ((lockedGwxAmount > userGwxAmountTotalNew))
789791 then throwErr(("locked gwx amount: " + toString(lockedGwxAmount)))
790792 else {
791793 let userNum = parseIntValue(valueOrErrorMessage(getString(keyUser2NumMapping(userAddressStr)), wrapErr("invalid user number")))
792794 let gwxRewardInv = invoke(gwxRewardContract, "refreshUserReward", [userAddress.bytes, userNum], nil)
793795 if ((gwxRewardInv == gwxRewardInv))
794796 then ((((LockParamsEntry(userAddress, txIdOption, 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)])
795797 else throw("Strict value is not equal to itself.")
796798 }
797799 }
798800 }
799801
800802
801803
802804 @Callable(i)
803805 func gwxUserInfoREADONLY (userAddressStr) = {
804806 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
805807 let gwxAmount = getUserGwxAmountTotal(userAddress)
806808 $Tuple2(nil, [gwxAmount])
807809 }
808810
809811
810812
811813 @Callable(i)
812814 func userMaxDurationREADONLY (userAddressStr) = $Tuple2(nil, $Tuple2("lock", maxLockDuration))
813815
814816
815817
816818 @Callable(i)
817819 func getUserGwxAmountAtHeightREADONLY (userAddressStr,targetHeight) = {
818820 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
819821 let gwxAmount = getUserGwxAmountTotal(userAddress)
820822 $Tuple2(nil, gwxAmount)
821823 }
822824
823825
824826
825827 @Callable(i)
826828 func getUserGwxAmount (userAddressStr) = {
827829 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
828830 let gwxAmount = getUserGwxAmountTotal(userAddress)
829831 $Tuple2(nil, gwxAmount)
830832 }
831833
832834
833835
834836 @Callable(i)
835837 func getGwxTotalREADONLY () = $Tuple2(nil, getGwxAmountTotal())
836838
837839
838840
839841 @Callable(i)
840842 func onBoostEmissionUpdate () = {
841843 let checkCaller = if ((i.caller == emissionContract))
842844 then true
843845 else mustManager(i)
844846 if ((checkCaller == checkCaller))
845847 then refreshBoostEmissionIntegral()
846848 else throw("Strict value is not equal to itself.")
847849 }
848850
849851
850852
851853 @Callable(i)
852854 func onStakedVoteUpdate (lpAssetIdStr,userAddressStr,edge) = {
853855 let checkCaller = if ((i.caller == stakingContract))
854856 then true
855857 else mustManager(i)
856858 if ((checkCaller == checkCaller))
857859 then {
858860 let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge)
859861 $Tuple2(actions, unit)
860862 }
861863 else throw("Strict value is not equal to itself.")
862864 }
863865
864866
865867
866868 @Callable(i)
867869 func getVotingResultStakedREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStaked(lpAssetIdStr))
868870
869871
870872
871873 @Callable(i)
872874 func getVotingResultStakedIntegralREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStakedIntegral(lpAssetIdStr))
873875
874876
875877
876878 @Callable(i)
877879 func getUserVoteFinalizedREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteFinalized(lpAssetIdStr, userAddressStr))
878880
879881
880882
881883 @Callable(i)
882884 func getUserVoteStakedIntegralREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr))
883885
884886
885887 @Verifier(tx)
886888 func verify () = {
887889 let targetPublicKey = match managerPublicKeyOrUnit() {
888890 case pk: ByteVector =>
889891 pk
890892 case _: Unit =>
891893 tx.senderPublicKey
892894 case _ =>
893895 throw("Match error")
894896 }
895897 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
896898 }
897899

github/deemru/w8io/169f3d6 
120.69 ms