tx · FNuZtVcQfU3qYjpZ1ejvjQesbHXpuyknJ5MhxAM16s7w

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.02600000 Waves

2023.01.11 17:06 [2400393] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "FNuZtVcQfU3qYjpZ1ejvjQesbHXpuyknJ5MhxAM16s7w", "fee": 2600000, "feeAssetId": null, "timestamp": 1673445988487, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "4rY46U5GdF3jkErfX6yMY8shrdZdC9CaeLLTQFZDWpcC9caM7P6mnrt5a6S8qxsCX29uiZU84Rf48KdWDwPiWHsT" ], "script": "base64:BgJLCAISAwoBCBIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBgoEARgIGBIECgIYCBIECgIICBIECgIICBIDCgEIEgQKAggIYQAGU0NBTEU4AAgABU1VTFQ4AIDC1y8AB1NDQUxFMTgAEgAGTVVMVDE4CQC2AgEAgICQu7rWrfANAANTRVACAl9fAA5QT09MV0VJR0hUTVVMVAUFTVVMVDgACnplcm9CaWdJbnQJALYCAQAAAAlvbmVCaWdJbnQJALYCAQABAQd3cmFwRXJyAQNtc2cJAAIBCQC5CQIJAMwIAgINc3Rha2luZy5yaWRlOgkAzAgCCQClCAEFBHRoaXMJAMwIAgUDbXNnBQNuaWwCASABCHRocm93RXJyAQNtc2cJAAIBCQEHd3JhcEVycgEFA21zZwEJYXNBbnlMaXN0AQN2YWwEByRtYXRjaDAFA3ZhbAMJAAECBQckbWF0Y2gwAglMaXN0W0FueV0ECnZhbEFueUx5c3QFByRtYXRjaDAFCnZhbEFueUx5c3QJAAIBAhtmYWlsIHRvIGNhc3QgaW50byBMaXN0W0FueV0BBWFzSW50AQN2YW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IkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQILTWF0Y2ggZXJyb3IJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEOb25Nb2RpZnlXZWlnaHQCDGxwQXNzZXRJZFN0cg5wb29sQWRkcmVzc1N0cgMJAQIhPQIIBQFpBmNhbGxlcgUPZmFjdG9yeUNvbnRyYWN0CQACAQIScGVybWlzc2lvbnMgZGVuaWVkBA0kdDAyOTY1MjI5NzYyCQEUcmVmcmVzaFBvb2xJTlRFR1JBTFMDBQxscEFzc2V0SWRTdHIFDnBvb2xBZGRyZXNzU3RyAAAEEnd4UGVyTHBJbnRlZ3JhbE5ldwgFDSR0MDI5NjUyMjk3NjICXzEEEXBvb2xJbnRlZ3JhbFNUQVRFCAUNJHQwMjk2NTIyOTc2MgJfMgQJcG9vbERFQlVHCAUNJHQwMjk2NTIyOTc2MgJfMwURcG9vbEludGVncmFsU1RBVEUBAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXnGtz5d", "height": 2400393, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5gDoQabBG3oRZAkDKXQq23Fz3Rq2xVWvQ7sBd1CRqrZA Next: 58LniHVX6FCStpjmcHjGv5WQttBsKwDJvHqDL4TmVuAq Diff:
OldNewDifferences
245245
246246 let boostingContract = getBoostingAddressOrFail(factoryCfg)
247247
248-let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(boostingContract, makeString(["%s", "lpStakingPoolsContract"], SEP)), wrapErr("lp_staking_pools contract address is undefined"))), wrapErr("invalid lp_staking_pools contract address"))
248+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"))
249249
250250 func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
251251
357357
358358
359359 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
360- let $t01477414896 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
361- let wxPerLpIntegralNew = $t01477414896._1
362- let poolIntegralSTATE = $t01477414896._2
363- let poolDEBUG = $t01477414896._3
360+ let $t01475814880 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
361+ let wxPerLpIntegralNew = $t01475814880._1
362+ let poolIntegralSTATE = $t01475814880._2
363+ let poolDEBUG = $t01475814880._3
364364 let MULT3 = 1000
365365 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
366366 let stakedByUser = readStaked(stakedByUserKEY)
494494 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
495495 let stakedByUser = readStaked(stakedByUserKEY)
496496 let stakedTotal = readStaked(stakedTotalKEY)
497- let $t01933219449 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
498- let wxToClaimUserNew = $t01933219449._1
499- let integralSTATE = $t01933219449._2
500- let debug = $t01933219449._3
497+ let $t01931619433 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
498+ let wxToClaimUserNew = $t01931619433._1
499+ let integralSTATE = $t01931619433._2
500+ let debug = $t01931619433._3
501501 let listName = getUsersListName(lpAssetIdStr)
502502 let listActions = if (containsNode(listName, userAddressStr))
503503 then nil
513513 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
514514 let poolAddon = valueOrElse(getString(addressFromStringValue(poolAddressStr), keyAddonAddr()), poolAddressStr)
515515 let callerStr = toString(i.caller)
516- let userAddressStr = if (if (if ((callerStr == poolAddressStr))
517- then (i.originCaller != lpStakingPoolsContract)
518- else false)
519- then true
520- else (callerStr == poolAddon))
521- then toString(i.originCaller)
522- else callerStr
523- if ((userAddressStr == userAddressStr))
516+ let test = lpStakingPoolsContract
517+ if ((test == test))
524518 then {
525- let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
526- let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
527- let stakedByUser = readStaked(stakedByUserKEY)
528- let stakedTotal = readStaked(stakedTotalKEY)
529- let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
530- let listName = getUsersListName(lpAssetIdStr)
531- let listActions = if (if (containsNode(listName, userAddressStr))
532- then (amount == stakedByUser)
519+ let userAddressStr = if (if (if ((callerStr == poolAddressStr))
520+ then (i.originCaller != lpStakingPoolsContract)
533521 else false)
534- then deleteNodeActions(listName, userAddressStr)
535- else nil
536- let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
537- let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
538- let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
539- let availableToClaim = (wxToClaimUserNew - claimedByUser)
540- let r = if ((availableToClaim > zeroBigInt))
541- then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
542- else unit
543- if ((r == r))
544- then if ((amount > stakedByUser))
545- then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
546- else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
522+ then true
523+ else (callerStr == poolAddon))
524+ then toString(i.originCaller)
525+ else callerStr
526+ if ((userAddressStr == userAddressStr))
527+ then {
528+ let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
529+ let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
530+ let stakedByUser = readStaked(stakedByUserKEY)
531+ let stakedTotal = readStaked(stakedTotalKEY)
532+ let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
533+ let listName = getUsersListName(lpAssetIdStr)
534+ let listActions = if (if (containsNode(listName, userAddressStr))
535+ then (amount == stakedByUser)
536+ else false)
537+ then deleteNodeActions(listName, userAddressStr)
538+ else nil
539+ let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
540+ let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
541+ let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
542+ let availableToClaim = (wxToClaimUserNew - claimedByUser)
543+ let r = if ((availableToClaim > zeroBigInt))
544+ then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
545+ else unit
546+ if ((r == r))
547+ then if ((amount > stakedByUser))
548+ then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
549+ else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
550+ else throw("Strict value is not equal to itself.")
551+ }
547552 else throw("Strict value is not equal to itself.")
548553 }
549554 else throw("Strict value is not equal to itself.")
575580 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
576581 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
577582 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
578- let $t02334423456 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
579- let wxToClaimUserNew = $t02334423456._1
580- let integralSTATE = $t02334423456._2
581- let debug = $t02334423456._3
583+ let $t02336723479 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
584+ let wxToClaimUserNew = $t02336723479._1
585+ let integralSTATE = $t02336723479._2
586+ let debug = $t02336723479._3
582587 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
583588 if ((zeroBigInt >= availableToClaim))
584589 then throw("nothing to claim")
657662 else (height - emissionStartBlock)
658663 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
659664 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
660- let $t02700927121 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
661- let wxToClaimUserNew = $t02700927121._1
662- let integralSTATE = $t02700927121._2
663- let debug = $t02700927121._3
665+ let $t02703227144 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
666+ let wxToClaimUserNew = $t02703227144._1
667+ let integralSTATE = $t02703227144._2
668+ let debug = $t02703227144._3
664669 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
665670 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
666671 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
735740 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
736741 then throw("permissions denied")
737742 else {
738- let $t02962929739 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
739- let wxPerLpIntegralNew = $t02962929739._1
740- let poolIntegralSTATE = $t02962929739._2
741- let poolDEBUG = $t02962929739._3
743+ let $t02965229762 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
744+ let wxPerLpIntegralNew = $t02965229762._1
745+ let poolIntegralSTATE = $t02965229762._2
746+ let poolDEBUG = $t02965229762._3
742747 poolIntegralSTATE
743748 }
744749
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
77
88 let SCALE18 = 18
99
1010 let MULT18 = toBigInt(1000000000000000000)
1111
1212 let SEP = "__"
1313
1414 let POOLWEIGHTMULT = MULT8
1515
1616 let zeroBigInt = toBigInt(0)
1717
1818 let oneBigInt = toBigInt(1)
1919
2020 func wrapErr (msg) = throw(makeString(["staking.ride:", toString(this), msg], " "))
2121
2222
2323 func throwErr (msg) = throw(wrapErr(msg))
2424
2525
2626 func asAnyList (val) = match val {
2727 case valAnyLyst: List[Any] =>
2828 valAnyLyst
2929 case _ =>
3030 throw("fail to cast into List[Any]")
3131 }
3232
3333
3434 func asInt (val) = match val {
3535 case valInt: Int =>
3636 valInt
3737 case _ =>
3838 throw("fail to cast into Int")
3939 }
4040
4141
4242 func asString (val) = match val {
4343 case valStr: String =>
4444 valStr
4545 case _ =>
4646 throw("fail to cast into Int")
4747 }
4848
4949
5050 func asByteVector (val) = match val {
5151 case valBin: ByteVector =>
5252 valBin
5353 case _ =>
5454 throw("fail to cast into Int")
5555 }
5656
5757
5858 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
5959
6060
6161 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
6262
6363
6464 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
6565
6666
6767 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
6868
6969
7070 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
7171
7272
7373 func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0")))
7474
7575
7676 func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) {
7777 case s: String =>
7878 value(parseBigInt(s))
7979 case _: Unit =>
8080 defaultVal
8181 case _ =>
8282 throw("Match error")
8383 }
8484
8585
8686 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
8787
8888
8989 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
9090
9191
9292 func keyFactoryAddress () = "%s%s__config__factoryAddress"
9393
9494
9595 func keyVotingEmissionContract () = "%s__votingEmissionContract"
9696
9797
9898 let IdxFactoryCfgStakingDapp = 1
9999
100100 let IdxFactoryCfgBoostingDapp = 2
101101
102102 let IdxFactoryCfgIdoDapp = 3
103103
104104 let IdxFactoryCfgTeamDapp = 4
105105
106106 let IdxFactoryCfgEmissionDapp = 5
107107
108108 let IdxFactoryCfgRestDapp = 6
109109
110110 let IdxFactoryCfgSlippageDapp = 7
111111
112112 func keyFactoryCfg () = "%s__factoryConfig"
113113
114114
115115 func keyManagerPublicKey () = "%s__managerPublicKey"
116116
117117
118118 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
119119
120120
121121 func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr"
122122
123123
124124 func keyAddonAddr () = "%s__addonAddr"
125125
126126
127127 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
128128
129129
130130 func keyFactoryLpList () = "%s__lpTokensList"
131131
132132
133133 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
134134
135135
136136 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
137137
138138
139139 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
140140
141141
142142 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
143143
144144
145145 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
146146
147147
148148 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
149149
150150
151151 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
152152
153153
154154 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
155155
156156
157157 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
158158
159159
160160 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
161161
162162
163163 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
164164
165165
166166 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
167167
168168
169169 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
170170
171171
172172 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
173173
174174
175175 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
176176
177177
178178 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
179179
180180
181181 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
182182
183183
184184 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP)
185185
186186
187187 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
188188
189189
190190 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
191191
192192
193193 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
194194
195195
196196 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
197197
198198
199199 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
200200
201201
202202 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
203203
204204
205205 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
206206
207207
208208 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
209209
210210
211211 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
212212
213213
214214 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
215215
216216
217217 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
218218
219219
220220 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
221221
222222
223223 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
224224
225225
226226 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
227227
228228
229229 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
230230
231231
232232 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
233233
234234
235235 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
236236
237237
238238 let factoryAddress = getStringOrFail(this, keyFactoryAddress())
239239
240240 let factoryContract = addressFromStringValue(factoryAddress)
241241
242242 let factoryCfg = readFactoryCfgOrFail(factoryContract)
243243
244244 let emissionContract = getEmissionAddressOrFail(factoryCfg)
245245
246246 let boostingContract = getBoostingAddressOrFail(factoryCfg)
247247
248-let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(boostingContract, makeString(["%s", "lpStakingPoolsContract"], SEP)), wrapErr("lp_staking_pools contract address is undefined"))), wrapErr("invalid lp_staking_pools contract address"))
248+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"))
249249
250250 func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
251251
252252
253253 func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
254254
255255
256256 func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
257257
258258
259259 func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
260260
261261
262262 func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
263263
264264
265265 func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
266266
267267
268268 func containsNode (listName,id) = {
269269 let headOrUnit = getString(this, keyListHead(listName))
270270 let prevOrUnit = getString(this, keyListPrev(listName, id))
271271 let nextOrUnit = getString(this, keyListNext(listName, id))
272272 if (if ((id == valueOrElse(headOrUnit, "")))
273273 then true
274274 else (prevOrUnit != unit))
275275 then true
276276 else (nextOrUnit != unit)
277277 }
278278
279279
280280 func insertNodeActions (listName,id) = {
281281 let headOrUnit = getString(this, keyListHead(listName))
282282 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
283283 let checkNode = if (!(containsNode(listName, id)))
284284 then true
285285 else throw("Node exists")
286286 if ((checkNode == checkNode))
287287 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
288288 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
289289 else nil)) ++ [StringEntry(keyListHead(listName), id)])
290290 else throw("Strict value is not equal to itself.")
291291 }
292292
293293
294294 func deleteNodeActions (listName,id) = {
295295 let headOrUnit = getString(this, keyListHead(listName))
296296 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
297297 let prevOrUnit = getString(this, keyListPrev(listName, id))
298298 let nextOrUnit = getString(this, keyListNext(listName, id))
299299 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
300300 then (nextOrUnit != unit)
301301 else false)
302302 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
303303 else if ((nextOrUnit != unit))
304304 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
305305 else if ((prevOrUnit != unit))
306306 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
307307 else if ((id == valueOrElse(headOrUnit, "")))
308308 then [DeleteEntry(keyListHead(listName))]
309309 else throw(((("invalid node: " + listName) + ".") + id))))
310310 }
311311
312312
313313 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
314314 then (stakedByUser > zeroBigInt)
315315 else false)
316316 then zeroBigInt
317317 else if ((stakedByUser == zeroBigInt))
318318 then wxPerLpIntegralNew
319319 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
320320 then (stakedByUser > zeroBigInt)
321321 else false)
322322 then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
323323 else throw("calcWxPerLpIntegralUserLast: unexpected state")
324324
325325
326326 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
327327 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
328328 let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
329329 let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
330330 then oneBigInt
331331 else stakedTotal
332332 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
333333 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
334334 let MULT3 = 1000
335335 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
336336 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
337337 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
338338 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
339339 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
340340 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
341341 let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY)
342342 let wxPerLpOrZeroX3 = 0
343343 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
344344 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
345345 then toBigInt(wxPerLpOrZeroX3)
346346 else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
347347 let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
348348 let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
349349 then oneBigInt
350350 else stakedTotalNew
351351 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh)))
352352 let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
353353 let wxPerLpIntegralLastUpdHeightNew = height
354354 let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
355355 $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
356356 }
357357
358358
359359 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
360- let $t01477414896 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
361- let wxPerLpIntegralNew = $t01477414896._1
362- let poolIntegralSTATE = $t01477414896._2
363- let poolDEBUG = $t01477414896._3
360+ let $t01475814880 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
361+ let wxPerLpIntegralNew = $t01475814880._1
362+ let poolIntegralSTATE = $t01475814880._2
363+ let poolDEBUG = $t01475814880._3
364364 let MULT3 = 1000
365365 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
366366 let stakedByUser = readStaked(stakedByUserKEY)
367367 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
368368 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
369369 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
370370 let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY)
371371 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
372372 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
373373 let MULT11 = (MULT8 * MULT3)
374374 let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt])
375375 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
376376 let wxPerLpIntegralUserLastUpdHeightNew = height
377377 let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
378378 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
379379 }
380380
381381
382382 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
383383 case s: String =>
384384 fromBase58String(s)
385385 case _: Unit =>
386386 unit
387387 case _ =>
388388 throw("Match error")
389389 }
390390
391391
392392 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
393393 case s: String =>
394394 fromBase58String(s)
395395 case _: Unit =>
396396 unit
397397 case _ =>
398398 throw("Match error")
399399 }
400400
401401
402402 let permissionDeniedError = throw("Permission denied")
403403
404404 func mustThis (i) = if ((i.caller == this))
405405 then true
406406 else permissionDeniedError
407407
408408
409409 func mustManager (i) = match managerPublicKeyOrUnit() {
410410 case pk: ByteVector =>
411411 if ((i.callerPublicKey == pk))
412412 then true
413413 else permissionDeniedError
414414 case _: Unit =>
415415 if ((i.caller == this))
416416 then true
417417 else permissionDeniedError
418418 case _ =>
419419 throw("Match error")
420420 }
421421
422422
423423 @Callable(i)
424424 func constructor (factoryAddressStr) = {
425425 let checkCaller = mustManager(i)
426426 if ((checkCaller == checkCaller))
427427 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
428428 else throw("Strict value is not equal to itself.")
429429 }
430430
431431
432432
433433 @Callable(i)
434434 func constructorV2 (votingEmissionContract) = {
435435 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
436436 then true
437437 else "invalid voting emission contract address"]
438438 if ((cheks == cheks))
439439 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)]
440440 else throw("Strict value is not equal to itself.")
441441 }
442442
443443
444444
445445 @Callable(i)
446446 func setManager (pendingManagerPublicKey) = {
447447 let checkCaller = mustManager(i)
448448 if ((checkCaller == checkCaller))
449449 then {
450450 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
451451 if ((checkManagerPublicKey == checkManagerPublicKey))
452452 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
453453 else throw("Strict value is not equal to itself.")
454454 }
455455 else throw("Strict value is not equal to itself.")
456456 }
457457
458458
459459
460460 @Callable(i)
461461 func confirmManager () = {
462462 let pm = pendingManagerPublicKeyOrUnit()
463463 let hasPM = if (isDefined(pm))
464464 then true
465465 else throw("No pending manager")
466466 if ((hasPM == hasPM))
467467 then {
468468 let checkPM = if ((i.callerPublicKey == value(pm)))
469469 then true
470470 else throw("You are not pending manager")
471471 if ((checkPM == checkPM))
472472 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
473473 else throw("Strict value is not equal to itself.")
474474 }
475475 else throw("Strict value is not equal to itself.")
476476 }
477477
478478
479479
480480 @Callable(i)
481481 func stake () = if ((size(i.payments) != 1))
482482 then throw("invalid payment - exact one payment must be attached")
483483 else {
484484 let pmt = i.payments[0]
485485 let lpAssetId = value(pmt.assetId)
486486 let lpAssetIdStr = toBase58String(lpAssetId)
487487 let amount = pmt.amount
488488 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
489489 let callerStr = toString(i.caller)
490490 let userAddressStr = if ((callerStr == poolAddressStr))
491491 then toString(i.originCaller)
492492 else callerStr
493493 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
494494 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
495495 let stakedByUser = readStaked(stakedByUserKEY)
496496 let stakedTotal = readStaked(stakedTotalKEY)
497- let $t01933219449 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
498- let wxToClaimUserNew = $t01933219449._1
499- let integralSTATE = $t01933219449._2
500- let debug = $t01933219449._3
497+ let $t01931619433 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
498+ let wxToClaimUserNew = $t01931619433._1
499+ let integralSTATE = $t01931619433._2
500+ let debug = $t01931619433._3
501501 let listName = getUsersListName(lpAssetIdStr)
502502 let listActions = if (containsNode(listName, userAddressStr))
503503 then nil
504504 else insertNodeActions(listName, userAddressStr)
505505 (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
506506 }
507507
508508
509509
510510 @Callable(i)
511511 func unstake (lpAssetIdStr,amount) = {
512512 let lpAssetId = fromBase58String(lpAssetIdStr)
513513 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
514514 let poolAddon = valueOrElse(getString(addressFromStringValue(poolAddressStr), keyAddonAddr()), poolAddressStr)
515515 let callerStr = toString(i.caller)
516- let userAddressStr = if (if (if ((callerStr == poolAddressStr))
517- then (i.originCaller != lpStakingPoolsContract)
518- else false)
519- then true
520- else (callerStr == poolAddon))
521- then toString(i.originCaller)
522- else callerStr
523- if ((userAddressStr == userAddressStr))
516+ let test = lpStakingPoolsContract
517+ if ((test == test))
524518 then {
525- let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
526- let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
527- let stakedByUser = readStaked(stakedByUserKEY)
528- let stakedTotal = readStaked(stakedTotalKEY)
529- let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
530- let listName = getUsersListName(lpAssetIdStr)
531- let listActions = if (if (containsNode(listName, userAddressStr))
532- then (amount == stakedByUser)
519+ let userAddressStr = if (if (if ((callerStr == poolAddressStr))
520+ then (i.originCaller != lpStakingPoolsContract)
533521 else false)
534- then deleteNodeActions(listName, userAddressStr)
535- else nil
536- let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
537- let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
538- let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
539- let availableToClaim = (wxToClaimUserNew - claimedByUser)
540- let r = if ((availableToClaim > zeroBigInt))
541- then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
542- else unit
543- if ((r == r))
544- then if ((amount > stakedByUser))
545- then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
546- else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
522+ then true
523+ else (callerStr == poolAddon))
524+ then toString(i.originCaller)
525+ else callerStr
526+ if ((userAddressStr == userAddressStr))
527+ then {
528+ let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
529+ let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
530+ let stakedByUser = readStaked(stakedByUserKEY)
531+ let stakedTotal = readStaked(stakedTotalKEY)
532+ let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
533+ let listName = getUsersListName(lpAssetIdStr)
534+ let listActions = if (if (containsNode(listName, userAddressStr))
535+ then (amount == stakedByUser)
536+ else false)
537+ then deleteNodeActions(listName, userAddressStr)
538+ else nil
539+ let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
540+ let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
541+ let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
542+ let availableToClaim = (wxToClaimUserNew - claimedByUser)
543+ let r = if ((availableToClaim > zeroBigInt))
544+ then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
545+ else unit
546+ if ((r == r))
547+ then if ((amount > stakedByUser))
548+ then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
549+ else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
550+ else throw("Strict value is not equal to itself.")
551+ }
547552 else throw("Strict value is not equal to itself.")
548553 }
549554 else throw("Strict value is not equal to itself.")
550555 }
551556
552557
553558
554559 @Callable(i)
555560 func claimWx (lpAssetIdStr) = {
556561 let userAddressStr = toString(i.caller)
557562 let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
558563 $Tuple2(nil, result)
559564 }
560565
561566
562567
563568 @Callable(i)
564569 func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = {
565570 let checkCaller = mustThis(i)
566571 if ((checkCaller == checkCaller))
567572 then {
568573 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address")
569574 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
570575 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
571576 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
572577 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
573578 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
574579 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
575580 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
576581 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
577582 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
578- let $t02334423456 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
579- let wxToClaimUserNew = $t02334423456._1
580- let integralSTATE = $t02334423456._2
581- let debug = $t02334423456._3
583+ let $t02336723479 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
584+ let wxToClaimUserNew = $t02336723479._1
585+ let integralSTATE = $t02336723479._2
586+ let debug = $t02336723479._3
582587 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
583588 if ((zeroBigInt >= availableToClaim))
584589 then throw("nothing to claim")
585590 else {
586591 let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0])
587592 let minRewardPart = availableToClaim
588593 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
589594 let totalReward = (minRewardPart + boostRewardPart)
590595 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
591596 let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
592597 if ((emitBoost == emitBoost))
593598 then {
594599 let claimedByUserValue = (claimedByUser + availableToClaim)
595600 let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
596601 let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
597602 let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
598603 $Tuple2([StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)], toInt(totalReward))
599604 }
600605 else throw("Strict value is not equal to itself.")
601606 }
602607 }
603608 else throw("Strict value is not equal to itself.")
604609 }
605610
606611
607612
608613 @Callable(i)
609614 func claimWxBulkInternalREADONLY (currentIter,lpAssetIds,userAddressStr,resAcc) = if ((currentIter == size(lpAssetIds)))
610615 then $Tuple2(nil, resAcc)
611616 else {
612617 let lpAssetId = lpAssetIds[currentIter]
613618 let info = split({
614619 let @ = invoke(this, "claimWxREADONLY", [lpAssetId, userAddressStr], nil)
615620 if ($isInstanceOf(@, "String"))
616621 then @
617622 else throw(($getType(@) + " couldn't be cast to String"))
618623 }, SEP)
619624 let unclaimed = info[3]
620625 let claimed = info[4]
621626 let res = (resAcc :+ makeString(["%d%d", unclaimed, claimed], SEP))
622627 let inv = {
623628 let @ = invoke(this, "claimWxBulkInternalREADONLY", [(currentIter + 1), lpAssetIds, userAddressStr, res], nil)
624629 if ($isInstanceOf(@, "List[Any]"))
625630 then @
626631 else throw(($getType(@) + " couldn't be cast to List[Any]"))
627632 }
628633 if ((inv == inv))
629634 then $Tuple2(nil, inv)
630635 else throw("Strict value is not equal to itself.")
631636 }
632637
633638
634639
635640 @Callable(i)
636641 func claimWxBulkREADONLY (lpAssetIds,userAddressStr) = {
637642 let res = invoke(this, "claimWxBulkInternalREADONLY", [0, lpAssetIds, userAddressStr, nil], nil)
638643 $Tuple2(nil, res)
639644 }
640645
641646
642647
643648 @Callable(i)
644649 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
645650 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
646651 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
647652 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
648653 let stakedByUser = readStaked(stakedByUserKEY)
649654 let stakedTotal = readStaked(stakedTotalKEY)
650655 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
651656 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
652657 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
653658 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
654659 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
655660 let passedBlocks = if ((emissionStartBlock > height))
656661 then 0
657662 else (height - emissionStartBlock)
658663 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
659664 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
660- let $t02700927121 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
661- let wxToClaimUserNew = $t02700927121._1
662- let integralSTATE = $t02700927121._2
663- let debug = $t02700927121._3
665+ let $t02703227144 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
666+ let wxToClaimUserNew = $t02703227144._1
667+ let integralSTATE = $t02703227144._2
668+ let debug = $t02703227144._3
664669 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
665670 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
666671 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
667672 let boostDebug = asString(boostInvResult[1])
668673 let minRewardPart = availableToClaim
669674 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
670675 let totalReward = (minRewardPart + boostRewardPart)
671676 $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), "soon"], SEP))
672677 }
673678
674679
675680
676681 @Callable(i)
677682 func stakedByUserREADONLY (lpAssetIdStr,userAddressStr) = {
678683 let stakedByUser = valueOrElse(getInteger(keyStakedByUser(userAddressStr, lpAssetIdStr)), 0)
679684 $Tuple2(nil, stakedByUser)
680685 }
681686
682687
683688
684689 @Callable(i)
685690 func usersListTraversal (lpAssetId) = {
686691 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
687692 then true
688693 else mustManager(i)
689694 if ((checkCaller == checkCaller))
690695 then {
691696 let listName = getUsersListName(lpAssetId)
692697 let userOrUnit = getString(keyNextUser(lpAssetId))
693698 let headOrUnit = getString(keyListHead(listName))
694699 match userOrUnit {
695700 case _: Unit =>
696701 match headOrUnit {
697702 case _: Unit =>
698703 $Tuple2(nil, false)
699704 case head: String =>
700705 $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true)
701706 case _ =>
702707 throw("Match error")
703708 }
704709 case userAddress: String =>
705710 let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress))
706711 let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
707712 let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1
708713 let availableToClaim = (wxToClaimUserNew - claimedByUser)
709714 let r = if ((availableToClaim > zeroBigInt))
710715 then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil)
711716 else unit
712717 if ((r == r))
713718 then {
714719 let nextUserOrUnit = getString(keyListNext(listName, userAddress))
715720 match nextUserOrUnit {
716721 case _: Unit =>
717722 $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false)
718723 case nextUser: String =>
719724 $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true)
720725 case _ =>
721726 throw("Match error")
722727 }
723728 }
724729 else throw("Strict value is not equal to itself.")
725730 case _ =>
726731 throw("Match error")
727732 }
728733 }
729734 else throw("Strict value is not equal to itself.")
730735 }
731736
732737
733738
734739 @Callable(i)
735740 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
736741 then throw("permissions denied")
737742 else {
738- let $t02962929739 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
739- let wxPerLpIntegralNew = $t02962929739._1
740- let poolIntegralSTATE = $t02962929739._2
741- let poolDEBUG = $t02962929739._3
743+ let $t02965229762 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
744+ let wxPerLpIntegralNew = $t02965229762._1
745+ let poolIntegralSTATE = $t02965229762._2
746+ let poolDEBUG = $t02965229762._3
742747 poolIntegralSTATE
743748 }
744749
745750
746751 @Verifier(tx)
747752 func verify () = {
748753 let targetPublicKey = match managerPublicKeyOrUnit() {
749754 case pk: ByteVector =>
750755 pk
751756 case _: Unit =>
752757 tx.senderPublicKey
753758 case _ =>
754759 throw("Match error")
755760 }
756761 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
757762 }
758763

github/deemru/w8io/fabc49c 
96.84 ms