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:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgAAABZAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAdTQ0FMRTE4AAAAAAAAAAASAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAOUE9PTFdFSUdIVE1VTFQFAAAABU1VTFQ4AAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAACW9uZUJpZ0ludAkAATYAAAABAAAAAAAAAAABAQAAAAlhc0FueUxpc3QAAAABAAAAA3ZhbAQAAAAHJG1hdGNoMAUAAAADdmFsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAlMaXN0W0FueV0EAAAACnZhbEFueUx5c3QFAAAAByRtYXRjaDAFAAAACnZhbEFueUx5c3QJAAACAAAAAQIAAAAbZmFpbCB0byBjYXN0IGludG8gTGlzdFtBbnldAQAAAAVhc0ludAAAAAEAAAADdmFsBAAAAAckbWF0Y2gwBQ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dHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleb+9RFE=", "chainId": 84, "height": 2097552, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3qQcMWveB9cmsmqzWrAA7vGu5ctM4R6W73RtAhzdZJBg Next: 5ru1hYHz9H8EF5K7NkBFAqhRyo2b8ouyXv39Yzrac825 Diff:
Old | New | Differences | |
---|---|---|---|
233 | 233 | ||
234 | 234 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
235 | 235 | ||
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 | + | ||
236 | 296 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt)) | |
237 | 297 | then (stakedByUser > zeroBigInt) | |
238 | 298 | else false) | |
280 | 340 | ||
281 | 341 | ||
282 | 342 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
283 | - | let $ | |
284 | - | let wxPerLpIntegralNew = $ | |
285 | - | let poolIntegralSTATE = $ | |
286 | - | let poolDEBUG = $ | |
343 | + | let $t01423814360 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
344 | + | let wxPerLpIntegralNew = $t01423814360._1 | |
345 | + | let poolIntegralSTATE = $t01423814360._2 | |
346 | + | let poolDEBUG = $t01423814360._3 | |
287 | 347 | let MULT3 = 1000 | |
288 | 348 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
289 | 349 | let stakedByUser = readStaked(stakedByUserKEY) | |
401 | 461 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
402 | 462 | let stakedByUser = readStaked(stakedByUserKEY) | |
403 | 463 | let stakedTotal = readStaked(stakedTotalKEY) | |
404 | - | let $ | |
405 | - | let wxToClaimUserNew = $ | |
406 | - | let integralSTATE = $ | |
407 | - | let debug = $ | |
464 | + | let $t01879118908 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
465 | + | let wxToClaimUserNew = $t01879118908._1 | |
466 | + | let integralSTATE = $t01879118908._2 | |
467 | + | let debug = $t01879118908._3 | |
408 | 468 | ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
409 | 469 | } | |
410 | 470 | ||
425 | 485 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
426 | 486 | let stakedByUser = readStaked(stakedByUserKEY) | |
427 | 487 | let stakedTotal = readStaked(stakedTotalKEY) | |
428 | - | let $ | |
429 | - | let wxToClaimUserNew = $ | |
430 | - | let integralSTATE = $ | |
431 | - | let debug = $ | |
488 | + | let $t02004520163 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
489 | + | let wxToClaimUserNew = $t02004520163._1 | |
490 | + | let integralSTATE = $t02004520163._2 | |
491 | + | let debug = $t02004520163._3 | |
432 | 492 | if ((amount > stakedByUser)) | |
433 | 493 | then throw("passed amount is less then available") | |
434 | 494 | else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
448 | 508 | let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY)) | |
449 | 509 | let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY)) | |
450 | 510 | let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY)) | |
451 | - | let claimedTotal = | |
452 | - | let $ | |
453 | - | let wxToClaimUserNew = $ | |
454 | - | let integralSTATE = $ | |
455 | - | let debug = $ | |
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 | |
456 | 516 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
457 | 517 | if ((zeroBigInt >= availableToClaim)) | |
458 | 518 | then throw("nothing to claim") | |
493 | 553 | else (height - emissionStartBlock) | |
494 | 554 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
495 | 555 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
496 | - | let $ | |
497 | - | let wxToClaimUserNew = $ | |
498 | - | let integralSTATE = $ | |
499 | - | let debug = $ | |
556 | + | let $t02417424286 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
557 | + | let wxToClaimUserNew = $t02417424286._1 | |
558 | + | let integralSTATE = $t02417424286._2 | |
559 | + | let debug = $t02417424286._3 | |
500 | 560 | let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser)) | |
501 | 561 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
502 | 562 | let wxAmountBoostTotal = asInt(boostInvResult[0]) | |
513 | 573 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
514 | 574 | then throw("permissions denied") | |
515 | 575 | else { | |
516 | - | let $ | |
517 | - | let wxPerLpIntegralNew = $ | |
518 | - | let poolIntegralSTATE = $ | |
519 | - | let poolDEBUG = $ | |
576 | + | let $t02519925309 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
577 | + | let wxPerLpIntegralNew = $t02519925309._1 | |
578 | + | let poolIntegralSTATE = $t02519925309._2 | |
579 | + | let poolDEBUG = $t02519925309._3 | |
520 | 580 | poolIntegralSTATE | |
521 | 581 | } | |
522 | 582 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | let zeroBigInt = toBigInt(0) | |
17 | 17 | ||
18 | 18 | let oneBigInt = toBigInt(1) | |
19 | 19 | ||
20 | 20 | func asAnyList (val) = match val { | |
21 | 21 | case valAnyLyst: List[Any] => | |
22 | 22 | valAnyLyst | |
23 | 23 | case _ => | |
24 | 24 | throw("fail to cast into List[Any]") | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func asInt (val) = match val { | |
29 | 29 | case valInt: Int => | |
30 | 30 | valInt | |
31 | 31 | case _ => | |
32 | 32 | throw("fail to cast into Int") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func asString (val) = match val { | |
37 | 37 | case valStr: String => | |
38 | 38 | valStr | |
39 | 39 | case _ => | |
40 | 40 | throw("fail to cast into Int") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func asByteVector (val) = match val { | |
45 | 45 | case valBin: ByteVector => | |
46 | 46 | valBin | |
47 | 47 | case _ => | |
48 | 48 | throw("fail to cast into Int") | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0"))) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) { | |
71 | 71 | case s: String => | |
72 | 72 | value(parseBigInt(s)) | |
73 | 73 | case _: Unit => | |
74 | 74 | defaultVal | |
75 | 75 | case _ => | |
76 | 76 | throw("Match error") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | let IdxFactoryCfgStakingDapp = 1 | |
90 | 90 | ||
91 | 91 | let IdxFactoryCfgBoostingDapp = 2 | |
92 | 92 | ||
93 | 93 | let IdxFactoryCfgIdoDapp = 3 | |
94 | 94 | ||
95 | 95 | let IdxFactoryCfgTeamDapp = 4 | |
96 | 96 | ||
97 | 97 | let IdxFactoryCfgEmissionDapp = 5 | |
98 | 98 | ||
99 | 99 | let IdxFactoryCfgRestDapp = 6 | |
100 | 100 | ||
101 | 101 | let IdxFactoryCfgSlippageDapp = 7 | |
102 | 102 | ||
103 | 103 | func keyFactoryCfg () = "%s__factoryConfig" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyFactoryLpList () = "%s__lpTokensList" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed", "total", lpAssetIdStr], SEP) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | let factoryAddress = getStringOrFail(this, keyFactoryAddress()) | |
227 | 227 | ||
228 | 228 | let factoryContract = addressFromStringValue(factoryAddress) | |
229 | 229 | ||
230 | 230 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
231 | 231 | ||
232 | 232 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
233 | 233 | ||
234 | 234 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
235 | 235 | ||
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 | + | ||
236 | 296 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt)) | |
237 | 297 | then (stakedByUser > zeroBigInt) | |
238 | 298 | else false) | |
239 | 299 | then zeroBigInt | |
240 | 300 | else if ((stakedByUser == zeroBigInt)) | |
241 | 301 | then wxPerLpIntegralNew | |
242 | 302 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt)) | |
243 | 303 | then (stakedByUser > zeroBigInt) | |
244 | 304 | else false) | |
245 | 305 | then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY))) | |
246 | 306 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
247 | 307 | ||
248 | 308 | ||
249 | 309 | func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = { | |
250 | 310 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
251 | 311 | let stakedTotal = toBigInt(readStaked(stakedTotalKEY)) | |
252 | 312 | let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt)) | |
253 | 313 | then oneBigInt | |
254 | 314 | else stakedTotal | |
255 | 315 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
256 | 316 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
257 | 317 | let MULT3 = 1000 | |
258 | 318 | let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3) | |
259 | 319 | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
260 | 320 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
261 | 321 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
262 | 322 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
263 | 323 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
264 | 324 | let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY) | |
265 | 325 | let wxPerLpOrZeroX3 = 0 | |
266 | 326 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
267 | 327 | let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0)) | |
268 | 328 | then toBigInt(wxPerLpOrZeroX3) | |
269 | 329 | else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal) | |
270 | 330 | let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount)) | |
271 | 331 | let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt)) | |
272 | 332 | then oneBigInt | |
273 | 333 | else stakedTotalNew | |
274 | 334 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh))) | |
275 | 335 | let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew) | |
276 | 336 | let wxPerLpIntegralLastUpdHeightNew = height | |
277 | 337 | let debug = makeString(["wxPerLpIntegralNew=", toString(wxPerLpIntegralNew), "dh=", toString(dh), "wxPerLpX3=", toString(wxPerLpX3), "stakedTotal=", toString(stakedTotal), "poolWxEmissionPerBlockX3=", toString(poolWxEmissionPerBlockX3), "wxEmissionPerBlockX3=", toString(wxEmissionPerBlockX3), "poolWeight=", toString(poolWeight)], "::") | |
278 | 338 | $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug) | |
279 | 339 | } | |
280 | 340 | ||
281 | 341 | ||
282 | 342 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
283 | - | let $ | |
284 | - | let wxPerLpIntegralNew = $ | |
285 | - | let poolIntegralSTATE = $ | |
286 | - | let poolDEBUG = $ | |
343 | + | let $t01423814360 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
344 | + | let wxPerLpIntegralNew = $t01423814360._1 | |
345 | + | let poolIntegralSTATE = $t01423814360._2 | |
346 | + | let poolDEBUG = $t01423814360._3 | |
287 | 347 | let MULT3 = 1000 | |
288 | 348 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
289 | 349 | let stakedByUser = readStaked(stakedByUserKEY) | |
290 | 350 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
291 | 351 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
292 | 352 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
293 | 353 | let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY) | |
294 | 354 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
295 | 355 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
296 | 356 | let MULT11 = (MULT8 * MULT3) | |
297 | 357 | let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))) | |
298 | 358 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
299 | 359 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
300 | 360 | 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)], "::") | |
301 | 361 | $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug) | |
302 | 362 | } | |
303 | 363 | ||
304 | 364 | ||
305 | 365 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
306 | 366 | case s: String => | |
307 | 367 | fromBase58String(s) | |
308 | 368 | case _: Unit => | |
309 | 369 | unit | |
310 | 370 | case _ => | |
311 | 371 | throw("Match error") | |
312 | 372 | } | |
313 | 373 | ||
314 | 374 | ||
315 | 375 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
316 | 376 | case s: String => | |
317 | 377 | fromBase58String(s) | |
318 | 378 | case _: Unit => | |
319 | 379 | unit | |
320 | 380 | case _ => | |
321 | 381 | throw("Match error") | |
322 | 382 | } | |
323 | 383 | ||
324 | 384 | ||
325 | 385 | func mustManager (i) = { | |
326 | 386 | let pd = throw("Permission denied") | |
327 | 387 | match managerPublicKeyOrUnit() { | |
328 | 388 | case pk: ByteVector => | |
329 | 389 | if ((i.callerPublicKey == pk)) | |
330 | 390 | then true | |
331 | 391 | else pd | |
332 | 392 | case _: Unit => | |
333 | 393 | if ((i.caller == this)) | |
334 | 394 | then true | |
335 | 395 | else pd | |
336 | 396 | case _ => | |
337 | 397 | throw("Match error") | |
338 | 398 | } | |
339 | 399 | } | |
340 | 400 | ||
341 | 401 | ||
342 | 402 | @Callable(i) | |
343 | 403 | func constructor (factoryAddressStr) = { | |
344 | 404 | let checkCaller = mustManager(i) | |
345 | 405 | if ((checkCaller == checkCaller)) | |
346 | 406 | then [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
347 | 407 | else throw("Strict value is not equal to itself.") | |
348 | 408 | } | |
349 | 409 | ||
350 | 410 | ||
351 | 411 | ||
352 | 412 | @Callable(i) | |
353 | 413 | func setManager (pendingManagerPublicKey) = { | |
354 | 414 | let checkCaller = mustManager(i) | |
355 | 415 | if ((checkCaller == checkCaller)) | |
356 | 416 | then { | |
357 | 417 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
358 | 418 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
359 | 419 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
360 | 420 | else throw("Strict value is not equal to itself.") | |
361 | 421 | } | |
362 | 422 | else throw("Strict value is not equal to itself.") | |
363 | 423 | } | |
364 | 424 | ||
365 | 425 | ||
366 | 426 | ||
367 | 427 | @Callable(i) | |
368 | 428 | func confirmManager () = { | |
369 | 429 | let pm = pendingManagerPublicKeyOrUnit() | |
370 | 430 | let hasPM = if (isDefined(pm)) | |
371 | 431 | then true | |
372 | 432 | else throw("No pending manager") | |
373 | 433 | if ((hasPM == hasPM)) | |
374 | 434 | then { | |
375 | 435 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
376 | 436 | then true | |
377 | 437 | else throw("You are not pending manager") | |
378 | 438 | if ((checkPM == checkPM)) | |
379 | 439 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
380 | 440 | else throw("Strict value is not equal to itself.") | |
381 | 441 | } | |
382 | 442 | else throw("Strict value is not equal to itself.") | |
383 | 443 | } | |
384 | 444 | ||
385 | 445 | ||
386 | 446 | ||
387 | 447 | @Callable(i) | |
388 | 448 | func stake () = if ((size(i.payments) != 1)) | |
389 | 449 | then throw("invalid payment - exact one payment must be attached") | |
390 | 450 | else { | |
391 | 451 | let pmt = i.payments[0] | |
392 | 452 | let lpAssetId = value(pmt.assetId) | |
393 | 453 | let lpAssetIdStr = toBase58String(lpAssetId) | |
394 | 454 | let amount = pmt.amount | |
395 | 455 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
396 | 456 | let callerStr = toString(i.caller) | |
397 | 457 | let userAddressStr = if ((callerStr == poolAddressStr)) | |
398 | 458 | then toString(i.originCaller) | |
399 | 459 | else callerStr | |
400 | 460 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
401 | 461 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
402 | 462 | let stakedByUser = readStaked(stakedByUserKEY) | |
403 | 463 | let stakedTotal = readStaked(stakedTotalKEY) | |
404 | - | let $ | |
405 | - | let wxToClaimUserNew = $ | |
406 | - | let integralSTATE = $ | |
407 | - | let debug = $ | |
464 | + | let $t01879118908 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
465 | + | let wxToClaimUserNew = $t01879118908._1 | |
466 | + | let integralSTATE = $t01879118908._2 | |
467 | + | let debug = $t01879118908._3 | |
408 | 468 | ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
409 | 469 | } | |
410 | 470 | ||
411 | 471 | ||
412 | 472 | ||
413 | 473 | @Callable(i) | |
414 | 474 | func unstake (lpAssetIdStr,amount) = { | |
415 | 475 | let lpAssetId = fromBase58String(lpAssetIdStr) | |
416 | 476 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
417 | 477 | let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr) | |
418 | 478 | let callerStr = toString(i.caller) | |
419 | 479 | let userAddressStr = if (if ((callerStr == poolAddressStr)) | |
420 | 480 | then true | |
421 | 481 | else (callerStr == poolAddon)) | |
422 | 482 | then toString(i.originCaller) | |
423 | 483 | else callerStr | |
424 | 484 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
425 | 485 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
426 | 486 | let stakedByUser = readStaked(stakedByUserKEY) | |
427 | 487 | let stakedTotal = readStaked(stakedTotalKEY) | |
428 | - | let $ | |
429 | - | let wxToClaimUserNew = $ | |
430 | - | let integralSTATE = $ | |
431 | - | let debug = $ | |
488 | + | let $t02004520163 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
489 | + | let wxToClaimUserNew = $t02004520163._1 | |
490 | + | let integralSTATE = $t02004520163._2 | |
491 | + | let debug = $t02004520163._3 | |
432 | 492 | if ((amount > stakedByUser)) | |
433 | 493 | then throw("passed amount is less then available") | |
434 | 494 | else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
435 | 495 | } | |
436 | 496 | ||
437 | 497 | ||
438 | 498 | ||
439 | 499 | @Callable(i) | |
440 | 500 | func claimWx (lpAssetIdStr) = { | |
441 | 501 | let userAddress = i.caller | |
442 | 502 | let userAddressStr = toString(i.caller) | |
443 | 503 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
444 | 504 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
445 | 505 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
446 | 506 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
447 | 507 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
448 | 508 | let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY)) | |
449 | 509 | let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY)) | |
450 | 510 | let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY)) | |
451 | - | let claimedTotal = | |
452 | - | let $ | |
453 | - | let wxToClaimUserNew = $ | |
454 | - | let integralSTATE = $ | |
455 | - | let debug = $ | |
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 | |
456 | 516 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
457 | 517 | if ((zeroBigInt >= availableToClaim)) | |
458 | 518 | then throw("nothing to claim") | |
459 | 519 | else { | |
460 | 520 | let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]) | |
461 | 521 | let minRewardPart = availableToClaim | |
462 | 522 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
463 | 523 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0]) | |
464 | 524 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil)) | |
465 | 525 | if ((emitBoost == emitBoost)) | |
466 | 526 | then { | |
467 | 527 | let claimedByUserValue = (claimedByUser + availableToClaim) | |
468 | 528 | let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart) | |
469 | 529 | let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart) | |
470 | 530 | let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart) | |
471 | 531 | [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)] | |
472 | 532 | } | |
473 | 533 | else throw("Strict value is not equal to itself.") | |
474 | 534 | } | |
475 | 535 | } | |
476 | 536 | ||
477 | 537 | ||
478 | 538 | ||
479 | 539 | @Callable(i) | |
480 | 540 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
481 | 541 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
482 | 542 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
483 | 543 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
484 | 544 | let stakedByUser = readStaked(stakedByUserKEY) | |
485 | 545 | let stakedTotal = readStaked(stakedTotalKEY) | |
486 | 546 | let claimedByUser = getIntOrZero(this, claimedByUserKEY) | |
487 | 547 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
488 | 548 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
489 | 549 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
490 | 550 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
491 | 551 | let passedBlocks = if ((emissionStartBlock > height)) | |
492 | 552 | then 0 | |
493 | 553 | else (height - emissionStartBlock) | |
494 | 554 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
495 | 555 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
496 | - | let $ | |
497 | - | let wxToClaimUserNew = $ | |
498 | - | let integralSTATE = $ | |
499 | - | let debug = $ | |
556 | + | let $t02417424286 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
557 | + | let wxToClaimUserNew = $t02417424286._1 | |
558 | + | let integralSTATE = $t02417424286._2 | |
559 | + | let debug = $t02417424286._3 | |
500 | 560 | let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser)) | |
501 | 561 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
502 | 562 | let wxAmountBoostTotal = asInt(boostInvResult[0]) | |
503 | 563 | let boostDebug = asString(boostInvResult[1]) | |
504 | 564 | let minRewardPart = availableToClaim | |
505 | 565 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
506 | 566 | let totalReward = (minRewardPart + boostRewardPart) | |
507 | 567 | $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)) | |
508 | 568 | } | |
509 | 569 | ||
510 | 570 | ||
511 | 571 | ||
512 | 572 | @Callable(i) | |
513 | 573 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
514 | 574 | then throw("permissions denied") | |
515 | 575 | else { | |
516 | - | let $ | |
517 | - | let wxPerLpIntegralNew = $ | |
518 | - | let poolIntegralSTATE = $ | |
519 | - | let poolDEBUG = $ | |
576 | + | let $t02519925309 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
577 | + | let wxPerLpIntegralNew = $t02519925309._1 | |
578 | + | let poolIntegralSTATE = $t02519925309._2 | |
579 | + | let poolDEBUG = $t02519925309._3 | |
520 | 580 | poolIntegralSTATE | |
521 | 581 | } | |
522 | 582 | ||
523 | 583 | ||
524 | 584 | @Verifier(tx) | |
525 | 585 | func verify () = { | |
526 | 586 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
527 | 587 | case pk: ByteVector => | |
528 | 588 | pk | |
529 | 589 | case _: Unit => | |
530 | 590 | tx.senderPublicKey | |
531 | 591 | case _ => | |
532 | 592 | throw("Match error") | |
533 | 593 | } | |
534 | 594 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
535 | 595 | } | |
536 | 596 |
github/deemru/w8io/169f3d6 98.52 ms ◑