tx · HCqH1ALyE3k84QSBFxu2vysBY51EDpBdXLS5LCWmoGnf

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02700000 Waves

2023.03.14 11:39 [2489484] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "HCqH1ALyE3k84QSBFxu2vysBY51EDpBdXLS5LCWmoGnf", "fee": 2700000, "feeAssetId": null, "timestamp": 1678783168818, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "5ryRi1fdykDCRZ5DLp85AAb9EqzcL8YmQfVRQt9iiuVJQMCp5tZ7e7hAVwXUJyDAwmmmCdeDoKvo1Ynd7y3YLprc" ], "script": "base64:BgLFLggCEggKBggIAQEBCBIFCgMBCAISAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgASBQoDCAgEEgMKAQgSAwoBCBIAIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgRzdHJmIgdhZGRyZXNzIgNrZXkiA2lveiIDaW9kIgpkZWZhdWx0VmFsIgNpb2YiA2FicyIDdmFsIgNhYWwiByRtYXRjaDAiCnZhbEFueUx5c3QiAmFpIgZ2YWxJbnQiG2tleVJlZmVycmFsc0NvbnRyYWN0QWRkcmVzcyIecmVmZXJyYWxzQ29udHJhY3RBZGRyZXNzT3JGYWlsIhZrZXlSZWZlcnJhbFByb2dyYW1OYW1lIhpyZWZlcnJhbFByb2dyYW1OYW1lRGVmYXVsdCITcmVmZXJyYWxQcm9ncmFtTmFtZSIRa2V5RmFjdG9yeUFkZHJlc3MiGElkeEZhY3RvcnlDZmdTdGFraW5nRGFwcCIZSWR4RmFjdG9yeUNmZ0Jv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dmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYUcBDmNvbmZpcm1NYW5hZ2VyAAQCZm8JAQJhRQAEAmZwAwkBCWlzRGVmaW5lZAEFAmZvBgkAAgECEk5vIHBlbmRpbmcgbWFuYWdlcgMJAAACBQJmcAUCZnAEAmZxAwkAAAIIBQJhRw9jYWxsZXJQdWJsaWNLZXkJAQV2YWx1ZQEFAmZvBgkAAgECG1lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAACBQJmcQUCZnEJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAmFmAAkA2AQBCQEFdmFsdWUBBQJmbwkAzAgCCQELRGVsZXRlRW50cnkBCQECYWcABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAmZyAQJmcwAEAmZ0BAFyCQECYUMAAwkAAQIFAXICCkJ5dGVWZWN0b3IEAmFJBQFyBQJhSQMJAAECBQFyAgRVbml0CAUCZnIPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmZyCWJvZHlCeXRlcwkAkQMCCAUCZnIGcHJvb2ZzAAAFAmZ0rREQ+g==", "height": 2489484, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9nADWe8u2wXQ4GtPDijPpNWMpf89X1wkAox3R9brWmHt Next: 5GnyFfmuoMGkpQTSRNgwbgG9uXqHqADHXPcVzpHnUHLK Diff:
OldNewDifferences
473473 let idxAmountAssetId = 4
474474 let idxPriceAssetId = 5
475475 let poolCfg = {
476- let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
476+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
477477 if ($isInstanceOf(@, "List[Any]"))
478478 then @
479479 else throw(($getType(@) + " couldn't be cast to List[Any]"))
497497 let stakedVoteDelta = if (edge)
498498 then userVote
499499 else -(userVote)
500- let $t01946719586 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
501- let votingResultActions = $t01946719586._1
502- let votingResultStakedIntegral = $t01946719586._2
500+ let $t01947519594 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
501+ let votingResultActions = $t01947519594._1
502+ let votingResultStakedIntegral = $t01947519594._2
503503 let userVoteStaked = if (edge)
504504 then 0
505505 else userVote
526526 let userNumStr = userRecordArray[IdxLockUserNum]
527527 let gwxRewardEmissionStartHeight = valueOrElse(getInteger(gwxRewardContract, keyGwxRewardEmissionStartHeight()), 0)
528528 let EMPTYSTR = "empty"
529- let $t02106521633 = if ((lpAssetIdStr != EMPTYSTR))
529+ let $t02107321641 = if ((lpAssetIdStr != EMPTYSTR))
530530 then {
531531 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
532532 let pw1 = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
536536 else if (readOnly)
537537 then $Tuple2(0, 0)
538538 else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
539- let poolWeight0 = $t02106521633._1
540- let poolWeight1 = $t02106521633._2
539+ let poolWeight0 = $t02107321641._1
540+ let poolWeight1 = $t02107321641._2
541541 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
542542 let emissionStart = iof(emissionContract, keyEmissionStartBlock())
543543 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
682682
683683 @Callable(i)
684684 func lockRef (duration,referrerAddress,signature) = {
685- let $t03009830163 = lockActions(i, duration)
686- let lockActionsResult = $t03009830163._1
687- let gWxAmountStart = $t03009830163._2
685+ let $t03010630171 = lockActions(i, duration)
686+ let lockActionsResult = $t03010630171._1
687+ let gWxAmountStart = $t03010630171._2
688688 let referralAddress = toString(i.caller)
689689 let refInv = if (if ((referrerAddress == ""))
690690 then true
705705
706706 @Callable(i)
707707 func lock (duration) = {
708- let $t03062130686 = lockActions(i, duration)
709- let lockActionsResult = $t03062130686._1
710- let gWxAmountStart = $t03062130686._2
708+ let $t03062930694 = lockActions(i, duration)
709+ let lockActionsResult = $t03062930694._1
710+ let gWxAmountStart = $t03062930694._2
711711 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
712712 if ((updateRefActivity == updateRefActivity))
713713 then $Tuple2(lockActionsResult, unit)
796796 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
797797 then throw("permissions denied")
798798 else {
799- let $t03566735769 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
800- let userBoostAvailable = $t03566735769._1
801- let dataState = $t03566735769._2
802- let debug = $t03566735769._3
799+ let $t03567535777 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
800+ let userBoostAvailable = $t03567535777._1
801+ let dataState = $t03567535777._2
802+ let debug = $t03567535777._3
803803 $Tuple2(dataState, [userBoostAvailable])
804804 }
805805
807807
808808 @Callable(i)
809809 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
810- let $t03590136002 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
811- let userBoostAvailable = $t03590136002._1
812- let dataState = $t03590136002._2
813- let debug = $t03590136002._3
810+ let $t03590936010 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
811+ let userBoostAvailable = $t03590936010._1
812+ let dataState = $t03590936010._2
813+ let debug = $t03590936010._3
814814 $Tuple2(nil, [userBoostAvailable, debug])
815815 }
816816
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 func wrapErr (msg) = makeString(["boosting.ride:", msg], " ")
1313
1414
1515 func throwErr (msg) = throw(wrapErr(msg))
1616
1717
1818 func strf (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
1919
2020
2121 func ioz (address,key) = valueOrElse(getInteger(address, key), 0)
2222
2323
2424 func iod (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
2525
2626
2727 func iof (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
2828
2929
3030 func abs (val) = if ((0 > val))
3131 then -(val)
3232 else val
3333
3434
3535 func aal (val) = match val {
3636 case valAnyLyst: List[Any] =>
3737 valAnyLyst
3838 case _ =>
3939 throw("fail to cast into List[Any]")
4040 }
4141
4242
4343 func ai (val) = match val {
4444 case valInt: Int =>
4545 valInt
4646 case _ =>
4747 throw("fail to cast into Int")
4848 }
4949
5050
5151 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
5252
5353
5454 let referralsContractAddressOrFail = addressFromStringValue(strf(this, keyReferralsContractAddress()))
5555
5656 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
5757
5858 let referralProgramNameDefault = "wxlock"
5959
6060 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
6161
6262 func keyFactoryAddress () = "%s%s__config__factoryAddress"
6363
6464
6565 let IdxFactoryCfgStakingDapp = 1
6666
6767 let IdxFactoryCfgBoostingDapp = 2
6868
6969 let IdxFactoryCfgIdoDapp = 3
7070
7171 let IdxFactoryCfgTeamDapp = 4
7272
7373 let IdxFactoryCfgEmissionDapp = 5
7474
7575 let IdxFactoryCfgRestDapp = 6
7676
7777 let IdxFactoryCfgSlippageDapp = 7
7878
7979 let IdxFactoryCfgDaoDapp = 8
8080
8181 let IdxFactoryCfgMarketingDapp = 9
8282
8383 let IdxFactoryCfgGwxRewardDapp = 10
8484
8585 let IdxFactoryCfgBirdsDapp = 11
8686
8787 func keyFactoryCfg () = "%s__factoryConfig"
8888
8989
9090 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9191
9292
9393 func keyFactoryLpList () = "%s__lpTokensList"
9494
9595
9696 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9797
9898
9999 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
100100
101101
102102 func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
103103
104104
105105 func readFactoryAddressOrFail () = addressFromStringValue(strf(this, keyFactoryAddress()))
106106
107107
108108 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
109109
110110
111111 func readFactoryCfgOrFail (factory) = split(strf(factory, keyFactoryCfg()), SEP)
112112
113113
114114 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
115115
116116
117117 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
118118
119119
120120 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
121121
122122
123123 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
124124
125125
126126 func keyManagerPublicKey () = "%s__managerPublicKey"
127127
128128
129129 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
130130
131131
132132 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
133133
134134
135135 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
136136
137137
138138 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
139139
140140
141141 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
142142
143143
144144 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
145145
146146
147147 func keyNextPeriod () = "%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 func keyConfig () = "%s__config"
164164
165165
166166 func readConfigArrayOrFail () = split(strf(this, keyConfig()), SEP)
167167
168168
169169 let mathContract = addressFromStringValue(readConfigArrayOrFail()[IdxCfgMathContract])
170170
171171 func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP)
172172
173173
174174 func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract)
175175
176176
177177 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
178178 case s: String =>
179179 fromBase58String(s)
180180 case _: Unit =>
181181 unit
182182 case _ =>
183183 throw("Match error")
184184 }
185185
186186
187187 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
188188 case s: String =>
189189 fromBase58String(s)
190190 case _: Unit =>
191191 unit
192192 case _ =>
193193 throw("Match error")
194194 }
195195
196196
197197 func mustManager (i) = {
198198 let pd = throw("Permission denied")
199199 match managerPublicKeyOrUnit() {
200200 case pk: ByteVector =>
201201 if ((i.callerPublicKey == pk))
202202 then true
203203 else pd
204204 case _: Unit =>
205205 if ((i.caller == this))
206206 then true
207207 else pd
208208 case _ =>
209209 throw("Match error")
210210 }
211211 }
212212
213213
214214 let IdxLockUserNum = 1
215215
216216 let IdxLockAmount = 2
217217
218218 let IdxLockStart = 3
219219
220220 let IdxLockDuration = 4
221221
222222 let IdxLockParamK = 5
223223
224224 let IdxLockParamB = 6
225225
226226 func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP)
227227
228228
229229 func readLockParamsRecordOrFail (userAddress) = split(strf(this, keyLockParamsRecord(userAddress)), SEP)
230230
231231
232232 func formatLockParamsRecordS (userNum,amount,start,duration,paramK,paramB,lastUpdTimestamp,gwxAmount) = makeString(["%d%d%d%d%d%d%d%d", userNum, amount, start, duration, paramK, paramB, lastUpdTimestamp, gwxAmount], SEP)
233233
234234
235235 func formatLockParamsRecord (userNum,amount,start,duration,paramK,paramB,gwxAmount) = formatLockParamsRecordS(userNum, toString(amount), toString(start), toString(duration), toString(paramK), toString(paramB), toString(lastBlock.timestamp), toString(gwxAmount))
236236
237237
238238 func keyNextUserNum () = "%s__nextUserNum"
239239
240240
241241 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
242242
243243
244244 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
245245
246246
247247 func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP)
248248
249249
250250 func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP)
251251
252252
253253 func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP)
254254
255255
256256 func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP)
257257
258258
259259 func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP)
260260
261261
262262 func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP)
263263
264264
265265 func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP)
266266
267267
268268 func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
269269
270270
271271 func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
272272
273273
274274 func keyStatsLocksCount () = "%s%s__stats__locksCount"
275275
276276
277277 func keyStatsUsersCount () = "%s%s__stats__activeUsersCount"
278278
279279
280280 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP)
281281
282282
283283 func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastInt", userNum, lpAssetId], SEP)
284284
285285
286286 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP)
287287
288288
289289 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
290290
291291
292292 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP)
293293
294294
295295 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP)
296296
297297
298298 func keyTotalCachedGwx () = "%s%s__gwxCached__total"
299299
300300
301301 func keyTotalCachedGwxCorrective () = "%s__gwxCachedTotalCorrective"
302302
303303
304304 let factoryContract = readFactoryAddressOrFail()
305305
306306 let factoryCfg = readFactoryCfgOrFail(factoryContract)
307307
308308 let emissionContract = getEmissionAddressOrFail(factoryCfg)
309309
310310 let stakingContract = getStakingAddressOrFail(factoryCfg)
311311
312312 let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg)
313313
314314 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"))
315315
316316 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
317317
318318 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract))
319319
320320 func getTotalCachedGwx (correct) = {
321321 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
322322 let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi)
323323 let keyTargetEpoch = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], SEP)
324324 let targetEpochOption = getInteger(this, keyTargetEpoch)
325325 let totalCachedGwxRaw = valueOrElse(getInteger(this, keyTotalCachedGwx()), 0)
326326 let isCorrectionActivated = if (isDefined(targetEpochOption))
327327 then (currentEpochUi >= value(targetEpochOption))
328328 else false
329329 let corrective = if (if (isCorrectionActivated)
330330 then correct
331331 else false)
332332 then valueOrElse(getInteger(this, keyTotalCachedGwxCorrective()), 0)
333333 else 0
334334 max([0, (totalCachedGwxRaw + corrective)])
335335 }
336336
337337
338338 func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = {
339339 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
340340 let historyDATA = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(lockStart), toString(duration), toString(k), toString(b)], SEP)
341341 StringEntry(historyKEY, historyDATA)
342342 }
343343
344344
345345 func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = {
346346 let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks()
347347 let locksCountKEY = keyStatsLocksCount()
348348 let usersCountKEY = keyStatsUsersCount()
349349 let totalAmountKEY = keyLockParamTotalAmount()
350350 let locksDurationSumInBlocks = ioz(this, locksDurationSumInBlocksKEY)
351351 let locksCount = ioz(this, locksCountKEY)
352352 let usersCount = ioz(this, usersCountKEY)
353353 let totalAmount = ioz(this, totalAmountKEY)
354354 [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))]
355355 }
356356
357357
358358 func calcGwxAmount (kRaw,bRaw,h) = {
359359 let SCALE = 1000
360360 (((kRaw * h) + bRaw) / SCALE)
361361 }
362362
363363
364364 func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = {
365365 let userAmountKEY = keyLockParamUserAmount(userNum)
366366 let startBlockKEY = keyLockParamStartBlock(userNum)
367367 let durationKEY = keyLockParamDuration(userNum)
368368 let kKEY = keyLockParamK(userNum)
369369 let bKEY = keyLockParamB(userNum)
370370 let kByPeriodKEY = keyLockParamByPeriodK(userNum, period)
371371 let bByPeriodKEY = keyLockParamByPeriodB(userNum, period)
372372 let gwxAmount = calcGwxAmount(k, b, height)
373373 [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPeriodKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))]
374374 }
375375
376376
377377 func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1))
378378 then throw("only one payment is allowed")
379379 else if ((size(i.payments) == 0))
380380 then 0
381381 else {
382382 let pmt = i.payments[0]
383383 if ((value(pmt.assetId) != expectedAssetId))
384384 then throw("invalid asset id in payment")
385385 else pmt.amount
386386 }
387387
388388
389389 func calcUserGwxAmountAtHeight (userAddress,targetHeight) = {
390390 let EMPTY = "empty"
391391 let user2NumMappingKEY = keyUser2NumMapping(userAddress)
392392 let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY)
393393 let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0)
394394 let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0)
395395 let gwxAmountCalc = calcGwxAmount(k, b, targetHeight)
396396 let gwxAmount = if ((0 > gwxAmountCalc))
397397 then 0
398398 else gwxAmountCalc
399399 gwxAmount
400400 }
401401
402402
403403 func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height)
404404
405405
406406 func getVotingEmissionEpochInfo () = {
407407 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
408408 let $t01492815216 = {
409409 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi))
410410 let lastFinalizedEpoch = (currentEpochUi - 1)
411411 if ((0 > lastFinalizedEpoch))
412412 then throwErr("invalid epoch")
413413 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
414414 }
415415 let currentEpochUi = $t01492815216._1
416416 let lastFinalizedEpoch = $t01492815216._2
417417 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
418418
419419 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
420420 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
421421 }
422422
423423
424424 func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
425425
426426
427427 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
428428
429429
430430 func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
431431
432432
433433 func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
434434
435435
436436 func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
437437
438438
439439 func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
440440
441441
442442 func getVotingResultStaked (lpAssetIdStr) = {
443443 let $t01690116981 = getVotingEmissionEpochInfo()
444444 let lastFinalizedEpoch = $t01690116981._1
445445 let currentEpochStartHeight = $t01690116981._2
446446 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
447447 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
448448 votingResultStaked
449449 }
450450
451451
452452 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
453453 let $t01750217582 = getVotingEmissionEpochInfo()
454454 let lastFinalizedEpoch = $t01750217582._1
455455 let currentEpochStartHeight = $t01750217582._2
456456 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
457457 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
458458 let votingResultStakedIntegralKey = keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)
459459 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, votingResultStakedIntegralKey), 0)
460460 let votingResultLastUpdateHeightKey = keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)
461461 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, votingResultLastUpdateHeightKey), currentEpochStartHeight)
462462 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
463463 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
464464 $Tuple2([IntegerEntry(keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedNew), IntegerEntry(votingResultLastUpdateHeightKey, height), IntegerEntry(votingResultStakedIntegralKey, votingResultStakedIntegral)], votingResultStakedIntegral)
465465 }
466466
467467
468468 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
469469 let $t01878218862 = getVotingEmissionEpochInfo()
470470 let lastFinalizedEpoch = $t01878218862._1
471471 let currentEpochStartHeight = $t01878218862._2
472472 let userAddress = addressFromStringValue(userAddressStr)
473473 let idxAmountAssetId = 4
474474 let idxPriceAssetId = 5
475475 let poolCfg = {
476- let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
476+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
477477 if ($isInstanceOf(@, "List[Any]"))
478478 then @
479479 else throw(($getType(@) + " couldn't be cast to List[Any]"))
480480 }
481481 let amountAssetId = {
482482 let @ = poolCfg[idxAmountAssetId]
483483 if ($isInstanceOf(@, "String"))
484484 then @
485485 else throw(($getType(@) + " couldn't be cast to String"))
486486 }
487487 let priceAssetId = {
488488 let @ = poolCfg[idxPriceAssetId]
489489 if ($isInstanceOf(@, "String"))
490490 then @
491491 else throw(($getType(@) + " couldn't be cast to String"))
492492 }
493493 let userVote = valueOrElse(getInteger(votingEmissionContract, keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)), 0)
494494 let actions = if ((userVote == 0))
495495 then nil
496496 else {
497497 let stakedVoteDelta = if (edge)
498498 then userVote
499499 else -(userVote)
500- let $t01946719586 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
501- let votingResultActions = $t01946719586._1
502- let votingResultStakedIntegral = $t01946719586._2
500+ let $t01947519594 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
501+ let votingResultActions = $t01947519594._1
502+ let votingResultStakedIntegral = $t01947519594._2
503503 let userVoteStaked = if (edge)
504504 then 0
505505 else userVote
506506 let userVoteStakedIntegralKey = keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)
507507 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, userVoteStakedIntegralKey), 0)
508508 let userVoteStakedLastUpdateHeightKey = keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)
509509 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, userVoteStakedLastUpdateHeightKey), currentEpochStartHeight)
510510 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
511511 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
512512 let voteActions = [IntegerEntry(userVoteStakedLastUpdateHeightKey, height), IntegerEntry(userVoteStakedIntegralKey, userVoteStakedIntegral)]
513513 (votingResultActions ++ voteActions)
514514 }
515515 actions
516516 }
517517
518518
519519 func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = {
520520 let EMPTY = "EMPTY"
521521 let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY)
522522 if ((userRecordOrEmpty == EMPTY))
523523 then $Tuple3(0, nil, "userRecord::is::empty")
524524 else {
525525 let userRecordArray = split(userRecordOrEmpty, SEP)
526526 let userNumStr = userRecordArray[IdxLockUserNum]
527527 let gwxRewardEmissionStartHeight = valueOrElse(getInteger(gwxRewardContract, keyGwxRewardEmissionStartHeight()), 0)
528528 let EMPTYSTR = "empty"
529- let $t02106521633 = if ((lpAssetIdStr != EMPTYSTR))
529+ let $t02107321641 = if ((lpAssetIdStr != EMPTYSTR))
530530 then {
531531 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
532532 let pw1 = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
533533 let pw0 = valueOrElse(getInteger(factoryContract, keyFactoryPoolWeightHistory(poolAddressStr, 0)), pw1)
534534 $Tuple2(pw0, pw1)
535535 }
536536 else if (readOnly)
537537 then $Tuple2(0, 0)
538538 else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
539- let poolWeight0 = $t02106521633._1
540- let poolWeight1 = $t02106521633._2
539+ let poolWeight0 = $t02107321641._1
540+ let poolWeight1 = $t02107321641._2
541541 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
542542 let emissionStart = iof(emissionContract, keyEmissionStartBlock())
543543 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
544544 let h = if ((height > emissionEnd))
545545 then emissionEnd
546546 else height
547547 let dh = max([(h - emissionStart), 0])
548548 let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr)
549549 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
550550 let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), ioz(this, userBoostEmissionLastIntegralKEY))
551551 let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3)
552552 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
553553 let udh = fraction(userBoostEmissionIntegral, 3, (2 * wxEmissionPerBlock))
554554 let uLastH = (h - udh)
555555 let udh0 = max([(gwxRewardEmissionStartHeight - uLastH), 0])
556556 let udh1 = ((h - uLastH) - udh0)
557557 if (if (if ((0 > uLastH))
558558 then true
559559 else (0 > udh1))
560560 then true
561561 else (abs(((udh0 + udh1) - udh)) >= 1))
562562 then throw(((((((((((("invalid udh calc: udh=" + toString(udh)) + " uLastH=") + toString(uLastH)) + " udh0=") + toString(udh0)) + " udh1=") + toString(udh1)) + " lpAssetId=") + lpAssetIdStr) + " userAddress=") + userAddressStr))
563563 else if ((0 > userBoostEmissionIntegral))
564564 then throw("wrong calculations")
565565 else {
566566 let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr)
567567 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
568568 let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY)
569569 let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY)
570570 let totalCachedGwxCorrected = getTotalCachedGwx(true)
571571 let userCurrGwx = calcCurrentGwxAmount(userAddressStr)
572572 let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr)
573573 let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY)
574574 let userBoostEmissionIntegral0 = if ((udh == 0))
575575 then 0
576576 else fraction(userBoostEmissionIntegral, udh0, udh)
577577 let userBoostEmissionIntegral1 = if ((udh == 0))
578578 then 0
579579 else fraction(userBoostEmissionIntegral, udh1, udh)
580580 let poolUserBoostEmissionIntegral0 = fraction(userBoostEmissionIntegral0, poolWeight0, POOLWEIGHTMULT)
581581 let poolUserBoostEmissionIntegral1 = fraction(userBoostEmissionIntegral1, poolWeight1, POOLWEIGHTMULT)
582582 let userBoostAvaliableToClaimTotalNew0 = if ((totalCachedGwxCorrected == 0))
583583 then 0
584584 else fraction(poolUserBoostEmissionIntegral0, userCurrGwx, totalCachedGwxCorrected)
585585 let userBoostAvaliableToClaimTotalNew1 = if ((totalCachedGwxCorrected == 0))
586586 then 0
587587 else fraction(poolUserBoostEmissionIntegral1, userCurrGwx, totalCachedGwxCorrected)
588588 let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotalNew0 + userBoostAvaliableToClaimTotalNew1)
589589 let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr)
590590 let userBoostClaimed = ioz(this, userBoostClaimedKEY)
591591 let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed)
592592 let dataState = [IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)]
593593 let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(userBoostClaimed), toString(userBoostAvailable), toString(poolWeight0), toString(poolWeight1), toString(h), toString(udh), toString(uLastH), toString(udh0), toString(udh1), toString(userCurrGwx), toString(totalCachedGwxCorrected)], ":")
594594 $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug)
595595 }
596596 }
597597 }
598598
599599
600600 func lockActions (i,duration) = {
601601 let cfgArray = readConfigArrayOrFail()
602602 let assetIdStr = cfgArray[IdxCfgAssetId]
603603 let assetId = fromBase58String(assetIdStr)
604604 let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount])
605605 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
606606 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
607607 if ((size(i.payments) != 1))
608608 then throw("invalid payment - exact one payment must be attached")
609609 else {
610610 let pmt = i.payments[0]
611611 let pmtAmount = pmt.amount
612612 if ((assetId != value(pmt.assetId)))
613613 then throw((("invalid asset is in payment - " + assetIdStr) + " is expected"))
614614 else {
615615 let nextUserNumKEY = keyNextUserNum()
616616 let userAddressStr = toString(i.caller)
617617 let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr)))
618618 let userNumStr = if (userIsExisting)
619619 then value(getString(keyUser2NumMapping(userAddressStr)))
620620 else toString(iof(this, nextUserNumKEY))
621621 let userNum = parseIntValue(userNumStr)
622622 let lockStart = height
623623 let startBlockKEY = keyLockParamStartBlock(userNumStr)
624624 let durationKEY = keyLockParamDuration(userNumStr)
625625 let userAmountKEY = keyLockParamUserAmount(userNumStr)
626626 if (if ((minLockAmount > pmtAmount))
627627 then (i.caller != lpStakingPoolsContract)
628628 else false)
629629 then throw(("amount is less then minLockAmount=" + toString(minLockAmount)))
630630 else if ((minLockDuration > duration))
631631 then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration)))
632632 else if ((duration > maxLockDuration))
633633 then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration)))
634634 else if (if (userIsExisting)
635635 then ((iof(this, startBlockKEY) + iof(this, durationKEY)) >= lockStart)
636636 else false)
637637 then throw("there is an active lock - consider to use increaseLock")
638638 else if ((ioz(this, userAmountKEY) > 0))
639639 then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY))
640640 else {
641641 let coeffX8 = fraction(duration, MULT8, maxLockDuration)
642642 let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8)
643643 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil))
644644 let k = ai(gWxParamsResultList[0])
645645 let b = ai(gWxParamsResultList[1])
646646 let period = toString(ai(gWxParamsResultList[2]))
647647 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
648648 let emissionStart = iof(emissionContract, keyEmissionStartBlock())
649649 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
650650 let h = if ((height > emissionEnd))
651651 then emissionEnd
652652 else height
653653 let dh = max([(h - emissionStart), 0])
654654 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
655655 let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3)
656656 let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr)
657657 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
658658 let userMaxBoostInt = ((gWxAmountStart * duration) / 2)
659659 let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY)
660660 let totalCachedGwxRaw = getTotalCachedGwx(false)
661661 let arr = if (userIsExisting)
662662 then nil
663663 else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)]
664664 $Tuple2(((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting)
665665 then 0
666666 else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gWxAmountStart))]), gWxAmountStart)
667667 }
668668 }
669669 }
670670 }
671671
672672
673673 @Callable(i)
674674 func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = {
675675 let checkCaller = mustManager(i)
676676 if ((checkCaller == checkCaller))
677677 then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0))
678678 else throw("Strict value is not equal to itself.")
679679 }
680680
681681
682682
683683 @Callable(i)
684684 func lockRef (duration,referrerAddress,signature) = {
685- let $t03009830163 = lockActions(i, duration)
686- let lockActionsResult = $t03009830163._1
687- let gWxAmountStart = $t03009830163._2
685+ let $t03010630171 = lockActions(i, duration)
686+ let lockActionsResult = $t03010630171._1
687+ let gWxAmountStart = $t03010630171._2
688688 let referralAddress = toString(i.caller)
689689 let refInv = if (if ((referrerAddress == ""))
690690 then true
691691 else (signature == base58''))
692692 then unit
693693 else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil)
694694 if ((refInv == refInv))
695695 then {
696696 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
697697 if ((updateRefActivity == updateRefActivity))
698698 then $Tuple2(lockActionsResult, unit)
699699 else throw("Strict value is not equal to itself.")
700700 }
701701 else throw("Strict value is not equal to itself.")
702702 }
703703
704704
705705
706706 @Callable(i)
707707 func lock (duration) = {
708- let $t03062130686 = lockActions(i, duration)
709- let lockActionsResult = $t03062130686._1
710- let gWxAmountStart = $t03062130686._2
708+ let $t03062930694 = lockActions(i, duration)
709+ let lockActionsResult = $t03062930694._1
710+ let gWxAmountStart = $t03062930694._2
711711 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
712712 if ((updateRefActivity == updateRefActivity))
713713 then $Tuple2(lockActionsResult, unit)
714714 else throw("Strict value is not equal to itself.")
715715 }
716716
717717
718718
719719 @Callable(i)
720720 func increaseLock (deltaDuration) = {
721721 let cfgArray = readConfigArrayOrFail()
722722 let assetIdStr = cfgArray[IdxCfgAssetId]
723723 let assetId = fromBase58String(assetIdStr)
724724 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
725725 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
726726 let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId)
727727 let userAddressStr = toString(i.caller)
728728 let userRecordArray = readLockParamsRecordOrFail(userAddressStr)
729729 let userNumStr = userRecordArray[IdxLockUserNum]
730730 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
731731 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
732732 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
733733 let lockEnd = (lockStart + lockDuration)
734734 let remainingDuration = max([(lockEnd - height), 0])
735735 let userAmountNew = (userAmount + pmtAmount)
736736 let lockDurationNew = (remainingDuration + deltaDuration)
737737 if ((0 > deltaDuration))
738738 then throw("duration is less then zero")
739739 else if ((minLockDuration > lockDurationNew))
740740 then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration)))
741741 else if ((lockDurationNew > maxLockDuration))
742742 then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration)))
743743 else {
744744 let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration)
745745 let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8)
746746 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
747747 if ((updateRefActivity == updateRefActivity))
748748 then {
749749 let lockStartNew = height
750750 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil))
751751 let k = ai(gWxParamsResultList[0])
752752 let b = ai(gWxParamsResultList[1])
753753 let period = toString(ai(gWxParamsResultList[2]))
754754 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
755755 let emissionStart = iof(emissionContract, keyEmissionStartBlock())
756756 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
757757 let h = if ((height > emissionEnd))
758758 then emissionEnd
759759 else height
760760 let dh = max([(h - emissionStart), 0])
761761 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
762762 let userBoostEmissionLastIntegral = ioz(this, userBoostEmissionLastIntegralKEY)
763763 let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3)
764764 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
765765 if ((0 > userBoostEmissionIntegral))
766766 then throw("wrong calculations")
767767 else {
768768 let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr)
769769 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
770770 let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY)
771771 let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY)
772772 let currUserGwx = calcCurrentGwxAmount(userAddressStr)
773773 let gwxDiff = (gWxAmountStart - currUserGwx)
774774 if ((0 > gwxDiff))
775775 then throw(("gwxDiff is less then 0: " + toString(gwxDiff)))
776776 else {
777777 let totalCachedGwxRaw = getTotalCachedGwx(false)
778778 let totalCachedGwxCorrected = getTotalCachedGwx(true)
779779 let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr)
780780 let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY)
781781 let userBoostAvaliableToClaimTotalNew = fraction(userBoostEmissionIntegral, currUserGwx, totalCachedGwxCorrected)
782782 let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2)
783783 let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2)
784784 let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt)
785785 (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStartNew, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gwxDiff))])
786786 }
787787 }
788788 }
789789 else throw("Strict value is not equal to itself.")
790790 }
791791 }
792792
793793
794794
795795 @Callable(i)
796796 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
797797 then throw("permissions denied")
798798 else {
799- let $t03566735769 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
800- let userBoostAvailable = $t03566735769._1
801- let dataState = $t03566735769._2
802- let debug = $t03566735769._3
799+ let $t03567535777 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
800+ let userBoostAvailable = $t03567535777._1
801+ let dataState = $t03567535777._2
802+ let debug = $t03567535777._3
803803 $Tuple2(dataState, [userBoostAvailable])
804804 }
805805
806806
807807
808808 @Callable(i)
809809 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
810- let $t03590136002 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
811- let userBoostAvailable = $t03590136002._1
812- let dataState = $t03590136002._2
813- let debug = $t03590136002._3
810+ let $t03590936010 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
811+ let userBoostAvailable = $t03590936010._1
812+ let dataState = $t03590936010._2
813+ let debug = $t03590936010._3
814814 $Tuple2(nil, [userBoostAvailable, debug])
815815 }
816816
817817
818818
819819 @Callable(i)
820820 func unlock (userAddress) = {
821821 let userRecordArray = readLockParamsRecordOrFail(userAddress)
822822 let userNumStr = userRecordArray[IdxLockUserNum]
823823 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
824824 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
825825 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
826826 let lockEnd = (lockStart + lockDuration)
827827 let cfgArray = readConfigArrayOrFail()
828828 let assetId = fromBase58String(cfgArray[IdxCfgAssetId])
829829 if ((lockEnd >= height))
830830 then throw((("wait " + toString(lockEnd)) + " to unlock"))
831831 else if ((0 >= userAmount))
832832 then throw("nothing to unlock")
833833 else {
834834 let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0)
835835 (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, toString(period)) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId))
836836 }
837837 }
838838
839839
840840
841841 @Callable(i)
842842 func gwxUserInfoREADONLY (userAddress) = {
843843 let gwxAmount = calcCurrentGwxAmount(userAddress)
844844 $Tuple2(nil, [gwxAmount])
845845 }
846846
847847
848848
849849 @Callable(i)
850850 func userMaxDurationREADONLY (userAddressStr) = {
851851 let cfgArray = readConfigArrayOrFail()
852852 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
853853 let userRecordOption = getString(this, keyLockParamsRecord(userAddressStr))
854854 if ((userRecordOption == unit))
855855 then $Tuple2(nil, $Tuple2("lock", maxLockDuration))
856856 else {
857857 let userRecordArray = split(value(userRecordOption), SEP)
858858 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
859859 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
860860 let lockEnd = (lockStart + lockDuration)
861861 let remainingDuration = max([(lockEnd - height), 0])
862862 let maxDeltaDuration = (maxLockDuration - remainingDuration)
863863 $Tuple2(nil, $Tuple2("increaseLock", maxDeltaDuration))
864864 }
865865 }
866866
867867
868868
869869 @Callable(i)
870870 func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = {
871871 let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight)
872872 $Tuple2(nil, gwxAmount)
873873 }
874874
875875
876876
877877 @Callable(i)
878878 func getTotalCachedGwxREADONLY () = $Tuple2(nil, getTotalCachedGwx(true))
879879
880880
881881
882882 @Callable(i)
883883 func onStakedVoteUpdate (lpAssetIdStr,userAddressStr,edge) = {
884884 let checkCaller = if ((i.caller == stakingContract))
885885 then true
886886 else mustManager(i)
887887 if ((checkCaller == checkCaller))
888888 then {
889889 let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge)
890890 $Tuple2(actions, unit)
891891 }
892892 else throw("Strict value is not equal to itself.")
893893 }
894894
895895
896896
897897 @Callable(i)
898898 func getVotingResultStakedREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStaked(lpAssetIdStr))
899899
900900
901901
902902 @Callable(i)
903903 func setManager (pendingManagerPublicKey) = {
904904 let checkCaller = mustManager(i)
905905 if ((checkCaller == checkCaller))
906906 then {
907907 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
908908 if ((checkManagerPublicKey == checkManagerPublicKey))
909909 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
910910 else throw("Strict value is not equal to itself.")
911911 }
912912 else throw("Strict value is not equal to itself.")
913913 }
914914
915915
916916
917917 @Callable(i)
918918 func confirmManager () = {
919919 let pm = pendingManagerPublicKeyOrUnit()
920920 let hasPM = if (isDefined(pm))
921921 then true
922922 else throw("No pending manager")
923923 if ((hasPM == hasPM))
924924 then {
925925 let checkPM = if ((i.callerPublicKey == value(pm)))
926926 then true
927927 else throw("You are not pending manager")
928928 if ((checkPM == checkPM))
929929 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
930930 else throw("Strict value is not equal to itself.")
931931 }
932932 else throw("Strict value is not equal to itself.")
933933 }
934934
935935
936936 @Verifier(tx)
937937 func verify () = {
938938 let targetPublicKey = match managerPublicKeyOrUnit() {
939939 case pk: ByteVector =>
940940 pk
941941 case _: Unit =>
942942 tx.senderPublicKey
943943 case _ =>
944944 throw("Match error")
945945 }
946946 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
947947 }
948948

github/deemru/w8io/026f985 
99.97 ms