tx · 3sHCqqxA8CHzqLKjCc3Je6s1Ed1ZYyQN2y4FXV7hEMn2

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.03500000 Waves

2022.06.09 17:32 [2088966] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "3sHCqqxA8CHzqLKjCc3Je6s1Ed1ZYyQN2y4FXV7hEMn2", "fee": 3500000, "feeAssetId": null, "timestamp": 1654785130625, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "216Bp3LCgmRxPgY9gFg4VJZtUKy35VUVxhMXPcBjwxundcw1Boay4YEcgBeSZaPNp1jktVpedTzuLqqSZjcGBErs" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgAAABPAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAdTQ0FMRTE4AAAAAAAAAAASAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAOUE9PTFdFSUdIVE1VTFQFAAAABU1VTFQ4AAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAACW9uZUJpZ0ludAkAATYAAAABAAAAAAAAAAABAQAAAAlhc0FueUxpc3QAAAABAAAAA3ZhbAQAAAAHJG1hdGNoMAUAAAADdmFsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAlMaXN0W0FueV0EAAAACnZhbEFueUx5c3QFAAAAByRtYXRjaDAFAAAACnZhbEFueUx5c3QJAAACAAAAAQIAAAAbZmFpbCB0byBjYXN0IGludG8gTGlzdFtBbnldAQAAAAVhc0ludAAAAAEAAAADdmFsBAAAAAckbWF0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NDc4MjE1ODgAAAACXzIEAAAACXBvb2xERUJVRwgFAAAADSR0MDIxNDc4MjE1ODgAAAACXzMFAAAAEXBvb2xJbnRlZ3JhbFNUQVRFAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleYpN6RQ=", "chainId": 84, "height": 2088966, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HDCgDEvvd9RTLBaFdh2itGe2NRHQzF9QEavsHP4ajjX4 Next: EG8Pa4vwYdYUGZw84wiFyDVuNWEjKxsX2P9Ay8UjjZ5u Diff:
OldNewDifferences
1212 let SEP = "__"
1313
1414 let POOLWEIGHTMULT = MULT8
15+
16+let zeroBigInt = toBigInt(0)
17+
18+let oneBigInt = toBigInt(1)
1519
1620 func asAnyList (val) = match val {
1721 case valAnyLyst: List[Any] =>
4549 }
4650
4751
48-func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
52+func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
4953
5054
5155 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
206210 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
207211
208212
209-let factoryAddress = getStringOrFail(keyFactoryAddress())
213+let factoryAddress = getStringOrFail(this, keyFactoryAddress())
210214
211215 let factoryContract = addressFromStringValue(factoryAddress)
212216
216220
217221 let boostingContract = getBoostingAddressOrFail(factoryCfg)
218222
219-func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == 0))
220- then (stakedByUser > 0)
223+func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
224+ then (stakedByUser > zeroBigInt)
221225 else false)
222- then 0
223- else if ((stakedByUser == 0))
226+ then zeroBigInt
227+ else if ((stakedByUser == zeroBigInt))
224228 then wxPerLpIntegralNew
225- else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > 0))
226- then (stakedByUser > 0)
229+ else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
230+ then (stakedByUser > zeroBigInt)
227231 else false)
228- then getIntOrFail(this, wxPerLpIntegralUserLastKEY)
232+ then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
229233 else throw("calcWxPerLpIntegralUserLast: unexpected state")
230234
231235
232236 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
233237 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
234- let stakedTotal = readStaked(stakedTotalKEY)
238+ let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
239+ let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
240+ then oneBigInt
241+ else stakedTotal
235242 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
236243 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
237244 let MULT3 = 1000
245252 let wxPerLpOrZeroX3 = 0
246253 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
247254 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
248- then wxPerLpOrZeroX3
249- else fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotal)
250- let stakedTotalNew = (stakedTotal + lpDeltaAmount)
251- let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * dh))
252- let wxPerLpX3New = (poolWxEmissionPerBlockX3 / stakedTotalNew)
255+ then toBigInt(wxPerLpOrZeroX3)
256+ else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
257+ let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
258+ let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
259+ then oneBigInt
260+ else stakedTotalNew
261+ let wxPerLpIntegralNew = (toBigInt(wxPerLpIntegral) + (wxPerLpX3 * toBigInt(dh)))
262+ let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
253263 let wxPerLpIntegralLastUpdHeightNew = height
254264 let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
255- $Tuple3(wxPerLpIntegralNew, [IntegerEntry(wxPerLpIntegralKEY, wxPerLpIntegralNew), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), IntegerEntry(wxPerLpKEY, wxPerLpX3New)], debug)
265+ $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
256266 }
257267
258268
259269 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
260- let $t01049410616 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
261- let wxPerLpIntegralNew = $t01049410616._1
262- let poolIntegralSTATE = $t01049410616._2
263- let poolDEBUG = $t01049410616._3
270+ let $t01099511117 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
271+ let wxPerLpIntegralNew = $t01099511117._1
272+ let poolIntegralSTATE = $t01099511117._2
273+ let poolDEBUG = $t01099511117._3
264274 let MULT3 = 1000
265275 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
266276 let stakedByUser = readStaked(stakedByUserKEY)
269279 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
270280 let wxToClaimUser = getIntOrZero(this, wxToClaimUserKEY)
271281 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
272- let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(stakedByUser, wxPerLpIntegralUserLastUpdHeightOrZero, wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
273- let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), stakedByUser, (MULT8 * MULT3)))
282+ let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
283+ let MULT11 = (MULT8 * MULT3)
284+ let wxToClaimUserNew = (toBigInt(wxToClaimUser) + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11)))
274285 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
275286 let wxPerLpIntegralUserLastUpdHeightNew = height
276287 let debug = makeString([toString(wxToClaimUserNew), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
277- $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [IntegerEntry(wxToClaimUserKEY, wxToClaimUserNew), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), IntegerEntry(wxPerLpIntegralUserLastKEY, wxPerLpIntegralUserLastNew)]), debug)
288+ $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
278289 }
279290
280291
377388 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
378389 let stakedByUser = readStaked(stakedByUserKEY)
379390 let stakedTotal = readStaked(stakedTotalKEY)
380- let $t01427414391 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
381- let wxToClaimUserNew = $t01427414391._1
382- let integralSTATE = $t01427414391._2
383- let debug = $t01427414391._3
391+ let $t01514815265 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
392+ let wxToClaimUserNew = $t01514815265._1
393+ let integralSTATE = $t01514815265._2
394+ let debug = $t01514815265._3
384395 ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
385396 }
386397
401412 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
402413 let stakedByUser = readStaked(stakedByUserKEY)
403414 let stakedTotal = readStaked(stakedTotalKEY)
404- let $t01552815646 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
405- let wxToClaimUserNew = $t01552815646._1
406- let integralSTATE = $t01552815646._2
407- let debug = $t01552815646._3
415+ let $t01640216520 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
416+ let wxToClaimUserNew = $t01640216520._1
417+ let integralSTATE = $t01640216520._2
418+ let debug = $t01640216520._3
408419 if ((amount > stakedByUser))
409420 then throw("passed amount is less then available")
410421 else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
421432 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
422433 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
423434 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
424- let claimedByUser = getIntOrZero(this, claimedByUserKEY)
425- let claimedByUserMinReward = getIntOrZero(this, claimedByUserMinRewardKEY)
426- let claimedByUserBoostReward = getIntOrZero(this, claimedByUserBoostRewardKEY)
427- let claimedTotal = getIntOrZero(this, claimedTotalKEY)
428- let $t01683816950 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
429- let wxToClaimUserNew = $t01683816950._1
430- let integralSTATE = $t01683816950._2
431- let debug = $t01683816950._3
435+ let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
436+ let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
437+ let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
438+ let claimedTotal = toBigInt(getIntOrZero(this, claimedTotalKEY))
439+ let $t01775617868 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
440+ let wxToClaimUserNew = $t01775617868._1
441+ let integralSTATE = $t01775617868._2
442+ let debug = $t01775617868._3
432443 let availableToClaim = (wxToClaimUserNew - claimedByUser)
433- if ((0 >= availableToClaim))
444+ if ((zeroBigInt >= availableToClaim))
434445 then throw("nothing to claim")
435446 else {
436447 let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
437448 let minRewardPart = availableToClaim
438- let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal])
449+ let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
439450 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [minRewardPart], nil))[0])
440451 let emitBoost = asAnyList(invoke(emissionContract, "emit", [boostRewardPart], nil))
441452 if ((emitBoost == emitBoost))
442- then [IntegerEntry(claimedByUserKEY, (claimedByUser + availableToClaim)), IntegerEntry(claimedByUserMinRewardKEY, (claimedByUserMinReward + minRewardPart)), IntegerEntry(claimedByUserBoostRewardKEY, (claimedByUserBoostReward + boostRewardPart)), IntegerEntry(claimedTotalKEY, (claimedTotal + availableToClaim)), ScriptTransfer(userAddress, minRewardPart, wxAssetId), ScriptTransfer(userAddress, boostRewardPart, wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, availableToClaim, i.transactionId)]
453+ then {
454+ let claimedByUserValue = (claimedByUser + availableToClaim)
455+ let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
456+ let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
457+ let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
458+[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)]
459+ }
443460 else throw("Strict value is not equal to itself.")
444461 }
445462 }
463480 else (height - emissionStartBlock)
464481 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
465482 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
466- let $t01915119263 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
467- let wxToClaimUserNew = $t01915119263._1
468- let integralSTATE = $t01915119263._2
469- let debug = $t01915119263._3
470- let availableToClaim = (wxToClaimUserNew - claimedByUser)
483+ let $t02045320565 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
484+ let wxToClaimUserNew = $t02045320565._1
485+ let integralSTATE = $t02045320565._2
486+ let debug = $t02045320565._3
487+ let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
471488 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
472489 let wxAmountBoostTotal = asInt(boostInvResult[0])
473490 let boostDebug = asString(boostInvResult[1])
474491 let minRewardPart = availableToClaim
475- let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal])
492+ let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
476493 let totalReward = (minRewardPart + boostRewardPart)
477494 $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOSTDEBUG::") + boostDebug)], SEP))
478495 }
483500 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
484501 then throw("permissions denied")
485502 else {
486- let $t02014320253 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
487- let wxPerLpIntegralNew = $t02014320253._1
488- let poolIntegralSTATE = $t02014320253._2
489- let poolDEBUG = $t02014320253._3
503+ let $t02147821588 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
504+ let wxPerLpIntegralNew = $t02147821588._1
505+ let poolIntegralSTATE = $t02147821588._2
506+ let poolDEBUG = $t02147821588._3
490507 poolIntegralSTATE
491508 }
492509
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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
15+
16+let zeroBigInt = toBigInt(0)
17+
18+let oneBigInt = toBigInt(1)
1519
1620 func asAnyList (val) = match val {
1721 case valAnyLyst: List[Any] =>
1822 valAnyLyst
1923 case _ =>
2024 throw("fail to cast into List[Any]")
2125 }
2226
2327
2428 func asInt (val) = match val {
2529 case valInt: Int =>
2630 valInt
2731 case _ =>
2832 throw("fail to cast into Int")
2933 }
3034
3135
3236 func asString (val) = match val {
3337 case valStr: String =>
3438 valStr
3539 case _ =>
3640 throw("fail to cast into Int")
3741 }
3842
3943
4044 func asByteVector (val) = match val {
4145 case valBin: ByteVector =>
4246 valBin
4347 case _ =>
4448 throw("fail to cast into Int")
4549 }
4650
4751
48-func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
52+func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
4953
5054
5155 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
5256
5357
5458 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
5559
5660
5761 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
5862
5963
6064 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
6165
6266
6367 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
6468
6569
6670 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
6771
6872
6973 func keyFactoryAddress () = "%s%s__config__factoryAddress"
7074
7175
7276 let IdxFactoryCfgStakingDapp = 1
7377
7478 let IdxFactoryCfgBoostingDapp = 2
7579
7680 let IdxFactoryCfgIdoDapp = 3
7781
7882 let IdxFactoryCfgTeamDapp = 4
7983
8084 let IdxFactoryCfgEmissionDapp = 5
8185
8286 let IdxFactoryCfgRestDapp = 6
8387
8488 let IdxFactoryCfgSlippageDapp = 7
8589
8690 func keyFactoryCfg () = "%s__factoryConfig"
8791
8892
8993 func keyManagerPublicKey () = "%s__managerPublicKey"
9094
9195
9296 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
9397
9498
9599 func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr"
96100
97101
98102 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
99103
100104
101105 func keyFactoryLpList () = "%s__lpTokensList"
102106
103107
104108 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
105109
106110
107111 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
108112
109113
110114 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
111115
112116
113117 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
114118
115119
116120 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
117121
118122
119123 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
120124
121125
122126 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
123127
124128
125129 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
126130
127131
128132 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
129133
130134
131135 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
132136
133137
134138 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
135139
136140
137141 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
138142
139143
140144 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
141145
142146
143147 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
144148
145149
146150 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
147151
148152
149153 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
150154
151155
152156 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
153157
154158
155159 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed", "total", lpAssetIdStr], SEP)
156160
157161
158162 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
159163
160164
161165 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
162166
163167
164168 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
165169
166170
167171 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
168172
169173
170174 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
171175
172176
173177 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
174178
175179
176180 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
177181
178182
179183 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
180184
181185
182186 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
183187
184188
185189 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
186190
187191
188192 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
189193
190194
191195 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
192196
193197
194198 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
195199
196200
197201 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
198202
199203
200204 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
201205
202206
203207 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
204208
205209
206210 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
207211
208212
209-let factoryAddress = getStringOrFail(keyFactoryAddress())
213+let factoryAddress = getStringOrFail(this, keyFactoryAddress())
210214
211215 let factoryContract = addressFromStringValue(factoryAddress)
212216
213217 let factoryCfg = readFactoryCfgOrFail(factoryContract)
214218
215219 let emissionContract = getEmissionAddressOrFail(factoryCfg)
216220
217221 let boostingContract = getBoostingAddressOrFail(factoryCfg)
218222
219-func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == 0))
220- then (stakedByUser > 0)
223+func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
224+ then (stakedByUser > zeroBigInt)
221225 else false)
222- then 0
223- else if ((stakedByUser == 0))
226+ then zeroBigInt
227+ else if ((stakedByUser == zeroBigInt))
224228 then wxPerLpIntegralNew
225- else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > 0))
226- then (stakedByUser > 0)
229+ else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
230+ then (stakedByUser > zeroBigInt)
227231 else false)
228- then getIntOrFail(this, wxPerLpIntegralUserLastKEY)
232+ then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
229233 else throw("calcWxPerLpIntegralUserLast: unexpected state")
230234
231235
232236 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
233237 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
234- let stakedTotal = readStaked(stakedTotalKEY)
238+ let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
239+ let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
240+ then oneBigInt
241+ else stakedTotal
235242 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
236243 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
237244 let MULT3 = 1000
238245 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
239246 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
240247 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
241248 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
242249 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
243250 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
244251 let wxPerLpIntegral = getIntOrZero(this, wxPerLpIntegralKEY)
245252 let wxPerLpOrZeroX3 = 0
246253 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
247254 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
248- then wxPerLpOrZeroX3
249- else fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotal)
250- let stakedTotalNew = (stakedTotal + lpDeltaAmount)
251- let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * dh))
252- let wxPerLpX3New = (poolWxEmissionPerBlockX3 / stakedTotalNew)
255+ then toBigInt(wxPerLpOrZeroX3)
256+ else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
257+ let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
258+ let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
259+ then oneBigInt
260+ else stakedTotalNew
261+ let wxPerLpIntegralNew = (toBigInt(wxPerLpIntegral) + (wxPerLpX3 * toBigInt(dh)))
262+ let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
253263 let wxPerLpIntegralLastUpdHeightNew = height
254264 let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
255- $Tuple3(wxPerLpIntegralNew, [IntegerEntry(wxPerLpIntegralKEY, wxPerLpIntegralNew), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), IntegerEntry(wxPerLpKEY, wxPerLpX3New)], debug)
265+ $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
256266 }
257267
258268
259269 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
260- let $t01049410616 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
261- let wxPerLpIntegralNew = $t01049410616._1
262- let poolIntegralSTATE = $t01049410616._2
263- let poolDEBUG = $t01049410616._3
270+ let $t01099511117 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
271+ let wxPerLpIntegralNew = $t01099511117._1
272+ let poolIntegralSTATE = $t01099511117._2
273+ let poolDEBUG = $t01099511117._3
264274 let MULT3 = 1000
265275 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
266276 let stakedByUser = readStaked(stakedByUserKEY)
267277 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
268278 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
269279 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
270280 let wxToClaimUser = getIntOrZero(this, wxToClaimUserKEY)
271281 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
272- let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(stakedByUser, wxPerLpIntegralUserLastUpdHeightOrZero, wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
273- let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), stakedByUser, (MULT8 * MULT3)))
282+ let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
283+ let MULT11 = (MULT8 * MULT3)
284+ let wxToClaimUserNew = (toBigInt(wxToClaimUser) + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11)))
274285 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
275286 let wxPerLpIntegralUserLastUpdHeightNew = height
276287 let debug = makeString([toString(wxToClaimUserNew), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
277- $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [IntegerEntry(wxToClaimUserKEY, wxToClaimUserNew), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), IntegerEntry(wxPerLpIntegralUserLastKEY, wxPerLpIntegralUserLastNew)]), debug)
288+ $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
278289 }
279290
280291
281292 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
282293 case s: String =>
283294 fromBase58String(s)
284295 case _: Unit =>
285296 unit
286297 case _ =>
287298 throw("Match error")
288299 }
289300
290301
291302 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
292303 case s: String =>
293304 fromBase58String(s)
294305 case _: Unit =>
295306 unit
296307 case _ =>
297308 throw("Match error")
298309 }
299310
300311
301312 func mustManager (i) = {
302313 let pd = throw("Permission denied")
303314 match managerPublicKeyOrUnit() {
304315 case pk: ByteVector =>
305316 if ((i.callerPublicKey == pk))
306317 then true
307318 else pd
308319 case _: Unit =>
309320 if ((i.caller == this))
310321 then true
311322 else pd
312323 case _ =>
313324 throw("Match error")
314325 }
315326 }
316327
317328
318329 @Callable(i)
319330 func constructor (factoryAddressStr) = {
320331 let checkCaller = mustManager(i)
321332 if ((checkCaller == checkCaller))
322333 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
323334 else throw("Strict value is not equal to itself.")
324335 }
325336
326337
327338
328339 @Callable(i)
329340 func setManager (pendingManagerPublicKey) = {
330341 let checkCaller = mustManager(i)
331342 if ((checkCaller == checkCaller))
332343 then {
333344 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
334345 if ((checkManagerPublicKey == checkManagerPublicKey))
335346 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
336347 else throw("Strict value is not equal to itself.")
337348 }
338349 else throw("Strict value is not equal to itself.")
339350 }
340351
341352
342353
343354 @Callable(i)
344355 func confirmManager () = {
345356 let pm = pendingManagerPublicKeyOrUnit()
346357 let hasPM = if (isDefined(pm))
347358 then true
348359 else throw("No pending manager")
349360 if ((hasPM == hasPM))
350361 then {
351362 let checkPM = if ((i.callerPublicKey == value(pm)))
352363 then true
353364 else throw("You are not pending manager")
354365 if ((checkPM == checkPM))
355366 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
356367 else throw("Strict value is not equal to itself.")
357368 }
358369 else throw("Strict value is not equal to itself.")
359370 }
360371
361372
362373
363374 @Callable(i)
364375 func stake () = if ((size(i.payments) != 1))
365376 then throw("invalid payment - exact one payment must be attached")
366377 else {
367378 let pmt = i.payments[0]
368379 let lpAssetId = value(pmt.assetId)
369380 let lpAssetIdStr = toBase58String(lpAssetId)
370381 let amount = pmt.amount
371382 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
372383 let callerStr = toString(i.caller)
373384 let userAddressStr = if ((callerStr == poolAddressStr))
374385 then toString(i.originCaller)
375386 else callerStr
376387 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
377388 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
378389 let stakedByUser = readStaked(stakedByUserKEY)
379390 let stakedTotal = readStaked(stakedTotalKEY)
380- let $t01427414391 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
381- let wxToClaimUserNew = $t01427414391._1
382- let integralSTATE = $t01427414391._2
383- let debug = $t01427414391._3
391+ let $t01514815265 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
392+ let wxToClaimUserNew = $t01514815265._1
393+ let integralSTATE = $t01514815265._2
394+ let debug = $t01514815265._3
384395 ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
385396 }
386397
387398
388399
389400 @Callable(i)
390401 func unstake (lpAssetIdStr,amount) = {
391402 let lpAssetId = fromBase58String(lpAssetIdStr)
392403 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
393404 let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr)
394405 let callerStr = toString(i.caller)
395406 let userAddressStr = if (if ((callerStr == poolAddressStr))
396407 then true
397408 else (callerStr == poolAddon))
398409 then toString(i.originCaller)
399410 else callerStr
400411 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
401412 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
402413 let stakedByUser = readStaked(stakedByUserKEY)
403414 let stakedTotal = readStaked(stakedTotalKEY)
404- let $t01552815646 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
405- let wxToClaimUserNew = $t01552815646._1
406- let integralSTATE = $t01552815646._2
407- let debug = $t01552815646._3
415+ let $t01640216520 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
416+ let wxToClaimUserNew = $t01640216520._1
417+ let integralSTATE = $t01640216520._2
418+ let debug = $t01640216520._3
408419 if ((amount > stakedByUser))
409420 then throw("passed amount is less then available")
410421 else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
411422 }
412423
413424
414425
415426 @Callable(i)
416427 func claimWx (lpAssetIdStr) = {
417428 let userAddress = i.caller
418429 let userAddressStr = toString(i.caller)
419430 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
420431 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
421432 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
422433 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
423434 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
424- let claimedByUser = getIntOrZero(this, claimedByUserKEY)
425- let claimedByUserMinReward = getIntOrZero(this, claimedByUserMinRewardKEY)
426- let claimedByUserBoostReward = getIntOrZero(this, claimedByUserBoostRewardKEY)
427- let claimedTotal = getIntOrZero(this, claimedTotalKEY)
428- let $t01683816950 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
429- let wxToClaimUserNew = $t01683816950._1
430- let integralSTATE = $t01683816950._2
431- let debug = $t01683816950._3
435+ let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
436+ let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
437+ let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
438+ let claimedTotal = toBigInt(getIntOrZero(this, claimedTotalKEY))
439+ let $t01775617868 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
440+ let wxToClaimUserNew = $t01775617868._1
441+ let integralSTATE = $t01775617868._2
442+ let debug = $t01775617868._3
432443 let availableToClaim = (wxToClaimUserNew - claimedByUser)
433- if ((0 >= availableToClaim))
444+ if ((zeroBigInt >= availableToClaim))
434445 then throw("nothing to claim")
435446 else {
436447 let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
437448 let minRewardPart = availableToClaim
438- let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal])
449+ let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
439450 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [minRewardPart], nil))[0])
440451 let emitBoost = asAnyList(invoke(emissionContract, "emit", [boostRewardPart], nil))
441452 if ((emitBoost == emitBoost))
442- then [IntegerEntry(claimedByUserKEY, (claimedByUser + availableToClaim)), IntegerEntry(claimedByUserMinRewardKEY, (claimedByUserMinReward + minRewardPart)), IntegerEntry(claimedByUserBoostRewardKEY, (claimedByUserBoostReward + boostRewardPart)), IntegerEntry(claimedTotalKEY, (claimedTotal + availableToClaim)), ScriptTransfer(userAddress, minRewardPart, wxAssetId), ScriptTransfer(userAddress, boostRewardPart, wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, availableToClaim, i.transactionId)]
453+ then {
454+ let claimedByUserValue = (claimedByUser + availableToClaim)
455+ let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
456+ let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
457+ let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
458+[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)]
459+ }
443460 else throw("Strict value is not equal to itself.")
444461 }
445462 }
446463
447464
448465
449466 @Callable(i)
450467 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
451468 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
452469 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
453470 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
454471 let stakedByUser = readStaked(stakedByUserKEY)
455472 let stakedTotal = readStaked(stakedTotalKEY)
456473 let claimedByUser = getIntOrZero(this, claimedByUserKEY)
457474 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
458475 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
459476 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
460477 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
461478 let passedBlocks = if ((emissionStartBlock > height))
462479 then 0
463480 else (height - emissionStartBlock)
464481 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
465482 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
466- let $t01915119263 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
467- let wxToClaimUserNew = $t01915119263._1
468- let integralSTATE = $t01915119263._2
469- let debug = $t01915119263._3
470- let availableToClaim = (wxToClaimUserNew - claimedByUser)
483+ let $t02045320565 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
484+ let wxToClaimUserNew = $t02045320565._1
485+ let integralSTATE = $t02045320565._2
486+ let debug = $t02045320565._3
487+ let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
471488 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
472489 let wxAmountBoostTotal = asInt(boostInvResult[0])
473490 let boostDebug = asString(boostInvResult[1])
474491 let minRewardPart = availableToClaim
475- let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal])
492+ let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
476493 let totalReward = (minRewardPart + boostRewardPart)
477494 $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOSTDEBUG::") + boostDebug)], SEP))
478495 }
479496
480497
481498
482499 @Callable(i)
483500 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
484501 then throw("permissions denied")
485502 else {
486- let $t02014320253 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
487- let wxPerLpIntegralNew = $t02014320253._1
488- let poolIntegralSTATE = $t02014320253._2
489- let poolDEBUG = $t02014320253._3
503+ let $t02147821588 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
504+ let wxPerLpIntegralNew = $t02147821588._1
505+ let poolIntegralSTATE = $t02147821588._2
506+ let poolDEBUG = $t02147821588._3
490507 poolIntegralSTATE
491508 }
492509
493510
494511 @Verifier(tx)
495512 func verify () = {
496513 let targetPublicKey = match managerPublicKeyOrUnit() {
497514 case pk: ByteVector =>
498515 pk
499516 case _: Unit =>
500517 tx.senderPublicKey
501518 case _ =>
502519 throw("Match error")
503520 }
504521 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
505522 }
506523

github/deemru/w8io/169f3d6 
75.48 ms