tx · 8dMp5q27sxPWtZj45NVoi6oMM7AyYhFGxFUjV6Z5NrPU

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.02200000 Waves

2023.02.15 13:43 [2450617] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "8dMp5q27sxPWtZj45NVoi6oMM7AyYhFGxFUjV6Z5NrPU", "fee": 2200000, "feeAssetId": null, "timestamp": 1676457806525, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "3hijPbyN4LGNjvTxkFE7KaZ9C14Ra2BNUAU7Lvo8Ah9bPBH3p1TAjBj5hmLouw9vyq8kyab6hqDqbo4vy8vhtGD" ], "script": "base64:BgKBHwgCEgMKAQgSAwoBCBIDCgEIEgASABIECgIIARIDCgEIEgQKAggIEgYKBAEYCBgSBAoCGAgSBAoCCAgSAwoBCBIECgIICCIGU0NBTEU4IgVNVUxUMyIFTVVMVDgiB1NDQUxFMTgiBk1VTFQxOCIDU0VQIg5QT09MV0VJR0hUTVVMVCIKemVyb0JpZ0ludCIJb25lQmlnSW50Iglhc0FueUxpc3QiA3ZhbCIHJG1hdGNoMCIKdmFsQW55THlzdCIFYXNJbnQiBnZhbEludCIIYXNTdHJpbmciBnZhbFN0ciIMYXNCeXRlVmVjdG9yIgZ2YWxCaW4iD2dldFN0cmluZ09yRmFpbCIHYWRkcmVzcyIDa2V5IhhnZXRTdHJpbmdCeUFkZHJlc3NPckZhaWwiDGdldEludE9yWmVybyIPZ2V0SW50T3JEZWZhdWx0IgpkZWZhdWx0VmFsIgxnZXRJbnRPckZhaWwiGWdldEJpZ0ludEZyb21TdHJpbmdPclplcm8iHGdldEJpZ0ludEZyb21TdHJpbmdPckRlZmF1bHQiAXMiBXRvWDE4IgdvcmlnVmF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Y2wFAWwFAmNsAwkAAQIFAWwCBFVuaXQIBQJkdA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZHQJYm9keUJ5dGVzCQCRAwIIBQJkdAZwcm9vZnMAAAUCZHZU5e/X", "height": 2450617, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 84N7Zw4RFchFyQEXxV4ri1cWmeA172EEprbaREY9Gt2c Next: 9oVUyT3cLf31dHCmNJ6o5GdSfopCswi7KGYxK7DUdxKb Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
5+
6+let MULT3 = 1000
57
68 let MULT8 = 100000000
79
239241
240242 let boostingContract = getBoostingAddressOrFail(factoryCfg)
241243
244+let boostCoeff = {
245+ let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
246+ if ($isInstanceOf(@, "Int"))
247+ then @
248+ else throw(($getType(@) + " couldn't be cast to Int"))
249+ }
250+
242251 func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
243252
244253
323332 else stakedTotal
324333 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
325334 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
326- let MULT3 = 1000
327335 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
328- let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
336+ let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * boostCoeff))
329337 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
330338 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
331339 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
349357
350358
351359 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
352- let $t01427414396 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
353- let wxPerLpIntegralNew = $t01427414396._1
354- let poolIntegralSTATE = $t01427414396._2
355- let poolDEBUG = $t01427414396._3
356- let MULT3 = 1000
360+ let $t01428614408 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
361+ let wxPerLpIntegralNew = $t01428614408._1
362+ let poolIntegralSTATE = $t01428614408._2
363+ let poolDEBUG = $t01428614408._3
357364 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
358365 let stakedByUser = readStaked(stakedByUserKEY)
359366 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
486493 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
487494 let stakedByUser = readStaked(stakedByUserKEY)
488495 let stakedTotal = readStaked(stakedTotalKEY)
489- let $t01883218949 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
490- let wxToClaimUserNew = $t01883218949._1
491- let integralSTATE = $t01883218949._2
492- let debug = $t01883218949._3
496+ let $t01882518942 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
497+ let wxToClaimUserNew = $t01882518942._1
498+ let integralSTATE = $t01882518942._2
499+ let debug = $t01882518942._3
493500 let listName = getUsersListName(lpAssetIdStr)
494501 let listActions = if (containsNode(listName, userAddressStr))
495502 then nil
561568 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
562569 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
563570 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
564- let $t02281422926 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
565- let wxToClaimUserNew = $t02281422926._1
566- let integralSTATE = $t02281422926._2
567- let debug = $t02281422926._3
571+ let $t02280722919 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
572+ let wxToClaimUserNew = $t02280722919._1
573+ let integralSTATE = $t02280722919._2
574+ let debug = $t02280722919._3
568575 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
569576 if ((zeroBigInt >= availableToClaim))
570577 then throw("nothing to claim")
571578 else {
572579 let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0])
573580 let minRewardPart = availableToClaim
574- let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
581+ let boostRewardPart = min([(minRewardPart * toBigInt((boostCoeff - 1))), toBigInt(wxAmountBoostTotal)])
575582 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
576583 let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
577584 if ((emitBoost == emitBoost))
644651 else (height - emissionStartBlock)
645652 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
646653 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
647- let $t02658426696 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
648- let wxToClaimUserNew = $t02658426696._1
649- let integralSTATE = $t02658426696._2
650- let debug = $t02658426696._3
654+ let $t02659226704 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
655+ let wxToClaimUserNew = $t02659226704._1
656+ let integralSTATE = $t02659226704._2
657+ let debug = $t02659226704._3
651658 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
652659 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
653660 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
654661 let boostDebug = asString(boostInvResult[1])
655662 let minRewardPart = availableToClaim
656- let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
663+ let boostRewardPart = min([(minRewardPart * toBigInt((boostCoeff - 1))), toBigInt(wxAmountBoostTotal)])
657664 let totalReward = (minRewardPart + boostRewardPart)
658665 $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), "soon"], SEP))
659666 }
714721 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
715722 then throw("permissions denied")
716723 else {
717- let $t02903229142 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
718- let wxPerLpIntegralNew = $t02903229142._1
719- let poolIntegralSTATE = $t02903229142._2
720- let poolDEBUG = $t02903229142._3
724+ let $t02905529165 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
725+ let wxPerLpIntegralNew = $t02905529165._1
726+ let poolIntegralSTATE = $t02905529165._2
727+ let poolDEBUG = $t02905529165._3
721728 poolIntegralSTATE
722729 }
723730
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
5+
6+let MULT3 = 1000
57
68 let MULT8 = 100000000
79
810 let SCALE18 = 18
911
1012 let MULT18 = toBigInt(1000000000000000000)
1113
1214 let SEP = "__"
1315
1416 let POOLWEIGHTMULT = MULT8
1517
1618 let zeroBigInt = toBigInt(0)
1719
1820 let oneBigInt = toBigInt(1)
1921
2022 func asAnyList (val) = match val {
2123 case valAnyLyst: List[Any] =>
2224 valAnyLyst
2325 case _ =>
2426 throw("fail to cast into List[Any]")
2527 }
2628
2729
2830 func asInt (val) = match val {
2931 case valInt: Int =>
3032 valInt
3133 case _ =>
3234 throw("fail to cast into Int")
3335 }
3436
3537
3638 func asString (val) = match val {
3739 case valStr: String =>
3840 valStr
3941 case _ =>
4042 throw("fail to cast into Int")
4143 }
4244
4345
4446 func asByteVector (val) = match val {
4547 case valBin: ByteVector =>
4648 valBin
4749 case _ =>
4850 throw("fail to cast into Int")
4951 }
5052
5153
5254 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
5355
5456
5557 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
5658
5759
5860 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
5961
6062
6163 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
6264
6365
6466 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
6567
6668
6769 func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0")))
6870
6971
7072 func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) {
7173 case s: String =>
7274 value(parseBigInt(s))
7375 case _: Unit =>
7476 defaultVal
7577 case _ =>
7678 throw("Match error")
7779 }
7880
7981
8082 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
8183
8284
8385 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
8486
8587
8688 func keyFactoryAddress () = "%s%s__config__factoryAddress"
8789
8890
8991 func keyVotingEmissionContract () = "%s__votingEmissionContract"
9092
9193
9294 let IdxFactoryCfgStakingDapp = 1
9395
9496 let IdxFactoryCfgBoostingDapp = 2
9597
9698 let IdxFactoryCfgIdoDapp = 3
9799
98100 let IdxFactoryCfgTeamDapp = 4
99101
100102 let IdxFactoryCfgEmissionDapp = 5
101103
102104 let IdxFactoryCfgRestDapp = 6
103105
104106 let IdxFactoryCfgSlippageDapp = 7
105107
106108 func keyFactoryCfg () = "%s__factoryConfig"
107109
108110
109111 func keyManagerPublicKey () = "%s__managerPublicKey"
110112
111113
112114 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
113115
114116
115117 func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr"
116118
117119
118120 func keyAddonAddr () = "%s__addonAddr"
119121
120122
121123 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
122124
123125
124126 func keyFactoryLpList () = "%s__lpTokensList"
125127
126128
127129 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
128130
129131
130132 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
131133
132134
133135 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
134136
135137
136138 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
137139
138140
139141 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
140142
141143
142144 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
143145
144146
145147 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
146148
147149
148150 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
149151
150152
151153 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
152154
153155
154156 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
155157
156158
157159 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
158160
159161
160162 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
161163
162164
163165 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
164166
165167
166168 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
167169
168170
169171 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
170172
171173
172174 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
173175
174176
175177 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
176178
177179
178180 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP)
179181
180182
181183 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
182184
183185
184186 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
185187
186188
187189 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
188190
189191
190192 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
191193
192194
193195 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
194196
195197
196198 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
197199
198200
199201 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
200202
201203
202204 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
203205
204206
205207 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
206208
207209
208210 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
209211
210212
211213 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
212214
213215
214216 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
215217
216218
217219 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
218220
219221
220222 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
221223
222224
223225 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
224226
225227
226228 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
227229
228230
229231 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
230232
231233
232234 let factoryAddress = getStringOrFail(this, keyFactoryAddress())
233235
234236 let factoryContract = addressFromStringValue(factoryAddress)
235237
236238 let factoryCfg = readFactoryCfgOrFail(factoryContract)
237239
238240 let emissionContract = getEmissionAddressOrFail(factoryCfg)
239241
240242 let boostingContract = getBoostingAddressOrFail(factoryCfg)
241243
244+let boostCoeff = {
245+ let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
246+ if ($isInstanceOf(@, "Int"))
247+ then @
248+ else throw(($getType(@) + " couldn't be cast to Int"))
249+ }
250+
242251 func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
243252
244253
245254 func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
246255
247256
248257 func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
249258
250259
251260 func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
252261
253262
254263 func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
255264
256265
257266 func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
258267
259268
260269 func containsNode (listName,id) = {
261270 let headOrUnit = getString(this, keyListHead(listName))
262271 let prevOrUnit = getString(this, keyListPrev(listName, id))
263272 let nextOrUnit = getString(this, keyListNext(listName, id))
264273 if (if ((id == valueOrElse(headOrUnit, "")))
265274 then true
266275 else (prevOrUnit != unit))
267276 then true
268277 else (nextOrUnit != unit)
269278 }
270279
271280
272281 func insertNodeActions (listName,id) = {
273282 let headOrUnit = getString(this, keyListHead(listName))
274283 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
275284 let checkNode = if (!(containsNode(listName, id)))
276285 then true
277286 else throw("Node exists")
278287 if ((checkNode == checkNode))
279288 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
280289 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
281290 else nil)) ++ [StringEntry(keyListHead(listName), id)])
282291 else throw("Strict value is not equal to itself.")
283292 }
284293
285294
286295 func deleteNodeActions (listName,id) = {
287296 let headOrUnit = getString(this, keyListHead(listName))
288297 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
289298 let prevOrUnit = getString(this, keyListPrev(listName, id))
290299 let nextOrUnit = getString(this, keyListNext(listName, id))
291300 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
292301 then (nextOrUnit != unit)
293302 else false)
294303 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
295304 else if ((nextOrUnit != unit))
296305 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
297306 else if ((prevOrUnit != unit))
298307 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
299308 else if ((id == valueOrElse(headOrUnit, "")))
300309 then [DeleteEntry(keyListHead(listName))]
301310 else throw(((("invalid node: " + listName) + ".") + id))))
302311 }
303312
304313
305314 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
306315 then (stakedByUser > zeroBigInt)
307316 else false)
308317 then zeroBigInt
309318 else if ((stakedByUser == zeroBigInt))
310319 then wxPerLpIntegralNew
311320 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
312321 then (stakedByUser > zeroBigInt)
313322 else false)
314323 then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
315324 else throw("calcWxPerLpIntegralUserLast: unexpected state")
316325
317326
318327 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
319328 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
320329 let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
321330 let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
322331 then oneBigInt
323332 else stakedTotal
324333 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
325334 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
326- let MULT3 = 1000
327335 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
328- let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
336+ let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * boostCoeff))
329337 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
330338 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
331339 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
332340 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
333341 let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY)
334342 let wxPerLpOrZeroX3 = 0
335343 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
336344 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
337345 then toBigInt(wxPerLpOrZeroX3)
338346 else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
339347 let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
340348 let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
341349 then oneBigInt
342350 else stakedTotalNew
343351 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh)))
344352 let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
345353 let wxPerLpIntegralLastUpdHeightNew = height
346354 let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
347355 $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
348356 }
349357
350358
351359 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
352- let $t01427414396 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
353- let wxPerLpIntegralNew = $t01427414396._1
354- let poolIntegralSTATE = $t01427414396._2
355- let poolDEBUG = $t01427414396._3
356- let MULT3 = 1000
360+ let $t01428614408 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
361+ let wxPerLpIntegralNew = $t01428614408._1
362+ let poolIntegralSTATE = $t01428614408._2
363+ let poolDEBUG = $t01428614408._3
357364 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
358365 let stakedByUser = readStaked(stakedByUserKEY)
359366 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
360367 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
361368 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
362369 let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY)
363370 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
364371 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
365372 let MULT11 = (MULT8 * MULT3)
366373 let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt])
367374 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
368375 let wxPerLpIntegralUserLastUpdHeightNew = height
369376 let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
370377 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
371378 }
372379
373380
374381 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
375382 case s: String =>
376383 fromBase58String(s)
377384 case _: Unit =>
378385 unit
379386 case _ =>
380387 throw("Match error")
381388 }
382389
383390
384391 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
385392 case s: String =>
386393 fromBase58String(s)
387394 case _: Unit =>
388395 unit
389396 case _ =>
390397 throw("Match error")
391398 }
392399
393400
394401 let permissionDeniedError = throw("Permission denied")
395402
396403 func mustThis (i) = if ((i.caller == this))
397404 then true
398405 else permissionDeniedError
399406
400407
401408 func mustManager (i) = match managerPublicKeyOrUnit() {
402409 case pk: ByteVector =>
403410 if ((i.callerPublicKey == pk))
404411 then true
405412 else permissionDeniedError
406413 case _: Unit =>
407414 if ((i.caller == this))
408415 then true
409416 else permissionDeniedError
410417 case _ =>
411418 throw("Match error")
412419 }
413420
414421
415422 @Callable(i)
416423 func constructor (factoryAddressStr) = {
417424 let checkCaller = mustManager(i)
418425 if ((checkCaller == checkCaller))
419426 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
420427 else throw("Strict value is not equal to itself.")
421428 }
422429
423430
424431
425432 @Callable(i)
426433 func constructorV2 (votingEmissionContract) = {
427434 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
428435 then true
429436 else "invalid voting emission contract address"]
430437 if ((cheks == cheks))
431438 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)]
432439 else throw("Strict value is not equal to itself.")
433440 }
434441
435442
436443
437444 @Callable(i)
438445 func setManager (pendingManagerPublicKey) = {
439446 let checkCaller = mustManager(i)
440447 if ((checkCaller == checkCaller))
441448 then {
442449 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
443450 if ((checkManagerPublicKey == checkManagerPublicKey))
444451 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
445452 else throw("Strict value is not equal to itself.")
446453 }
447454 else throw("Strict value is not equal to itself.")
448455 }
449456
450457
451458
452459 @Callable(i)
453460 func confirmManager () = {
454461 let pm = pendingManagerPublicKeyOrUnit()
455462 let hasPM = if (isDefined(pm))
456463 then true
457464 else throw("No pending manager")
458465 if ((hasPM == hasPM))
459466 then {
460467 let checkPM = if ((i.callerPublicKey == value(pm)))
461468 then true
462469 else throw("You are not pending manager")
463470 if ((checkPM == checkPM))
464471 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
465472 else throw("Strict value is not equal to itself.")
466473 }
467474 else throw("Strict value is not equal to itself.")
468475 }
469476
470477
471478
472479 @Callable(i)
473480 func stake () = if ((size(i.payments) != 1))
474481 then throw("invalid payment - exact one payment must be attached")
475482 else {
476483 let pmt = i.payments[0]
477484 let lpAssetId = value(pmt.assetId)
478485 let lpAssetIdStr = toBase58String(lpAssetId)
479486 let amount = pmt.amount
480487 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
481488 let callerStr = toString(i.caller)
482489 let userAddressStr = if ((callerStr == poolAddressStr))
483490 then toString(i.originCaller)
484491 else callerStr
485492 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
486493 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
487494 let stakedByUser = readStaked(stakedByUserKEY)
488495 let stakedTotal = readStaked(stakedTotalKEY)
489- let $t01883218949 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
490- let wxToClaimUserNew = $t01883218949._1
491- let integralSTATE = $t01883218949._2
492- let debug = $t01883218949._3
496+ let $t01882518942 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
497+ let wxToClaimUserNew = $t01882518942._1
498+ let integralSTATE = $t01882518942._2
499+ let debug = $t01882518942._3
493500 let listName = getUsersListName(lpAssetIdStr)
494501 let listActions = if (containsNode(listName, userAddressStr))
495502 then nil
496503 else insertNodeActions(listName, userAddressStr)
497504 (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
498505 }
499506
500507
501508
502509 @Callable(i)
503510 func unstake (lpAssetIdStr,amount) = {
504511 let lpAssetId = fromBase58String(lpAssetIdStr)
505512 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
506513 let poolAddon = valueOrElse(getString(addressFromStringValue(poolAddressStr), keyAddonAddr()), poolAddressStr)
507514 let callerStr = toString(i.caller)
508515 let userAddressStr = if (if ((callerStr == poolAddressStr))
509516 then true
510517 else (callerStr == poolAddon))
511518 then toString(i.originCaller)
512519 else callerStr
513520 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
514521 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
515522 let stakedByUser = readStaked(stakedByUserKEY)
516523 let stakedTotal = readStaked(stakedTotalKEY)
517524 let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
518525 let listName = getUsersListName(lpAssetIdStr)
519526 let listActions = if (if (containsNode(listName, userAddressStr))
520527 then (amount == stakedByUser)
521528 else false)
522529 then deleteNodeActions(listName, userAddressStr)
523530 else nil
524531 let claimedByUserMinReward = getBigIntFromStringOrZero(this, keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr))
525532 let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
526533 let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
527534 let availableToClaim = (wxToClaimUserNew - claimedByUserMinReward)
528535 let r = if ((availableToClaim > zeroBigInt))
529536 then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
530537 else unit
531538 if ((r == r))
532539 then if ((amount > stakedByUser))
533540 then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
534541 else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
535542 else throw("Strict value is not equal to itself.")
536543 }
537544
538545
539546
540547 @Callable(i)
541548 func claimWx (lpAssetIdStr) = {
542549 let userAddressStr = toString(i.caller)
543550 let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
544551 $Tuple2(nil, result)
545552 }
546553
547554
548555
549556 @Callable(i)
550557 func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = {
551558 let checkCaller = mustThis(i)
552559 if ((checkCaller == checkCaller))
553560 then {
554561 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address")
555562 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
556563 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
557564 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
558565 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
559566 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
560567 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
561568 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
562569 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
563570 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
564- let $t02281422926 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
565- let wxToClaimUserNew = $t02281422926._1
566- let integralSTATE = $t02281422926._2
567- let debug = $t02281422926._3
571+ let $t02280722919 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
572+ let wxToClaimUserNew = $t02280722919._1
573+ let integralSTATE = $t02280722919._2
574+ let debug = $t02280722919._3
568575 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
569576 if ((zeroBigInt >= availableToClaim))
570577 then throw("nothing to claim")
571578 else {
572579 let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0])
573580 let minRewardPart = availableToClaim
574- let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
581+ let boostRewardPart = min([(minRewardPart * toBigInt((boostCoeff - 1))), toBigInt(wxAmountBoostTotal)])
575582 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
576583 let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
577584 if ((emitBoost == emitBoost))
578585 then {
579586 let claimedByUserValue = ((claimedByUser + minRewardPart) + boostRewardPart)
580587 let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
581588 let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserBoostReward + boostRewardPart)
582589 let claimedTotalPlusAvailableToClaim = (claimedTotal + availableToClaim)
583590 [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)]
584591 }
585592 else throw("Strict value is not equal to itself.")
586593 }
587594 }
588595 else throw("Strict value is not equal to itself.")
589596 }
590597
591598
592599
593600 @Callable(i)
594601 func claimWxBulkInternalREADONLY (currentIter,lpAssetIds,userAddressStr,resAcc) = if ((currentIter == size(lpAssetIds)))
595602 then $Tuple2(nil, resAcc)
596603 else {
597604 let lpAssetId = lpAssetIds[currentIter]
598605 let info = split({
599606 let @ = invoke(this, "claimWxREADONLY", [lpAssetId, userAddressStr], nil)
600607 if ($isInstanceOf(@, "String"))
601608 then @
602609 else throw(($getType(@) + " couldn't be cast to String"))
603610 }, SEP)
604611 let unclaimed = info[3]
605612 let claimed = info[4]
606613 let res = (resAcc :+ makeString(["%d%d", unclaimed, claimed], SEP))
607614 let inv = {
608615 let @ = invoke(this, "claimWxBulkInternalREADONLY", [(currentIter + 1), lpAssetIds, userAddressStr, res], nil)
609616 if ($isInstanceOf(@, "List[Any]"))
610617 then @
611618 else throw(($getType(@) + " couldn't be cast to List[Any]"))
612619 }
613620 if ((inv == inv))
614621 then $Tuple2(nil, inv)
615622 else throw("Strict value is not equal to itself.")
616623 }
617624
618625
619626
620627 @Callable(i)
621628 func claimWxBulkREADONLY (lpAssetIds,userAddressStr) = {
622629 let res = invoke(this, "claimWxBulkInternalREADONLY", [0, lpAssetIds, userAddressStr, nil], nil)
623630 $Tuple2(nil, res)
624631 }
625632
626633
627634
628635 @Callable(i)
629636 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
630637 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
631638 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
632639 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
633640 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
634641 let stakedByUser = readStaked(stakedByUserKEY)
635642 let stakedTotal = readStaked(stakedTotalKEY)
636643 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
637644 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
638645 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
639646 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
640647 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
641648 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
642649 let passedBlocks = if ((emissionStartBlock > height))
643650 then 0
644651 else (height - emissionStartBlock)
645652 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
646653 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
647- let $t02658426696 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
648- let wxToClaimUserNew = $t02658426696._1
649- let integralSTATE = $t02658426696._2
650- let debug = $t02658426696._3
654+ let $t02659226704 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
655+ let wxToClaimUserNew = $t02659226704._1
656+ let integralSTATE = $t02659226704._2
657+ let debug = $t02659226704._3
651658 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
652659 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
653660 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
654661 let boostDebug = asString(boostInvResult[1])
655662 let minRewardPart = availableToClaim
656- let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
663+ let boostRewardPart = min([(minRewardPart * toBigInt((boostCoeff - 1))), toBigInt(wxAmountBoostTotal)])
657664 let totalReward = (minRewardPart + boostRewardPart)
658665 $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), "soon"], SEP))
659666 }
660667
661668
662669
663670 @Callable(i)
664671 func usersListTraversal (lpAssetId) = {
665672 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
666673 then true
667674 else mustManager(i)
668675 if ((checkCaller == checkCaller))
669676 then {
670677 let listName = getUsersListName(lpAssetId)
671678 let userOrUnit = getString(keyNextUser(lpAssetId))
672679 let headOrUnit = getString(keyListHead(listName))
673680 match userOrUnit {
674681 case _: Unit =>
675682 match headOrUnit {
676683 case _: Unit =>
677684 $Tuple2(nil, false)
678685 case head: String =>
679686 $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true)
680687 case _ =>
681688 throw("Match error")
682689 }
683690 case userAddress: String =>
684691 let claimedByUserMinReward = getBigIntFromStringOrZero(this, keyClaimedByUserMinReward(lpAssetId, userAddress))
685692 let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
686693 let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1
687694 let availableToClaim = (wxToClaimUserNew - claimedByUserMinReward)
688695 let r = if ((availableToClaim > zeroBigInt))
689696 then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil)
690697 else unit
691698 if ((r == r))
692699 then {
693700 let nextUserOrUnit = getString(keyListNext(listName, userAddress))
694701 match nextUserOrUnit {
695702 case _: Unit =>
696703 $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false)
697704 case nextUser: String =>
698705 $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true)
699706 case _ =>
700707 throw("Match error")
701708 }
702709 }
703710 else throw("Strict value is not equal to itself.")
704711 case _ =>
705712 throw("Match error")
706713 }
707714 }
708715 else throw("Strict value is not equal to itself.")
709716 }
710717
711718
712719
713720 @Callable(i)
714721 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
715722 then throw("permissions denied")
716723 else {
717- let $t02903229142 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
718- let wxPerLpIntegralNew = $t02903229142._1
719- let poolIntegralSTATE = $t02903229142._2
720- let poolDEBUG = $t02903229142._3
724+ let $t02905529165 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
725+ let wxPerLpIntegralNew = $t02905529165._1
726+ let poolIntegralSTATE = $t02905529165._2
727+ let poolDEBUG = $t02905529165._3
721728 poolIntegralSTATE
722729 }
723730
724731
725732 @Verifier(tx)
726733 func verify () = {
727734 let targetPublicKey = match managerPublicKeyOrUnit() {
728735 case pk: ByteVector =>
729736 pk
730737 case _: Unit =>
731738 tx.senderPublicKey
732739 case _ =>
733740 throw("Match error")
734741 }
735742 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
736743 }
737744

github/deemru/w8io/fabc49c 
90.66 ms