tx · HNuyo542xzNyJZ8fWbNgw4Y9zsDqt61JkAmxSk7M3QJc

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02600000 Waves

2023.08.14 12:50 [2710079] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "HNuyo542xzNyJZ8fWbNgw4Y9zsDqt61JkAmxSk7M3QJc", "fee": 2600000, "feeAssetId": null, "timestamp": 1692006545505, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "2ZGF4RWYjae4E3w5hjG2BQryNYSDqUpCjo1861EhHTxHnpg6gMW99YraFwRCt1UpGHzbxaZfLJmCSq1Ff27Y9oZb" ], "script": "base64:BgKKLggCEggKBggIAQEBCBIFCgMBCAISAwoBARIECgIICBIECgIICBIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIEgASABIFCgMICAQSAwoBCBIDCgEIEgQKAggIEgQKAggIIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIhBjb250cmFjdEZpbGVuYW1lIgdTQ0FMRTE4IgZNVUxUMTgiCE1VTFQxOEJJIhVkdXJhdGlvbk1vbnRoc0FsbG93ZWQiC2Jsb2Nrc0luRGF5Ig1ibG9ja3NJbk1vbnRoIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIMZ2V0SW50T3JaZXJvIg9nZXRJbnRPckRlZmF1bHQiCmRlZmF1bHRWYWwiDGdldEludE9yRmFpbCIDYWJzIgN2YWwiDmVuc3VyZVBvc2l0aXZlIgF2IgFtIhtrZXlSZWZlcnJhbHNDb250cmFjdEFkZHJlc3MiHnJlZmVycmFsc0NvbnRyYWN0QWRkcmVzc09yRmFpbCIWa2V5Um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compacted Prev: J4yBN261bq3dkFdNev3X6agcLXU6hredbUo21P4Q1UL1 Next: FisWfXcmP2HDisjzh8QUDSVtj5gya5bWqp5HuzvvbgSt Diff:
OldNewDifferences
254254 func keyUserGwxAmountTotal (userAddress) = makeString(["%s%s__gwxAmountTotal", toString(userAddress)], SEP)
255255
256256
257-func formatLockParamsRecord (amount,start,duration,gwxAmount,wxClaimed) = makeString(["%d%d%d%d%d%d%d", toString(amount), toString(start), toString(duration), toString(lastBlock.timestamp), toString(gwxAmount), toString(wxClaimed)], SEP)
257+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)
258258
259259
260260 func keyNextUserNum () = "%s__nextUserNum"
436436
437437
438438 func getVotingEmissionEpochInfo () = {
439- let $t01521415504 = {
439+ let $t01521215502 = {
440440 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
441441 let lastFinalizedEpoch = (currentEpochUi - 1)
442442 if ((0 > lastFinalizedEpoch))
443443 then throwErr("invalid epoch")
444444 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
445445 }
446- let currentEpochUi = $t01521415504._1
447- let lastFinalizedEpoch = $t01521415504._2
446+ let currentEpochUi = $t01521215502._1
447+ let lastFinalizedEpoch = $t01521215502._2
448448 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
449449 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
450450 }
477477
478478 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
479479 let userAddress = addressFromStringValue(userAddressStr)
480- let $t01619516275 = getVotingEmissionEpochInfo()
481- let lastFinalizedEpoch = $t01619516275._1
482- let currentEpochStartHeight = $t01619516275._2
483- let $t01627816353 = getPoolAssetsByLpAssetId(lpAssetIdStr)
484- let amountAssetId = $t01627816353._1
485- let priceAssetId = $t01627816353._2
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
486486 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
487487 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
488488 userVote
499499
500500
501501 func getVotingResultStaked (lpAssetIdStr) = {
502- let $t01689716977 = getVotingEmissionEpochInfo()
503- let lastFinalizedEpoch = $t01689716977._1
504- let currentEpochStartHeight = $t01689716977._2
502+ let $t01689516975 = getVotingEmissionEpochInfo()
503+ let lastFinalizedEpoch = $t01689516975._1
504+ let currentEpochStartHeight = $t01689516975._2
505505 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
506506 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
507507 votingResultStaked
509509
510510
511511 func getVotingResultStakedIntegral (lpAssetIdStr) = {
512- let $t01733917419 = getVotingEmissionEpochInfo()
513- let lastFinalizedEpoch = $t01733917419._1
514- let currentEpochStartHeight = $t01733917419._2
512+ let $t01733717417 = getVotingEmissionEpochInfo()
513+ let lastFinalizedEpoch = $t01733717417._1
514+ let currentEpochStartHeight = $t01733717417._2
515515 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
516516 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
517517 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
522522
523523
524524 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
525- let $t01825618336 = getVotingEmissionEpochInfo()
526- let lastFinalizedEpoch = $t01825618336._1
527- let currentEpochStartHeight = $t01825618336._2
525+ let $t01825418334 = getVotingEmissionEpochInfo()
526+ let lastFinalizedEpoch = $t01825418334._1
527+ let currentEpochStartHeight = $t01825418334._2
528528 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
529529 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
530530 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
533533
534534
535535 func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = {
536- let $t01894719027 = getVotingEmissionEpochInfo()
537- let lastFinalizedEpoch = $t01894719027._1
538- let currentEpochStartHeight = $t01894719027._2
536+ let $t01894519025 = getVotingEmissionEpochInfo()
537+ let lastFinalizedEpoch = $t01894519025._1
538+ let currentEpochStartHeight = $t01894519025._2
539539 let userAddress = addressFromStringValue(userAddressStr)
540540 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
541541 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
547547
548548
549549 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
550- let $t01981519895 = getVotingEmissionEpochInfo()
551- let lastFinalizedEpoch = $t01981519895._1
552- let currentEpochStartHeight = $t01981519895._2
550+ let $t01981319893 = getVotingEmissionEpochInfo()
551+ let lastFinalizedEpoch = $t01981319893._1
552+ let currentEpochStartHeight = $t01981319893._2
553553 let userAddress = addressFromStringValue(userAddressStr)
554554 let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
555555 let actions = if ((userVoteFinalized == 0))
568568
569569
570570 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
571- let $t02074920829 = getVotingEmissionEpochInfo()
572- let lastFinalizedEpoch = $t02074920829._1
573- let currentEpochStartHeight = $t02074920829._2
571+ let $t02074720827 = getVotingEmissionEpochInfo()
572+ let lastFinalizedEpoch = $t02074720827._1
573+ let currentEpochStartHeight = $t02074720827._2
574574 let userAddress = addressFromStringValue(userAddressStr)
575575 let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
576576 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0)
629629 if ((0 > userBoostEmissionIntegral))
630630 then throwErr("wrong calculations")
631631 else {
632- let $t02437124510 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
633- let stakedVotesIntegralsActions = $t02437124510._1
634- let userVoteIntegralDiff = $t02437124510._2
635- let totalVotesIntegralDiff = $t02437124510._3
632+ let $t02436924508 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
633+ let stakedVotesIntegralsActions = $t02436924508._1
634+ let userVoteIntegralDiff = $t02436924508._2
635+ let totalVotesIntegralDiff = $t02436924508._3
636636 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
637637 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
638638 then 0
727727
728728 @Callable(i)
729729 func lockRef (duration,referrerAddress,signature) = {
730- let $t02930929374 = lockActions(i, duration)
731- let lockActionsResult = $t02930929374._1
732- let gWxAmountStart = $t02930929374._2
730+ let $t02930729372 = lockActions(i, duration)
731+ let lockActionsResult = $t02930729372._1
732+ let gWxAmountStart = $t02930729372._2
733733 let referralAddress = toString(i.caller)
734734 let refInv = if (if ((referrerAddress == ""))
735735 then true
750750
751751 @Callable(i)
752752 func lock (duration) = {
753- let $t02983229897 = lockActions(i, duration)
754- let lockActionsResult = $t02983229897._1
755- let gWxAmountStart = $t02983229897._2
753+ let $t02983029895 = lockActions(i, duration)
754+ let lockActionsResult = $t02983029895._1
755+ let gWxAmountStart = $t02983029895._2
756756 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
757757 if ((updateRefActivity == updateRefActivity))
758758 then $Tuple2(lockActionsResult, unit)
765765 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
766766 then throwErr("permissions denied")
767767 else {
768- let $t03020730309 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
769- let userBoostAvailable = $t03020730309._1
770- let dataState = $t03020730309._2
771- let debug = $t03020730309._3
768+ let $t03020530307 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
769+ let userBoostAvailable = $t03020530307._1
770+ let dataState = $t03020530307._2
771+ let debug = $t03020530307._3
772772 $Tuple2(dataState, [userBoostAvailable])
773773 }
774774
776776
777777 @Callable(i)
778778 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
779- let $t03044130542 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
780- let userBoostAvailable = $t03044130542._1
781- let dataState = $t03044130542._2
782- let debug = $t03044130542._3
779+ let $t03043930540 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
780+ let userBoostAvailable = $t03043930540._1
781+ let dataState = $t03043930540._2
782+ let debug = $t03043930540._3
783783 $Tuple2(nil, [userBoostAvailable, debug])
784784 }
785785
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"
145145
146146
147147 func keyNextPergetIntOrDefault () = "%s__nextPeriod"
148148
149149
150150 func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
151151
152152
153153 let IdxCfgAssetId = 1
154154
155155 let IdxCfgMinLockAmount = 2
156156
157157 let IdxCfgMinLockDuration = 3
158158
159159 let IdxCfgMaxLockDuration = 4
160160
161161 let IdxCfgMathContract = 5
162162
163163 let IdxCfgBlocksInPeriod = 6
164164
165165 func keyConfig () = "%s__config"
166166
167167
168168 func readConfigArrayOrFail () = split(getStringOrFail(this, keyConfig()), SEP)
169169
170170
171171 let cfgArray = readConfigArrayOrFail()
172172
173173 let assetId = fromBase58String(cfgArray[IdxCfgAssetId])
174174
175175 let minLockAmount = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMinLockAmount]), wrapErr("invalid min lock amount"))
176176
177177 let minLockDuration = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMinLockDuration]), wrapErr("invalid min lock duration"))
178178
179179 let maxLockDuration = valueOrErrorMessage(parseInt(cfgArray[IdxCfgMaxLockDuration]), wrapErr("invalid max lock duration"))
180180
181181 let mathContract = valueOrErrorMessage(addressFromString(cfgArray[IdxCfgMathContract]), wrapErr("invalid math contract address"))
182182
183183 let blocksInPeriod = valueOrErrorMessage(parseInt(cfgArray[IdxCfgBlocksInPeriod]), wrapErr("invalid blocks in period"))
184184
185185 func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d%s", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP)
186186
187187
188188 func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract)
189189
190190
191191 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
192192 case s: String =>
193193 addressFromStringValue(s)
194194 case _ =>
195195 this
196196 }
197197
198198
199199 func managerPublicKeyOrUnit () = {
200200 let managerVaultAddress = getManagerVaultAddressOrThis()
201201 match getString(managerVaultAddress, keyManagerPublicKey()) {
202202 case s: String =>
203203 fromBase58String(s)
204204 case _: Unit =>
205205 unit
206206 case _ =>
207207 throw("Match error")
208208 }
209209 }
210210
211211
212212 func mustManager (i) = {
213213 let pd = throwErr("Permission denied")
214214 match managerPublicKeyOrUnit() {
215215 case pk: ByteVector =>
216216 if ((i.callerPublicKey == pk))
217217 then true
218218 else pd
219219 case _: Unit =>
220220 if ((i.caller == this))
221221 then true
222222 else pd
223223 case _ =>
224224 throw("Match error")
225225 }
226226 }
227227
228228
229229 let IdxLockAmount = 1
230230
231231 let IdxLockStart = 2
232232
233233 let IdxLockDuration = 3
234234
235235 let IdxLockLastUpdateTimestamp = 4
236236
237237 let IdxLockGwxAmount = 5
238238
239239 let IdxLockWxClaimed = 6
240240
241241 func keyLockParamsRecord (userAddress,txId) = makeString(["%s%s%s__lock", toString(userAddress), match txId {
242242 case b: ByteVector =>
243243 toBase58String(b)
244244 case _: Unit =>
245245 "legacy"
246246 case _ =>
247247 throw("Match error")
248248 }], SEP)
249249
250250
251251 func readLockParamsRecordOrFail (userAddress,txId) = split(getStringOrFail(this, keyLockParamsRecord(userAddress, txId)), SEP)
252252
253253
254254 func keyUserGwxAmountTotal (userAddress) = makeString(["%s%s__gwxAmountTotal", toString(userAddress)], SEP)
255255
256256
257-func formatLockParamsRecord (amount,start,duration,gwxAmount,wxClaimed) = makeString(["%d%d%d%d%d%d%d", toString(amount), toString(start), toString(duration), toString(lastBlock.timestamp), toString(gwxAmount), toString(wxClaimed)], SEP)
257+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)
258258
259259
260260 func keyNextUserNum () = "%s__nextUserNum"
261261
262262
263263 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
264264
265265
266266 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
267267
268268
269269 func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
270270
271271
272272 func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
273273
274274
275275 func keyStatsLocksCount () = "%s%s__stats__locksCount"
276276
277277
278278 func keyStatsUsersCount () = "%s%s__stats__activeUsersCount"
279279
280280
281281 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(userNum)], SEP)
282282
283283
284284 func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(userNum), lpAssetId], SEP)
285285
286286
287287 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", toString(userNum)], SEP)
288288
289289
290290 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
291291
292292
293293 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", toString(userNum)], SEP)
294294
295295
296296 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", toString(userNum)], SEP)
297297
298298
299299 func keyGwxTotal () = "%s%s__gwx__total"
300300
301301
302302 func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
303303
304304
305305 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
306306
307307
308308 func keyCurrentEpochUi () = makeString(["%s", "currentEpochUi"], SEP)
309309
310310
311311 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
312312
313313
314314 func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
315315
316316
317317 func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
318318
319319
320320 func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
321321
322322
323323 func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
324324
325325
326326 func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
327327
328328
329329 func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
330330
331331
332332 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
333333
334334
335335 let factoryContract = readFactoryAddressOrFail()
336336
337337 let factoryCfg = readFactoryCfgOrFail(factoryContract)
338338
339339 let emissionContract = getEmissionAddressOrFail(factoryCfg)
340340
341341 let stakingContract = getStakingAddressOrFail(factoryCfg)
342342
343343 let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg)
344344
345345 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"))
346346
347347 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
348348
349349 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract))
350350
351351 let keyVotingEmissionRateContract = makeString(["%s", "votingEmissionRateContract"], SEP)
352352
353353 let boostCoeff = {
354354 let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
355355 if ($isInstanceOf(@, "Int"))
356356 then @
357357 else throw(($getType(@) + " couldn't be cast to Int"))
358358 }
359359
360360 func userNumberByAddressOrFail (userAddress) = match getString(this, keyUser2NumMapping(toString(userAddress))) {
361361 case s: String =>
362362 valueOrErrorMessage(parseInt(s), wrapErr("invalid user number"))
363363 case _: Unit =>
364364 throwErr("invalid user")
365365 case _ =>
366366 throw("Match error")
367367 }
368368
369369
370370 func getGwxAmountTotal () = valueOrElse(getInteger(this, keyGwxTotal()), 0)
371371
372372
373373 func getLockedGwxAmount (userAddress) = {
374374 let functionName = "getLockedGwxAmount"
375375 let votingEmissionRateContract = valueOrErrorMessage( match getString(votingEmissionContract, keyVotingEmissionRateContract) {
376376 case _: Unit =>
377377 unit
378378 case s: String =>
379379 addressFromString(s)
380380 case _ =>
381381 throw("Match error")
382382 }, wrapErr("invalid voting emission rate address"))
383383 let lockedVotingEmissionRate = {
384384 let @ = invoke(votingEmissionContract, functionName, [toString(userAddress)], nil)
385385 if ($isInstanceOf(@, "Int"))
386386 then @
387387 else throw(($getType(@) + " couldn't be cast to Int"))
388388 }
389389 let lockedVotingEmission = {
390390 let @ = invoke(votingEmissionRateContract, functionName, [toString(userAddress)], nil)
391391 if ($isInstanceOf(@, "Int"))
392392 then @
393393 else throw(($getType(@) + " couldn't be cast to Int"))
394394 }
395395 let locked = max([lockedVotingEmissionRate, lockedVotingEmission])
396396 locked
397397 }
398398
399399
400400 func HistoryEntry (type,user,amount,lockStart,duration,gwxAmount,i) = {
401401 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
402402 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)
403403 StringEntry(historyKEY, historyDATA)
404404 }
405405
406406
407407 func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = {
408408 let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks()
409409 let locksCountKEY = keyStatsLocksCount()
410410 let usersCountKEY = keyStatsUsersCount()
411411 let totalAmountKEY = keyLockParamTotalAmount()
412412 let locksDurationSumInBlocks = getIntOrZero(this, locksDurationSumInBlocksKEY)
413413 let locksCount = getIntOrZero(this, locksCountKEY)
414414 let usersCount = getIntOrZero(this, usersCountKEY)
415415 let totalAmount = getIntOrZero(this, totalAmountKEY)
416416 [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))]
417417 }
418418
419419
420420 func LockParamsEntry (userAddress,txId,amount,start,duration,gwxAmount,wxClaimed) = [StringEntry(keyLockParamsRecord(userAddress, txId), formatLockParamsRecord(amount, start, duration, gwxAmount, wxClaimed))]
421421
422422
423423 func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1))
424424 then throwErr("only one payment is allowed")
425425 else if ((size(i.payments) == 0))
426426 then 0
427427 else {
428428 let pmt = i.payments[0]
429429 if ((value(pmt.assetId) != expectedAssetId))
430430 then throwErr("invalid asset id in payment")
431431 else pmt.amount
432432 }
433433
434434
435435 func getUserGwxAmountTotal (userAddress) = valueOrElse(getInteger(this, keyUserGwxAmountTotal(userAddress)), 0)
436436
437437
438438 func getVotingEmissionEpochInfo () = {
439- let $t01521415504 = {
439+ let $t01521215502 = {
440440 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
441441 let lastFinalizedEpoch = (currentEpochUi - 1)
442442 if ((0 > lastFinalizedEpoch))
443443 then throwErr("invalid epoch")
444444 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
445445 }
446- let currentEpochUi = $t01521415504._1
447- let lastFinalizedEpoch = $t01521415504._2
446+ let currentEpochUi = $t01521215502._1
447+ let lastFinalizedEpoch = $t01521215502._2
448448 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
449449 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
450450 }
451451
452452
453453 func getPoolAssetsByLpAssetId (lpAssetIdStr) = {
454454 let idxAmountAssetId = 4
455455 let idxPriceAssetId = 5
456456 let poolCfg = {
457457 let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
458458 if ($isInstanceOf(@, "List[Any]"))
459459 then @
460460 else throw(($getType(@) + " couldn't be cast to List[Any]"))
461461 }
462462 let amountAssetId = {
463463 let @ = poolCfg[idxAmountAssetId]
464464 if ($isInstanceOf(@, "String"))
465465 then @
466466 else throw(($getType(@) + " couldn't be cast to String"))
467467 }
468468 let priceAssetId = {
469469 let @ = poolCfg[idxPriceAssetId]
470470 if ($isInstanceOf(@, "String"))
471471 then @
472472 else throw(($getType(@) + " couldn't be cast to String"))
473473 }
474474 $Tuple2(amountAssetId, priceAssetId)
475475 }
476476
477477
478478 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
479479 let userAddress = addressFromStringValue(userAddressStr)
480- let $t01619516275 = getVotingEmissionEpochInfo()
481- let lastFinalizedEpoch = $t01619516275._1
482- let currentEpochStartHeight = $t01619516275._2
483- let $t01627816353 = getPoolAssetsByLpAssetId(lpAssetIdStr)
484- let amountAssetId = $t01627816353._1
485- let priceAssetId = $t01627816353._2
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
486486 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
487487 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
488488 userVote
489489 }
490490
491491
492492 func getUserVoteStaked (lpAssetIdStr,userAddressStr) = {
493493 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(userAddressStr, lpAssetIdStr)), 0)
494494 let userVote = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
495495 if ((stakedByUser == 0))
496496 then 0
497497 else userVote
498498 }
499499
500500
501501 func getVotingResultStaked (lpAssetIdStr) = {
502- let $t01689716977 = getVotingEmissionEpochInfo()
503- let lastFinalizedEpoch = $t01689716977._1
504- let currentEpochStartHeight = $t01689716977._2
502+ let $t01689516975 = getVotingEmissionEpochInfo()
503+ let lastFinalizedEpoch = $t01689516975._1
504+ let currentEpochStartHeight = $t01689516975._2
505505 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
506506 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
507507 votingResultStaked
508508 }
509509
510510
511511 func getVotingResultStakedIntegral (lpAssetIdStr) = {
512- let $t01733917419 = getVotingEmissionEpochInfo()
513- let lastFinalizedEpoch = $t01733917419._1
514- let currentEpochStartHeight = $t01733917419._2
512+ let $t01733717417 = getVotingEmissionEpochInfo()
513+ let lastFinalizedEpoch = $t01733717417._1
514+ let currentEpochStartHeight = $t01733717417._2
515515 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
516516 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
517517 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
518518 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
519519 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
520520 votingResultStakedIntegral
521521 }
522522
523523
524524 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
525- let $t01825618336 = getVotingEmissionEpochInfo()
526- let lastFinalizedEpoch = $t01825618336._1
527- let currentEpochStartHeight = $t01825618336._2
525+ let $t01825418334 = getVotingEmissionEpochInfo()
526+ let lastFinalizedEpoch = $t01825418334._1
527+ let currentEpochStartHeight = $t01825418334._2
528528 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
529529 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
530530 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
531531 [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedNew), IntegerEntry(keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch), height), IntegerEntry(keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedIntegral)]
532532 }
533533
534534
535535 func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = {
536- let $t01894719027 = getVotingEmissionEpochInfo()
537- let lastFinalizedEpoch = $t01894719027._1
538- let currentEpochStartHeight = $t01894719027._2
536+ let $t01894519025 = getVotingEmissionEpochInfo()
537+ let lastFinalizedEpoch = $t01894519025._1
538+ let currentEpochStartHeight = $t01894519025._2
539539 let userAddress = addressFromStringValue(userAddressStr)
540540 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
541541 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
542542 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)), currentEpochStartHeight)
543543 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
544544 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
545545 userVoteStakedIntegral
546546 }
547547
548548
549549 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
550- let $t01981519895 = getVotingEmissionEpochInfo()
551- let lastFinalizedEpoch = $t01981519895._1
552- let currentEpochStartHeight = $t01981519895._2
550+ let $t01981319893 = getVotingEmissionEpochInfo()
551+ let lastFinalizedEpoch = $t01981319893._1
552+ let currentEpochStartHeight = $t01981319893._2
553553 let userAddress = addressFromStringValue(userAddressStr)
554554 let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
555555 let actions = if ((userVoteFinalized == 0))
556556 then nil
557557 else {
558558 let stakedVoteDelta = if (edge)
559559 then userVoteFinalized
560560 else -(userVoteFinalized)
561561 let votingResultActions = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
562562 let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr)
563563 let voteActions = [IntegerEntry(keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch), height), IntegerEntry(keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch), userVoteStakedIntegral)]
564564 (votingResultActions ++ voteActions)
565565 }
566566 actions
567567 }
568568
569569
570570 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
571- let $t02074920829 = getVotingEmissionEpochInfo()
572- let lastFinalizedEpoch = $t02074920829._1
573- let currentEpochStartHeight = $t02074920829._2
571+ let $t02074720827 = getVotingEmissionEpochInfo()
572+ let lastFinalizedEpoch = $t02074720827._1
573+ let currentEpochStartHeight = $t02074720827._2
574574 let userAddress = addressFromStringValue(userAddressStr)
575575 let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
576576 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0)
577577 let votingResultStakedIntegralLastKey = keyVotingResultStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
578578 let votingResultStakedIntegralLast = valueOrElse(getInteger(this, votingResultStakedIntegralLastKey), 0)
579579 let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr)
580580 let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr)
581581 let userVoteStakedIntegralDiff = (userVoteStakedIntegral - userVoteStakedIntegralLast)
582582 let votingResultStakedIntegralDiff = (votingResultStakedIntegral - votingResultStakedIntegralLast)
583583 $Tuple3([IntegerEntry(userVoteStakedIntegralLastKey, userVoteStakedIntegral), IntegerEntry(votingResultStakedIntegralLastKey, votingResultStakedIntegral)], userVoteStakedIntegralDiff, votingResultStakedIntegralDiff)
584584 }
585585
586586
587587 func refreshBoostEmissionIntegral () = {
588588 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
589589 let boostingV2LastUpdateHeightOption = getInteger(this, keyBoostingV2LastUpdateHeight())
590590 let boostingV2IngergalOption = getInteger(this, keyBoostingV2Integral())
591591 let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock())
592592 let h = if ((height > emissionEnd))
593593 then emissionEnd
594594 else height
595595 let dh = match boostingV2LastUpdateHeightOption {
596596 case lastUpdateHeight: Int =>
597597 max([(h - lastUpdateHeight), 0])
598598 case _: Unit =>
599599 0
600600 case _ =>
601601 throw("Match error")
602602 }
603603 let boostEmissionPerBlock = ((wxEmissionPerBlock * (boostCoeff - 1)) / boostCoeff)
604604 let boostEmissionIntegralPrev = valueOrElse(boostingV2IngergalOption, 0)
605605 let boostEmissionIntegral = ((boostEmissionPerBlock * dh) + boostEmissionIntegralPrev)
606606 $Tuple2([IntegerEntry(keyBoostingV2Integral(), boostEmissionIntegral), IntegerEntry(keyBoostingV2LastUpdateHeight(), height)], boostEmissionIntegral)
607607 }
608608
609609
610610 func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = {
611611 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
612612 let userNum = userNumberByAddressOrFail(userAddress)
613613 if ((userNum == userNum))
614614 then {
615615 let EMPTYSTR = "empty"
616616 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
617617 then {
618618 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
619619 getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
620620 }
621621 else if (readOnly)
622622 then 0
623623 else throwErr(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
624624 let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNum, lpAssetIdStr)
625625 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNum)
626626 let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), getIntOrZero(this, userBoostEmissionLastIntegralKEY))
627627 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
628628 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
629629 if ((0 > userBoostEmissionIntegral))
630630 then throwErr("wrong calculations")
631631 else {
632- let $t02437124510 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
633- let stakedVotesIntegralsActions = $t02437124510._1
634- let userVoteIntegralDiff = $t02437124510._2
635- let totalVotesIntegralDiff = $t02437124510._3
632+ let $t02436924508 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
633+ let stakedVotesIntegralsActions = $t02436924508._1
634+ let userVoteIntegralDiff = $t02436924508._2
635+ let totalVotesIntegralDiff = $t02436924508._3
636636 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
637637 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
638638 then 0
639639 else fraction(poolUserBoostEmissionIntegral, userVoteIntegralDiff, totalVotesIntegralDiff)
640640 let dataState = ([IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] ++ stakedVotesIntegralsActions)
641641 let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(poolWeight), toString(userVoteIntegralDiff), toString(totalVotesIntegralDiff)], ":")
642642 $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug)
643643 }
644644 }
645645 else throw("Strict value is not equal to itself.")
646646 }
647647
648648
649649 func lockActions (i,durationMonths) = if (!(containsElement(durationMonthsAllowed, durationMonths)))
650650 then throwErr("invalid duration")
651651 else {
652652 let duration = (durationMonths * blocksInMonth)
653653 let assetIdStr = toBase58String(assetId)
654654 if ((size(i.payments) != 1))
655655 then throwErr("invalid payment - exact one payment must be attached")
656656 else {
657657 let pmt = i.payments[0]
658658 let pmtAmount = pmt.amount
659659 if ((assetId != value(pmt.assetId)))
660660 then throwErr((("invalid asset is in payment - " + assetIdStr) + " is expected"))
661661 else {
662662 let nextUserNumKEY = keyNextUserNum()
663663 let userAddress = i.caller
664664 let userAddressStr = toString(userAddress)
665665 let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr)))
666666 let userNumStr = if (userIsExisting)
667667 then value(getString(keyUser2NumMapping(userAddressStr)))
668668 else toString(getIntOrFail(this, nextUserNumKEY))
669669 let userNum = parseIntValue(userNumStr)
670670 let lockStart = height
671671 if (if ((minLockAmount > pmtAmount))
672672 then (userAddress != lpStakingPoolsContract)
673673 else false)
674674 then throwErr(("amount is less then minLockAmount=" + toString(minLockAmount)))
675675 else if ((minLockDuration > duration))
676676 then throwErr(("passed duration is less then minLockDuration=" + toString(minLockDuration)))
677677 else if ((duration > maxLockDuration))
678678 then throwErr(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration)))
679679 else {
680680 let gWxAmountStart = fraction(pmtAmount, duration, maxLockDuration)
681681 let gwxAmountTotal = getGwxAmountTotal()
682682 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNum)
683683 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
684684 let userGwxAmountTotal = getUserGwxAmountTotal(userAddress)
685685 let gwxRewardInv = reentrantInvoke(gwxRewardContract, "refreshUserReward", [userAddress.bytes], nil)
686686 if ((gwxRewardInv == gwxRewardInv))
687687 then {
688688 let arr = if (userIsExisting)
689689 then nil
690690 else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)]
691691 $Tuple2(((((arr ++ LockParamsEntry(userAddress, i.transactionId, pmtAmount, lockStart, duration, gWxAmountStart, 0)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting)
692692 then 0
693693 else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, gWxAmountStart, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyGwxTotal(), (gwxAmountTotal + gWxAmountStart)), IntegerEntry(keyUserGwxAmountTotal(userAddress), (userGwxAmountTotal + gWxAmountStart))]), gWxAmountStart)
694694 }
695695 else throw("Strict value is not equal to itself.")
696696 }
697697 }
698698 }
699699 }
700700
701701
702702 func getWxWithdrawable (userAddress,txIdOption) = {
703703 let userRecordArray = readLockParamsRecordOrFail(userAddress, txIdOption)
704704 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
705705 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
706706 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
707707 let lockEnd = (lockStart + lockDuration)
708708 let wxClaimed = parseIntValue(userRecordArray[IdxLockWxClaimed])
709709 let t = ((height - lockStart) / blocksInPeriod)
710710 let exponent = fraction(toBigInt(t), (toBigInt((8 * blocksInPeriod)) * MULT18BI), toBigInt(lockDuration))
711711 let wxWithdrawable = if ((height > lockEnd))
712712 then userAmount
713713 else (toInt(fraction(toBigInt(userAmount), (MULT18BI - pow(toBigInt(5), 1, exponent, SCALE18, SCALE18, DOWN)), MULT18BI)) - wxClaimed)
714714 wxWithdrawable
715715 }
716716
717717
718718 @Callable(i)
719719 func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = {
720720 let checkCaller = mustManager(i)
721721 if ((checkCaller == checkCaller))
722722 then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0))
723723 else throw("Strict value is not equal to itself.")
724724 }
725725
726726
727727
728728 @Callable(i)
729729 func lockRef (duration,referrerAddress,signature) = {
730- let $t02930929374 = lockActions(i, duration)
731- let lockActionsResult = $t02930929374._1
732- let gWxAmountStart = $t02930929374._2
730+ let $t02930729372 = lockActions(i, duration)
731+ let lockActionsResult = $t02930729372._1
732+ let gWxAmountStart = $t02930729372._2
733733 let referralAddress = toString(i.caller)
734734 let refInv = if (if ((referrerAddress == ""))
735735 then true
736736 else (signature == base58''))
737737 then unit
738738 else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil)
739739 if ((refInv == refInv))
740740 then {
741741 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
742742 if ((updateRefActivity == updateRefActivity))
743743 then $Tuple2(lockActionsResult, unit)
744744 else throw("Strict value is not equal to itself.")
745745 }
746746 else throw("Strict value is not equal to itself.")
747747 }
748748
749749
750750
751751 @Callable(i)
752752 func lock (duration) = {
753- let $t02983229897 = lockActions(i, duration)
754- let lockActionsResult = $t02983229897._1
755- let gWxAmountStart = $t02983229897._2
753+ let $t02983029895 = lockActions(i, duration)
754+ let lockActionsResult = $t02983029895._1
755+ let gWxAmountStart = $t02983029895._2
756756 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
757757 if ((updateRefActivity == updateRefActivity))
758758 then $Tuple2(lockActionsResult, unit)
759759 else throw("Strict value is not equal to itself.")
760760 }
761761
762762
763763
764764 @Callable(i)
765765 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
766766 then throwErr("permissions denied")
767767 else {
768- let $t03020730309 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
769- let userBoostAvailable = $t03020730309._1
770- let dataState = $t03020730309._2
771- let debug = $t03020730309._3
768+ let $t03020530307 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
769+ let userBoostAvailable = $t03020530307._1
770+ let dataState = $t03020530307._2
771+ let debug = $t03020530307._3
772772 $Tuple2(dataState, [userBoostAvailable])
773773 }
774774
775775
776776
777777 @Callable(i)
778778 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
779- let $t03044130542 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
780- let userBoostAvailable = $t03044130542._1
781- let dataState = $t03044130542._2
782- let debug = $t03044130542._3
779+ let $t03043930540 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
780+ let userBoostAvailable = $t03043930540._1
781+ let dataState = $t03043930540._2
782+ let debug = $t03043930540._3
783783 $Tuple2(nil, [userBoostAvailable, debug])
784784 }
785785
786786
787787
788788 @Callable(i)
789789 func unlock (txIdStr) = {
790790 let userAddress = i.caller
791791 let userAddressStr = toString(userAddress)
792792 let txId = fromBase58String(txIdStr)
793793 let userRecordArray = readLockParamsRecordOrFail(userAddress, if ((txIdStr == ""))
794794 then unit
795795 else txId)
796796 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
797797 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
798798 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
799799 let wxClaimed = parseIntValue(userRecordArray[IdxLockWxClaimed])
800800 let gwxAmount = parseIntValue(userRecordArray[IdxLockGwxAmount])
801801 let t = ((height - lockStart) / blocksInPeriod)
802802 let wxWithdrawable = getWxWithdrawable(userAddress, if ((txIdStr == ""))
803803 then unit
804804 else txId)
805805 let gWxAmountStart = fraction(userAmount, lockDuration, maxLockDuration)
806806 let gwxBurned = min([fraction((t * blocksInPeriod), gWxAmountStart, maxLockDuration), gwxAmount])
807807 let gwxRemaining = ensurePositive((gwxAmount - gwxBurned), "gwxRemaining")
808808 let lockedGwxAmount = getLockedGwxAmount(userAddress)
809809 if ((0 >= userAmount))
810810 then throwErr("nothing to unlock")
811811 else {
812812 let gwxAmountTotal = getGwxAmountTotal()
813813 let userGwxAmountTotal = getUserGwxAmountTotal(userAddress)
814814 let userGwxAmountTotalNew = ensurePositive((userGwxAmountTotal - gwxBurned), "userGwxAmountTotalNew")
815815 if ((lockedGwxAmount > userGwxAmountTotalNew))
816816 then throwErr(("locked gwx amount: " + toString(lockedGwxAmount)))
817817 else {
818818 let gwxRewardInv = reentrantInvoke(gwxRewardContract, "refreshUserReward", [userAddress.bytes], nil)
819819 if ((gwxRewardInv == gwxRewardInv))
820820 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)])
821821 else throw("Strict value is not equal to itself.")
822822 }
823823 }
824824 }
825825
826826
827827
828828 @Callable(i)
829829 func gwxUserInfoREADONLY (userAddressStr) = {
830830 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
831831 let gwxAmount = getUserGwxAmountTotal(userAddress)
832832 $Tuple2(nil, [gwxAmount])
833833 }
834834
835835
836836
837837 @Callable(i)
838838 func userMaxDurationREADONLY (userAddressStr) = $Tuple2(nil, $Tuple2("increaseLock", maxLockDuration))
839839
840840
841841
842842 @Callable(i)
843843 func getUserGwxAmountAtHeightREADONLY (userAddressStr,targetHeight) = {
844844 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
845845 let gwxAmount = getUserGwxAmountTotal(userAddress)
846846 $Tuple2(nil, gwxAmount)
847847 }
848848
849849
850850
851851 @Callable(i)
852852 func getUserGwxAmount (userAddressStr) = {
853853 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
854854 let gwxAmount = getUserGwxAmountTotal(userAddress)
855855 $Tuple2(nil, gwxAmount)
856856 }
857857
858858
859859
860860 @Callable(i)
861861 func getGwxTotalREADONLY () = $Tuple2(nil, getGwxAmountTotal())
862862
863863
864864
865865 @Callable(i)
866866 func onBoostEmissionUpdate () = {
867867 let checkCaller = if ((i.caller == emissionContract))
868868 then true
869869 else mustManager(i)
870870 if ((checkCaller == checkCaller))
871871 then refreshBoostEmissionIntegral()
872872 else throw("Strict value is not equal to itself.")
873873 }
874874
875875
876876
877877 @Callable(i)
878878 func onStakedVoteUpdate (lpAssetIdStr,userAddressStr,edge) = {
879879 let checkCaller = if ((i.caller == stakingContract))
880880 then true
881881 else mustManager(i)
882882 if ((checkCaller == checkCaller))
883883 then {
884884 let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge)
885885 $Tuple2(actions, unit)
886886 }
887887 else throw("Strict value is not equal to itself.")
888888 }
889889
890890
891891
892892 @Callable(i)
893893 func getVotingResultStakedREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStaked(lpAssetIdStr))
894894
895895
896896
897897 @Callable(i)
898898 func getVotingResultStakedIntegralREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStakedIntegral(lpAssetIdStr))
899899
900900
901901
902902 @Callable(i)
903903 func getUserVoteFinalizedREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteFinalized(lpAssetIdStr, userAddressStr))
904904
905905
906906
907907 @Callable(i)
908908 func getUserVoteStakedIntegralREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr))
909909
910910
911911 @Verifier(tx)
912912 func verify () = {
913913 let targetPublicKey = match managerPublicKeyOrUnit() {
914914 case pk: ByteVector =>
915915 pk
916916 case _: Unit =>
917917 tx.senderPublicKey
918918 case _ =>
919919 throw("Match error")
920920 }
921921 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
922922 }
923923

github/deemru/w8io/026f985 
121.04 ms