tx · Z8JyEe2ZrBigEhQF6ZJcieM695uHjjHTS2FzHQiGwia

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.03300000 Waves

2022.06.15 16:29 [2097552] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "Z8JyEe2ZrBigEhQF6ZJcieM695uHjjHTS2FzHQiGwia", "fee": 3300000, "feeAssetId": null, "timestamp": 1655299861928, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "kj1c32ZWY2eBGBHCCtbCfRA5dLdk8dYg2kyHorqMyzapG4ZAHtU1xcyMnAg3zZoYXA9SnbxdFMfvXSGjLYENSQU" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgAAABZAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAdTQ0FMRTE4AAAAAAAAAAASAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAOUE9PTFdFSUdIVE1VTFQFAAAABU1VTFQ4AAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAACW9uZUJpZ0ludAkAATYAAAABAAAAAAAAAAABAQAAAAlhc0FueUxpc3QAAAABAAAAA3ZhbAQAAAAHJG1hdGNoMAUAAAADdmFsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAlMaXN0W0FueV0EAAAACnZhbEFueUx5c3QFAAAAByRtYXRjaDAFAAAACnZhbEFueUx5c3QJAAACAAAAAQIAAAAbZmFpbCB0byBjYXN0IGludG8gTGlzdFtBbnldAQAAAAVhc0ludAAAAAEAAAADdmFsBAAAAAckbWF0Y2gwB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ACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleb+9RFE=", "chainId": 84, "height": 2097552, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3qQcMWveB9cmsmqzWrAA7vGu5ctM4R6W73RtAhzdZJBg Next: 5ru1hYHz9H8EF5K7NkBFAqhRyo2b8ouyXv39Yzrac825 Diff:
OldNewDifferences
233233
234234 let boostingContract = getBoostingAddressOrFail(factoryCfg)
235235
236+func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
237+
238+
239+func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
240+
241+
242+func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
243+
244+
245+func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
246+
247+
248+func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
249+
250+
251+func containsNode (listName,id) = {
252+ let headOrUnit = getString(this, keyListHead(listName))
253+ let prevOrUnit = getString(this, keyListPrev(listName, id))
254+ let nextOrUnit = getString(this, keyListNext(listName, id))
255+ if (if ((id == valueOrElse(headOrUnit, "")))
256+ then true
257+ else (prevOrUnit != unit))
258+ then true
259+ else (nextOrUnit != unit)
260+ }
261+
262+
263+func insertNodeActions (listName,id) = {
264+ let headOrUnit = getString(this, keyListHead(listName))
265+ let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
266+ let checkNode = if (!(containsNode(listName, id)))
267+ then true
268+ else throw("Node exists")
269+ if ((checkNode == checkNode))
270+ then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
271+ then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
272+ else nil)) ++ [StringEntry(keyListHead(listName), id)])
273+ else throw("Strict value is not equal to itself.")
274+ }
275+
276+
277+func deleteNodeActions (listName,id) = {
278+ let headOrUnit = getString(this, keyListHead(listName))
279+ let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
280+ let prevOrUnit = getString(this, keyListPrev(listName, id))
281+ let nextOrUnit = getString(this, keyListNext(listName, id))
282+ ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
283+ then (nextOrUnit != unit)
284+ else false)
285+ then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
286+ else if ((nextOrUnit != unit))
287+ then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
288+ else if ((prevOrUnit != unit))
289+ then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
290+ else if ((id == valueOrElse(headOrUnit, "")))
291+ then [DeleteEntry(keyListHead(listName))]
292+ else throw(((("invalid node: " + listName) + ".") + id))))
293+ }
294+
295+
236296 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
237297 then (stakedByUser > zeroBigInt)
238298 else false)
280340
281341
282342 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
283- let $t01151811640 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
284- let wxPerLpIntegralNew = $t01151811640._1
285- let poolIntegralSTATE = $t01151811640._2
286- let poolDEBUG = $t01151811640._3
343+ let $t01423814360 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
344+ let wxPerLpIntegralNew = $t01423814360._1
345+ let poolIntegralSTATE = $t01423814360._2
346+ let poolDEBUG = $t01423814360._3
287347 let MULT3 = 1000
288348 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
289349 let stakedByUser = readStaked(stakedByUserKEY)
401461 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
402462 let stakedByUser = readStaked(stakedByUserKEY)
403463 let stakedTotal = readStaked(stakedTotalKEY)
404- let $t01610316220 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
405- let wxToClaimUserNew = $t01610316220._1
406- let integralSTATE = $t01610316220._2
407- let debug = $t01610316220._3
464+ let $t01879118908 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
465+ let wxToClaimUserNew = $t01879118908._1
466+ let integralSTATE = $t01879118908._2
467+ let debug = $t01879118908._3
408468 ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
409469 }
410470
425485 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
426486 let stakedByUser = readStaked(stakedByUserKEY)
427487 let stakedTotal = readStaked(stakedTotalKEY)
428- let $t01738817506 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
429- let wxToClaimUserNew = $t01738817506._1
430- let integralSTATE = $t01738817506._2
431- let debug = $t01738817506._3
488+ let $t02004520163 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
489+ let wxToClaimUserNew = $t02004520163._1
490+ let integralSTATE = $t02004520163._2
491+ let debug = $t02004520163._3
432492 if ((amount > stakedByUser))
433493 then throw("passed amount is less then available")
434494 else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
448508 let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
449509 let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
450510 let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
451- let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
452- let $t01874418856 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
453- let wxToClaimUserNew = $t01874418856._1
454- let integralSTATE = $t01874418856._2
455- let debug = $t01874418856._3
511+ let claimedTotal = toBigInt(getIntOrZero(this, claimedTotalKEY))
512+ let $t02139921511 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
513+ let wxToClaimUserNew = $t02139921511._1
514+ let integralSTATE = $t02139921511._2
515+ let debug = $t02139921511._3
456516 let availableToClaim = (wxToClaimUserNew - claimedByUser)
457517 if ((zeroBigInt >= availableToClaim))
458518 then throw("nothing to claim")
493553 else (height - emissionStartBlock)
494554 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
495555 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
496- let $t02151921631 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
497- let wxToClaimUserNew = $t02151921631._1
498- let integralSTATE = $t02151921631._2
499- let debug = $t02151921631._3
556+ let $t02417424286 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
557+ let wxToClaimUserNew = $t02417424286._1
558+ let integralSTATE = $t02417424286._2
559+ let debug = $t02417424286._3
500560 let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
501561 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
502562 let wxAmountBoostTotal = asInt(boostInvResult[0])
513573 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
514574 then throw("permissions denied")
515575 else {
516- let $t02254422654 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
517- let wxPerLpIntegralNew = $t02254422654._1
518- let poolIntegralSTATE = $t02254422654._2
519- let poolDEBUG = $t02254422654._3
576+ let $t02519925309 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
577+ let wxPerLpIntegralNew = $t02519925309._1
578+ let poolIntegralSTATE = $t02519925309._2
579+ let poolDEBUG = $t02519925309._3
520580 poolIntegralSTATE
521581 }
522582
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
1515
1616 let zeroBigInt = toBigInt(0)
1717
1818 let oneBigInt = toBigInt(1)
1919
2020 func asAnyList (val) = match val {
2121 case valAnyLyst: List[Any] =>
2222 valAnyLyst
2323 case _ =>
2424 throw("fail to cast into List[Any]")
2525 }
2626
2727
2828 func asInt (val) = match val {
2929 case valInt: Int =>
3030 valInt
3131 case _ =>
3232 throw("fail to cast into Int")
3333 }
3434
3535
3636 func asString (val) = match val {
3737 case valStr: String =>
3838 valStr
3939 case _ =>
4040 throw("fail to cast into Int")
4141 }
4242
4343
4444 func asByteVector (val) = match val {
4545 case valBin: ByteVector =>
4646 valBin
4747 case _ =>
4848 throw("fail to cast into Int")
4949 }
5050
5151
5252 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
5353
5454
5555 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
5656
5757
5858 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
5959
6060
6161 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
6262
6363
6464 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
6565
6666
6767 func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0")))
6868
6969
7070 func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) {
7171 case s: String =>
7272 value(parseBigInt(s))
7373 case _: Unit =>
7474 defaultVal
7575 case _ =>
7676 throw("Match error")
7777 }
7878
7979
8080 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
8181
8282
8383 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
8484
8585
8686 func keyFactoryAddress () = "%s%s__config__factoryAddress"
8787
8888
8989 let IdxFactoryCfgStakingDapp = 1
9090
9191 let IdxFactoryCfgBoostingDapp = 2
9292
9393 let IdxFactoryCfgIdoDapp = 3
9494
9595 let IdxFactoryCfgTeamDapp = 4
9696
9797 let IdxFactoryCfgEmissionDapp = 5
9898
9999 let IdxFactoryCfgRestDapp = 6
100100
101101 let IdxFactoryCfgSlippageDapp = 7
102102
103103 func keyFactoryCfg () = "%s__factoryConfig"
104104
105105
106106 func keyManagerPublicKey () = "%s__managerPublicKey"
107107
108108
109109 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
110110
111111
112112 func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr"
113113
114114
115115 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
116116
117117
118118 func keyFactoryLpList () = "%s__lpTokensList"
119119
120120
121121 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
122122
123123
124124 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
125125
126126
127127 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
128128
129129
130130 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
131131
132132
133133 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
134134
135135
136136 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
137137
138138
139139 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
140140
141141
142142 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
143143
144144
145145 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
146146
147147
148148 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
149149
150150
151151 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
152152
153153
154154 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
155155
156156
157157 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
158158
159159
160160 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
161161
162162
163163 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
164164
165165
166166 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
167167
168168
169169 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
170170
171171
172172 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed", "total", lpAssetIdStr], SEP)
173173
174174
175175 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
176176
177177
178178 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
179179
180180
181181 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
182182
183183
184184 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
185185
186186
187187 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
188188
189189
190190 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
191191
192192
193193 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
194194
195195
196196 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
197197
198198
199199 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
200200
201201
202202 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
203203
204204
205205 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
206206
207207
208208 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
209209
210210
211211 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
212212
213213
214214 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
215215
216216
217217 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
218218
219219
220220 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
221221
222222
223223 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
224224
225225
226226 let factoryAddress = getStringOrFail(this, keyFactoryAddress())
227227
228228 let factoryContract = addressFromStringValue(factoryAddress)
229229
230230 let factoryCfg = readFactoryCfgOrFail(factoryContract)
231231
232232 let emissionContract = getEmissionAddressOrFail(factoryCfg)
233233
234234 let boostingContract = getBoostingAddressOrFail(factoryCfg)
235235
236+func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
237+
238+
239+func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
240+
241+
242+func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
243+
244+
245+func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
246+
247+
248+func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
249+
250+
251+func containsNode (listName,id) = {
252+ let headOrUnit = getString(this, keyListHead(listName))
253+ let prevOrUnit = getString(this, keyListPrev(listName, id))
254+ let nextOrUnit = getString(this, keyListNext(listName, id))
255+ if (if ((id == valueOrElse(headOrUnit, "")))
256+ then true
257+ else (prevOrUnit != unit))
258+ then true
259+ else (nextOrUnit != unit)
260+ }
261+
262+
263+func insertNodeActions (listName,id) = {
264+ let headOrUnit = getString(this, keyListHead(listName))
265+ let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
266+ let checkNode = if (!(containsNode(listName, id)))
267+ then true
268+ else throw("Node exists")
269+ if ((checkNode == checkNode))
270+ then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
271+ then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
272+ else nil)) ++ [StringEntry(keyListHead(listName), id)])
273+ else throw("Strict value is not equal to itself.")
274+ }
275+
276+
277+func deleteNodeActions (listName,id) = {
278+ let headOrUnit = getString(this, keyListHead(listName))
279+ let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
280+ let prevOrUnit = getString(this, keyListPrev(listName, id))
281+ let nextOrUnit = getString(this, keyListNext(listName, id))
282+ ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
283+ then (nextOrUnit != unit)
284+ else false)
285+ then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
286+ else if ((nextOrUnit != unit))
287+ then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
288+ else if ((prevOrUnit != unit))
289+ then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
290+ else if ((id == valueOrElse(headOrUnit, "")))
291+ then [DeleteEntry(keyListHead(listName))]
292+ else throw(((("invalid node: " + listName) + ".") + id))))
293+ }
294+
295+
236296 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
237297 then (stakedByUser > zeroBigInt)
238298 else false)
239299 then zeroBigInt
240300 else if ((stakedByUser == zeroBigInt))
241301 then wxPerLpIntegralNew
242302 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
243303 then (stakedByUser > zeroBigInt)
244304 else false)
245305 then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
246306 else throw("calcWxPerLpIntegralUserLast: unexpected state")
247307
248308
249309 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
250310 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
251311 let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
252312 let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
253313 then oneBigInt
254314 else stakedTotal
255315 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
256316 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
257317 let MULT3 = 1000
258318 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
259319 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
260320 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
261321 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
262322 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
263323 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
264324 let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY)
265325 let wxPerLpOrZeroX3 = 0
266326 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
267327 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
268328 then toBigInt(wxPerLpOrZeroX3)
269329 else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
270330 let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
271331 let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
272332 then oneBigInt
273333 else stakedTotalNew
274334 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh)))
275335 let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
276336 let wxPerLpIntegralLastUpdHeightNew = height
277337 let debug = makeString(["wxPerLpIntegralNew=", toString(wxPerLpIntegralNew), "dh=", toString(dh), "wxPerLpX3=", toString(wxPerLpX3), "stakedTotal=", toString(stakedTotal), "poolWxEmissionPerBlockX3=", toString(poolWxEmissionPerBlockX3), "wxEmissionPerBlockX3=", toString(wxEmissionPerBlockX3), "poolWeight=", toString(poolWeight)], "::")
278338 $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
279339 }
280340
281341
282342 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
283- let $t01151811640 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
284- let wxPerLpIntegralNew = $t01151811640._1
285- let poolIntegralSTATE = $t01151811640._2
286- let poolDEBUG = $t01151811640._3
343+ let $t01423814360 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
344+ let wxPerLpIntegralNew = $t01423814360._1
345+ let poolIntegralSTATE = $t01423814360._2
346+ let poolDEBUG = $t01423814360._3
287347 let MULT3 = 1000
288348 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
289349 let stakedByUser = readStaked(stakedByUserKEY)
290350 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
291351 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
292352 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
293353 let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY)
294354 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
295355 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
296356 let MULT11 = (MULT8 * MULT3)
297357 let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11)))
298358 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
299359 let wxPerLpIntegralUserLastUpdHeightNew = height
300360 let debug = makeString(["wxPerLpIntegralUserLastUpdHeightOrZero=", toString(wxPerLpIntegralUserLastUpdHeightOrZero), "this.getStringOrFail(wxPerLpIntegralUserLastKEY).parseBigInt().value()=", toString(value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))), "wxPerLpIntegralNew=", toString(wxPerLpIntegralNew), "wxToClaimUserNew=", toString(wxToClaimUserNew), "wxPerLpIntegralUserLast=", toString(wxPerLpIntegralUserLast), "stakedByUser=", toString(stakedByUser), "poolDEBUG=", poolDEBUG, "height=", toString(height)], "::")
301361 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
302362 }
303363
304364
305365 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
306366 case s: String =>
307367 fromBase58String(s)
308368 case _: Unit =>
309369 unit
310370 case _ =>
311371 throw("Match error")
312372 }
313373
314374
315375 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
316376 case s: String =>
317377 fromBase58String(s)
318378 case _: Unit =>
319379 unit
320380 case _ =>
321381 throw("Match error")
322382 }
323383
324384
325385 func mustManager (i) = {
326386 let pd = throw("Permission denied")
327387 match managerPublicKeyOrUnit() {
328388 case pk: ByteVector =>
329389 if ((i.callerPublicKey == pk))
330390 then true
331391 else pd
332392 case _: Unit =>
333393 if ((i.caller == this))
334394 then true
335395 else pd
336396 case _ =>
337397 throw("Match error")
338398 }
339399 }
340400
341401
342402 @Callable(i)
343403 func constructor (factoryAddressStr) = {
344404 let checkCaller = mustManager(i)
345405 if ((checkCaller == checkCaller))
346406 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
347407 else throw("Strict value is not equal to itself.")
348408 }
349409
350410
351411
352412 @Callable(i)
353413 func setManager (pendingManagerPublicKey) = {
354414 let checkCaller = mustManager(i)
355415 if ((checkCaller == checkCaller))
356416 then {
357417 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
358418 if ((checkManagerPublicKey == checkManagerPublicKey))
359419 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
360420 else throw("Strict value is not equal to itself.")
361421 }
362422 else throw("Strict value is not equal to itself.")
363423 }
364424
365425
366426
367427 @Callable(i)
368428 func confirmManager () = {
369429 let pm = pendingManagerPublicKeyOrUnit()
370430 let hasPM = if (isDefined(pm))
371431 then true
372432 else throw("No pending manager")
373433 if ((hasPM == hasPM))
374434 then {
375435 let checkPM = if ((i.callerPublicKey == value(pm)))
376436 then true
377437 else throw("You are not pending manager")
378438 if ((checkPM == checkPM))
379439 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
380440 else throw("Strict value is not equal to itself.")
381441 }
382442 else throw("Strict value is not equal to itself.")
383443 }
384444
385445
386446
387447 @Callable(i)
388448 func stake () = if ((size(i.payments) != 1))
389449 then throw("invalid payment - exact one payment must be attached")
390450 else {
391451 let pmt = i.payments[0]
392452 let lpAssetId = value(pmt.assetId)
393453 let lpAssetIdStr = toBase58String(lpAssetId)
394454 let amount = pmt.amount
395455 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
396456 let callerStr = toString(i.caller)
397457 let userAddressStr = if ((callerStr == poolAddressStr))
398458 then toString(i.originCaller)
399459 else callerStr
400460 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
401461 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
402462 let stakedByUser = readStaked(stakedByUserKEY)
403463 let stakedTotal = readStaked(stakedTotalKEY)
404- let $t01610316220 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
405- let wxToClaimUserNew = $t01610316220._1
406- let integralSTATE = $t01610316220._2
407- let debug = $t01610316220._3
464+ let $t01879118908 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
465+ let wxToClaimUserNew = $t01879118908._1
466+ let integralSTATE = $t01879118908._2
467+ let debug = $t01879118908._3
408468 ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
409469 }
410470
411471
412472
413473 @Callable(i)
414474 func unstake (lpAssetIdStr,amount) = {
415475 let lpAssetId = fromBase58String(lpAssetIdStr)
416476 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
417477 let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr)
418478 let callerStr = toString(i.caller)
419479 let userAddressStr = if (if ((callerStr == poolAddressStr))
420480 then true
421481 else (callerStr == poolAddon))
422482 then toString(i.originCaller)
423483 else callerStr
424484 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
425485 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
426486 let stakedByUser = readStaked(stakedByUserKEY)
427487 let stakedTotal = readStaked(stakedTotalKEY)
428- let $t01738817506 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
429- let wxToClaimUserNew = $t01738817506._1
430- let integralSTATE = $t01738817506._2
431- let debug = $t01738817506._3
488+ let $t02004520163 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
489+ let wxToClaimUserNew = $t02004520163._1
490+ let integralSTATE = $t02004520163._2
491+ let debug = $t02004520163._3
432492 if ((amount > stakedByUser))
433493 then throw("passed amount is less then available")
434494 else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
435495 }
436496
437497
438498
439499 @Callable(i)
440500 func claimWx (lpAssetIdStr) = {
441501 let userAddress = i.caller
442502 let userAddressStr = toString(i.caller)
443503 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
444504 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
445505 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
446506 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
447507 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
448508 let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
449509 let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
450510 let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
451- let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
452- let $t01874418856 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
453- let wxToClaimUserNew = $t01874418856._1
454- let integralSTATE = $t01874418856._2
455- let debug = $t01874418856._3
511+ let claimedTotal = toBigInt(getIntOrZero(this, claimedTotalKEY))
512+ let $t02139921511 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
513+ let wxToClaimUserNew = $t02139921511._1
514+ let integralSTATE = $t02139921511._2
515+ let debug = $t02139921511._3
456516 let availableToClaim = (wxToClaimUserNew - claimedByUser)
457517 if ((zeroBigInt >= availableToClaim))
458518 then throw("nothing to claim")
459519 else {
460520 let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
461521 let minRewardPart = availableToClaim
462522 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
463523 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
464524 let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
465525 if ((emitBoost == emitBoost))
466526 then {
467527 let claimedByUserValue = (claimedByUser + availableToClaim)
468528 let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
469529 let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
470530 let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
471531 [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)]
472532 }
473533 else throw("Strict value is not equal to itself.")
474534 }
475535 }
476536
477537
478538
479539 @Callable(i)
480540 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
481541 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
482542 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
483543 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
484544 let stakedByUser = readStaked(stakedByUserKEY)
485545 let stakedTotal = readStaked(stakedTotalKEY)
486546 let claimedByUser = getIntOrZero(this, claimedByUserKEY)
487547 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
488548 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
489549 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
490550 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
491551 let passedBlocks = if ((emissionStartBlock > height))
492552 then 0
493553 else (height - emissionStartBlock)
494554 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
495555 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
496- let $t02151921631 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
497- let wxToClaimUserNew = $t02151921631._1
498- let integralSTATE = $t02151921631._2
499- let debug = $t02151921631._3
556+ let $t02417424286 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
557+ let wxToClaimUserNew = $t02417424286._1
558+ let integralSTATE = $t02417424286._2
559+ let debug = $t02417424286._3
500560 let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
501561 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
502562 let wxAmountBoostTotal = asInt(boostInvResult[0])
503563 let boostDebug = asString(boostInvResult[1])
504564 let minRewardPart = availableToClaim
505565 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
506566 let totalReward = (minRewardPart + boostRewardPart)
507567 $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))
508568 }
509569
510570
511571
512572 @Callable(i)
513573 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
514574 then throw("permissions denied")
515575 else {
516- let $t02254422654 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
517- let wxPerLpIntegralNew = $t02254422654._1
518- let poolIntegralSTATE = $t02254422654._2
519- let poolDEBUG = $t02254422654._3
576+ let $t02519925309 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
577+ let wxPerLpIntegralNew = $t02519925309._1
578+ let poolIntegralSTATE = $t02519925309._2
579+ let poolDEBUG = $t02519925309._3
520580 poolIntegralSTATE
521581 }
522582
523583
524584 @Verifier(tx)
525585 func verify () = {
526586 let targetPublicKey = match managerPublicKeyOrUnit() {
527587 case pk: ByteVector =>
528588 pk
529589 case _: Unit =>
530590 tx.senderPublicKey
531591 case _ =>
532592 throw("Match error")
533593 }
534594 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
535595 }
536596

github/deemru/w8io/169f3d6 
98.52 ms