tx · GihZqBwXRmFnye3dnwFz8p98tUoFR31rKqDagkZUerB1 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.02600000 Waves 2023.01.11 16:29 [2400353] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "GihZqBwXRmFnye3dnwFz8p98tUoFR31rKqDagkZUerB1", "fee": 2600000, "feeAssetId": null, "timestamp": 1673443722594, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "9u2J8jy6w4ZhcMziFBRmiyAXaTRV6igoR9HbCyBFkRDTz3G6neGpSj7zLybKieqD7gJ14BnLj3fAQvkJVCGEYnY" ], "script": "base64:BgJLCAISAwoBCBIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBgoEARgIGBIECgIYCBIECgIICBIECgIICBIDCgEIEgQKAggIYQAGU0NBTEU4AAgABU1VTFQ4AIDC1y8AB1NDQUxFMTgAEgAGTVVMVDE4CQC2AgEAgICQu7rWrfANAANTRVACAl9fAA5QT09MV0VJR0hUTVVMVAUFTVVMVDgACnplcm9CaWdJbnQJALYCAQAAAAlvbmVCaWdJbnQJALYCAQABAQd3cmFwRXJyAQNtc2cJAAIBCQC5CQIJAMwIAgINc3Rha2luZy5yaWRlOgkAzAgCCQClCAEFBHRoaXMJAMwIAgIBOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQlhc0FueUxpc3QBA3ZhbAQHJG1hdGNoMAUDdmFsAwkAAQIFByRtYXRjaDACCUxpc3RbQW55XQQKdmFsQW55THlzdAUHJG1hdGNoMAUKdmFsQW55THlzdAkAAgECG2ZhaWwgdG8gY2FzdCBpbnRvIExpc3RbQW55XQEFYXNJbnQ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N0b3J5Q29udHJhY3QJAAIBAhJwZXJtaXNzaW9ucyBkZW5pZWQEDSR0MDI5NjE1Mjk3MjUJARRyZWZyZXNoUG9vbElOVEVHUkFMUwMFDGxwQXNzZXRJZFN0cgUOcG9vbEFkZHJlc3NTdHIAAAQSd3hQZXJMcEludGVncmFsTmV3CAUNJHQwMjk2MTUyOTcyNQJfMQQRcG9vbEludGVncmFsU1RBVEUIBQ0kdDAyOTYxNTI5NzI1Al8yBAlwb29sREVCVUcIBQ0kdDAyOTYxNTI5NzI1Al8zBRFwb29sSW50ZWdyYWxTVEFURQECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tlebYcRv0=", "height": 2400353, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 251Mw6d5UbznYEarnuadiw52AaEm5TwgMcyqNXwbc84Q Next: 5F8TkD3c4fSyJZvPtrJ7MPGJgPRMHZjKH1FpjfcRpVNX Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | ||
18 | 18 | let oneBigInt = toBigInt(1) | |
19 | 19 | ||
20 | - | func wrapErr (msg) = throw(makeString(["staking.ride:", msg], " ")) | |
20 | + | func wrapErr (msg) = throw(makeString(["staking.ride:", toString(this), ":", msg], " ")) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func throwErr (msg) = throw(wrapErr(msg)) | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
360 | - | let $ | |
361 | - | let wxPerLpIntegralNew = $ | |
362 | - | let poolIntegralSTATE = $ | |
363 | - | let poolDEBUG = $ | |
360 | + | let $t01476314885 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
361 | + | let wxPerLpIntegralNew = $t01476314885._1 | |
362 | + | let poolIntegralSTATE = $t01476314885._2 | |
363 | + | let poolDEBUG = $t01476314885._3 | |
364 | 364 | let MULT3 = 1000 | |
365 | 365 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
366 | 366 | let stakedByUser = readStaked(stakedByUserKEY) | |
494 | 494 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
495 | 495 | let stakedByUser = readStaked(stakedByUserKEY) | |
496 | 496 | let stakedTotal = readStaked(stakedTotalKEY) | |
497 | - | let $ | |
498 | - | let wxToClaimUserNew = $ | |
499 | - | let integralSTATE = $ | |
500 | - | let debug = $ | |
497 | + | let $t01932119438 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
498 | + | let wxToClaimUserNew = $t01932119438._1 | |
499 | + | let integralSTATE = $t01932119438._2 | |
500 | + | let debug = $t01932119438._3 | |
501 | 501 | let listName = getUsersListName(lpAssetIdStr) | |
502 | 502 | let listActions = if (containsNode(listName, userAddressStr)) | |
503 | 503 | then nil | |
571 | 571 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
572 | 572 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
573 | 573 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
574 | - | let $ | |
575 | - | let wxToClaimUserNew = $ | |
576 | - | let integralSTATE = $ | |
577 | - | let debug = $ | |
574 | + | let $t02333023442 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
575 | + | let wxToClaimUserNew = $t02333023442._1 | |
576 | + | let integralSTATE = $t02333023442._2 | |
577 | + | let debug = $t02333023442._3 | |
578 | 578 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
579 | 579 | if ((zeroBigInt >= availableToClaim)) | |
580 | 580 | then throw("nothing to claim") | |
653 | 653 | else (height - emissionStartBlock) | |
654 | 654 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
655 | 655 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
656 | - | let $ | |
657 | - | let wxToClaimUserNew = $ | |
658 | - | let integralSTATE = $ | |
659 | - | let debug = $ | |
656 | + | let $t02699527107 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
657 | + | let wxToClaimUserNew = $t02699527107._1 | |
658 | + | let integralSTATE = $t02699527107._2 | |
659 | + | let debug = $t02699527107._3 | |
660 | 660 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
661 | 661 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
662 | 662 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
731 | 731 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
732 | 732 | then throw("permissions denied") | |
733 | 733 | else { | |
734 | - | let $ | |
735 | - | let wxPerLpIntegralNew = $ | |
736 | - | let poolIntegralSTATE = $ | |
737 | - | let poolDEBUG = $ | |
734 | + | let $t02961529725 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
735 | + | let wxPerLpIntegralNew = $t02961529725._1 | |
736 | + | let poolIntegralSTATE = $t02961529725._2 | |
737 | + | let poolDEBUG = $t02961529725._3 | |
738 | 738 | poolIntegralSTATE | |
739 | 739 | } | |
740 | 740 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
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 | - | func wrapErr (msg) = throw(makeString(["staking.ride:", msg], " ")) | |
20 | + | func wrapErr (msg) = throw(makeString(["staking.ride:", toString(this), ":", msg], " ")) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func throwErr (msg) = throw(wrapErr(msg)) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func asAnyList (val) = match val { | |
27 | 27 | case valAnyLyst: List[Any] => | |
28 | 28 | valAnyLyst | |
29 | 29 | case _ => | |
30 | 30 | throw("fail to cast into List[Any]") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func asInt (val) = match val { | |
35 | 35 | case valInt: Int => | |
36 | 36 | valInt | |
37 | 37 | case _ => | |
38 | 38 | throw("fail to cast into Int") | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func asString (val) = match val { | |
43 | 43 | case valStr: String => | |
44 | 44 | valStr | |
45 | 45 | case _ => | |
46 | 46 | throw("fail to cast into Int") | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func asByteVector (val) = match val { | |
51 | 51 | case valBin: ByteVector => | |
52 | 52 | valBin | |
53 | 53 | case _ => | |
54 | 54 | throw("fail to cast into Int") | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0"))) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) { | |
77 | 77 | case s: String => | |
78 | 78 | value(parseBigInt(s)) | |
79 | 79 | case _: Unit => | |
80 | 80 | defaultVal | |
81 | 81 | case _ => | |
82 | 82 | throw("Match error") | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyVotingEmissionContract () = "%s__votingEmissionContract" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | let IdxFactoryCfgStakingDapp = 1 | |
99 | 99 | ||
100 | 100 | let IdxFactoryCfgBoostingDapp = 2 | |
101 | 101 | ||
102 | 102 | let IdxFactoryCfgIdoDapp = 3 | |
103 | 103 | ||
104 | 104 | let IdxFactoryCfgTeamDapp = 4 | |
105 | 105 | ||
106 | 106 | let IdxFactoryCfgEmissionDapp = 5 | |
107 | 107 | ||
108 | 108 | let IdxFactoryCfgRestDapp = 6 | |
109 | 109 | ||
110 | 110 | let IdxFactoryCfgSlippageDapp = 7 | |
111 | 111 | ||
112 | 112 | func keyFactoryCfg () = "%s__factoryConfig" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyAddonAddr () = "%s__addonAddr" | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyFactoryLpList () = "%s__lpTokensList" | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | let factoryAddress = getStringOrFail(this, keyFactoryAddress()) | |
239 | 239 | ||
240 | 240 | let factoryContract = addressFromStringValue(factoryAddress) | |
241 | 241 | ||
242 | 242 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
243 | 243 | ||
244 | 244 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
245 | 245 | ||
246 | 246 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
247 | 247 | ||
248 | 248 | let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], SEP)), wrapErr("lp_staking_pools contract address is undefined"))), wrapErr("invalid lp_staking_pools contract address")) | |
249 | 249 | ||
250 | 250 | func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP) | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP) | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func containsNode (listName,id) = { | |
269 | 269 | let headOrUnit = getString(this, keyListHead(listName)) | |
270 | 270 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
271 | 271 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
272 | 272 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
273 | 273 | then true | |
274 | 274 | else (prevOrUnit != unit)) | |
275 | 275 | then true | |
276 | 276 | else (nextOrUnit != unit) | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func insertNodeActions (listName,id) = { | |
281 | 281 | let headOrUnit = getString(this, keyListHead(listName)) | |
282 | 282 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
283 | 283 | let checkNode = if (!(containsNode(listName, id))) | |
284 | 284 | then true | |
285 | 285 | else throw("Node exists") | |
286 | 286 | if ((checkNode == checkNode)) | |
287 | 287 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
288 | 288 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
289 | 289 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
290 | 290 | else throw("Strict value is not equal to itself.") | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func deleteNodeActions (listName,id) = { | |
295 | 295 | let headOrUnit = getString(this, keyListHead(listName)) | |
296 | 296 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
297 | 297 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
298 | 298 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
299 | 299 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
300 | 300 | then (nextOrUnit != unit) | |
301 | 301 | else false) | |
302 | 302 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
303 | 303 | else if ((nextOrUnit != unit)) | |
304 | 304 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
305 | 305 | else if ((prevOrUnit != unit)) | |
306 | 306 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
307 | 307 | else if ((id == valueOrElse(headOrUnit, ""))) | |
308 | 308 | then [DeleteEntry(keyListHead(listName))] | |
309 | 309 | else throw(((("invalid node: " + listName) + ".") + id)))) | |
310 | 310 | } | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt)) | |
314 | 314 | then (stakedByUser > zeroBigInt) | |
315 | 315 | else false) | |
316 | 316 | then zeroBigInt | |
317 | 317 | else if ((stakedByUser == zeroBigInt)) | |
318 | 318 | then wxPerLpIntegralNew | |
319 | 319 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt)) | |
320 | 320 | then (stakedByUser > zeroBigInt) | |
321 | 321 | else false) | |
322 | 322 | then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY))) | |
323 | 323 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
324 | 324 | ||
325 | 325 | ||
326 | 326 | func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = { | |
327 | 327 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
328 | 328 | let stakedTotal = toBigInt(readStaked(stakedTotalKEY)) | |
329 | 329 | let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt)) | |
330 | 330 | then oneBigInt | |
331 | 331 | else stakedTotal | |
332 | 332 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
333 | 333 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
334 | 334 | let MULT3 = 1000 | |
335 | 335 | let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3) | |
336 | 336 | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
337 | 337 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
338 | 338 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
339 | 339 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
340 | 340 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
341 | 341 | let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY) | |
342 | 342 | let wxPerLpOrZeroX3 = 0 | |
343 | 343 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
344 | 344 | let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0)) | |
345 | 345 | then toBigInt(wxPerLpOrZeroX3) | |
346 | 346 | else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal) | |
347 | 347 | let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount)) | |
348 | 348 | let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt)) | |
349 | 349 | then oneBigInt | |
350 | 350 | else stakedTotalNew | |
351 | 351 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh))) | |
352 | 352 | let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew) | |
353 | 353 | let wxPerLpIntegralLastUpdHeightNew = height | |
354 | 354 | let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::") | |
355 | 355 | $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug) | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
360 | - | let $ | |
361 | - | let wxPerLpIntegralNew = $ | |
362 | - | let poolIntegralSTATE = $ | |
363 | - | let poolDEBUG = $ | |
360 | + | let $t01476314885 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
361 | + | let wxPerLpIntegralNew = $t01476314885._1 | |
362 | + | let poolIntegralSTATE = $t01476314885._2 | |
363 | + | let poolDEBUG = $t01476314885._3 | |
364 | 364 | let MULT3 = 1000 | |
365 | 365 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
366 | 366 | let stakedByUser = readStaked(stakedByUserKEY) | |
367 | 367 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
368 | 368 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
369 | 369 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
370 | 370 | let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY) | |
371 | 371 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
372 | 372 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
373 | 373 | let MULT11 = (MULT8 * MULT3) | |
374 | 374 | let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt]) | |
375 | 375 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
376 | 376 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
377 | 377 | let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::") | |
378 | 378 | $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug) | |
379 | 379 | } | |
380 | 380 | ||
381 | 381 | ||
382 | 382 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
383 | 383 | case s: String => | |
384 | 384 | fromBase58String(s) | |
385 | 385 | case _: Unit => | |
386 | 386 | unit | |
387 | 387 | case _ => | |
388 | 388 | throw("Match error") | |
389 | 389 | } | |
390 | 390 | ||
391 | 391 | ||
392 | 392 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
393 | 393 | case s: String => | |
394 | 394 | fromBase58String(s) | |
395 | 395 | case _: Unit => | |
396 | 396 | unit | |
397 | 397 | case _ => | |
398 | 398 | throw("Match error") | |
399 | 399 | } | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | let permissionDeniedError = throw("Permission denied") | |
403 | 403 | ||
404 | 404 | func mustThis (i) = if ((i.caller == this)) | |
405 | 405 | then true | |
406 | 406 | else permissionDeniedError | |
407 | 407 | ||
408 | 408 | ||
409 | 409 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
410 | 410 | case pk: ByteVector => | |
411 | 411 | if ((i.callerPublicKey == pk)) | |
412 | 412 | then true | |
413 | 413 | else permissionDeniedError | |
414 | 414 | case _: Unit => | |
415 | 415 | if ((i.caller == this)) | |
416 | 416 | then true | |
417 | 417 | else permissionDeniedError | |
418 | 418 | case _ => | |
419 | 419 | throw("Match error") | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 | ||
423 | 423 | @Callable(i) | |
424 | 424 | func constructor (factoryAddressStr) = { | |
425 | 425 | let checkCaller = mustManager(i) | |
426 | 426 | if ((checkCaller == checkCaller)) | |
427 | 427 | then [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
428 | 428 | else throw("Strict value is not equal to itself.") | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | ||
433 | 433 | @Callable(i) | |
434 | 434 | func constructorV2 (votingEmissionContract) = { | |
435 | 435 | let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit)) | |
436 | 436 | then true | |
437 | 437 | else "invalid voting emission contract address"] | |
438 | 438 | if ((cheks == cheks)) | |
439 | 439 | then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)] | |
440 | 440 | else throw("Strict value is not equal to itself.") | |
441 | 441 | } | |
442 | 442 | ||
443 | 443 | ||
444 | 444 | ||
445 | 445 | @Callable(i) | |
446 | 446 | func setManager (pendingManagerPublicKey) = { | |
447 | 447 | let checkCaller = mustManager(i) | |
448 | 448 | if ((checkCaller == checkCaller)) | |
449 | 449 | then { | |
450 | 450 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
451 | 451 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
452 | 452 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
453 | 453 | else throw("Strict value is not equal to itself.") | |
454 | 454 | } | |
455 | 455 | else throw("Strict value is not equal to itself.") | |
456 | 456 | } | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | ||
460 | 460 | @Callable(i) | |
461 | 461 | func confirmManager () = { | |
462 | 462 | let pm = pendingManagerPublicKeyOrUnit() | |
463 | 463 | let hasPM = if (isDefined(pm)) | |
464 | 464 | then true | |
465 | 465 | else throw("No pending manager") | |
466 | 466 | if ((hasPM == hasPM)) | |
467 | 467 | then { | |
468 | 468 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
469 | 469 | then true | |
470 | 470 | else throw("You are not pending manager") | |
471 | 471 | if ((checkPM == checkPM)) | |
472 | 472 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
473 | 473 | else throw("Strict value is not equal to itself.") | |
474 | 474 | } | |
475 | 475 | else throw("Strict value is not equal to itself.") | |
476 | 476 | } | |
477 | 477 | ||
478 | 478 | ||
479 | 479 | ||
480 | 480 | @Callable(i) | |
481 | 481 | func stake () = if ((size(i.payments) != 1)) | |
482 | 482 | then throw("invalid payment - exact one payment must be attached") | |
483 | 483 | else { | |
484 | 484 | let pmt = i.payments[0] | |
485 | 485 | let lpAssetId = value(pmt.assetId) | |
486 | 486 | let lpAssetIdStr = toBase58String(lpAssetId) | |
487 | 487 | let amount = pmt.amount | |
488 | 488 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
489 | 489 | let callerStr = toString(i.caller) | |
490 | 490 | let userAddressStr = if ((callerStr == poolAddressStr)) | |
491 | 491 | then toString(i.originCaller) | |
492 | 492 | else callerStr | |
493 | 493 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
494 | 494 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
495 | 495 | let stakedByUser = readStaked(stakedByUserKEY) | |
496 | 496 | let stakedTotal = readStaked(stakedTotalKEY) | |
497 | - | let $ | |
498 | - | let wxToClaimUserNew = $ | |
499 | - | let integralSTATE = $ | |
500 | - | let debug = $ | |
497 | + | let $t01932119438 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
498 | + | let wxToClaimUserNew = $t01932119438._1 | |
499 | + | let integralSTATE = $t01932119438._2 | |
500 | + | let debug = $t01932119438._3 | |
501 | 501 | let listName = getUsersListName(lpAssetIdStr) | |
502 | 502 | let listActions = if (containsNode(listName, userAddressStr)) | |
503 | 503 | then nil | |
504 | 504 | else insertNodeActions(listName, userAddressStr) | |
505 | 505 | (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
506 | 506 | } | |
507 | 507 | ||
508 | 508 | ||
509 | 509 | ||
510 | 510 | @Callable(i) | |
511 | 511 | func unstake (lpAssetIdStr,amount) = { | |
512 | 512 | let lpAssetId = fromBase58String(lpAssetIdStr) | |
513 | 513 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
514 | 514 | let poolAddon = valueOrElse(getString(addressFromStringValue(poolAddressStr), keyAddonAddr()), poolAddressStr) | |
515 | 515 | let callerStr = toString(i.caller) | |
516 | 516 | let userAddressStr = if (if (if ((callerStr == poolAddressStr)) | |
517 | 517 | then (i.originCaller != lpStakingPoolsContract) | |
518 | 518 | else false) | |
519 | 519 | then true | |
520 | 520 | else (callerStr == poolAddon)) | |
521 | 521 | then toString(i.originCaller) | |
522 | 522 | else callerStr | |
523 | 523 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
524 | 524 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
525 | 525 | let stakedByUser = readStaked(stakedByUserKEY) | |
526 | 526 | let stakedTotal = readStaked(stakedTotalKEY) | |
527 | 527 | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
528 | 528 | let listName = getUsersListName(lpAssetIdStr) | |
529 | 529 | let listActions = if (if (containsNode(listName, userAddressStr)) | |
530 | 530 | then (amount == stakedByUser) | |
531 | 531 | else false) | |
532 | 532 | then deleteNodeActions(listName, userAddressStr) | |
533 | 533 | else nil | |
534 | 534 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
535 | 535 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
536 | 536 | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
537 | 537 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
538 | 538 | let r = if ((availableToClaim > zeroBigInt)) | |
539 | 539 | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
540 | 540 | else unit | |
541 | 541 | if ((r == r)) | |
542 | 542 | then if ((amount > stakedByUser)) | |
543 | 543 | then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY)) | |
544 | 544 | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
545 | 545 | else throw("Strict value is not equal to itself.") | |
546 | 546 | } | |
547 | 547 | ||
548 | 548 | ||
549 | 549 | ||
550 | 550 | @Callable(i) | |
551 | 551 | func claimWx (lpAssetIdStr) = { | |
552 | 552 | let userAddressStr = toString(i.caller) | |
553 | 553 | let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
554 | 554 | $Tuple2(nil, result) | |
555 | 555 | } | |
556 | 556 | ||
557 | 557 | ||
558 | 558 | ||
559 | 559 | @Callable(i) | |
560 | 560 | func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = { | |
561 | 561 | let checkCaller = mustThis(i) | |
562 | 562 | if ((checkCaller == checkCaller)) | |
563 | 563 | then { | |
564 | 564 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address") | |
565 | 565 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
566 | 566 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
567 | 567 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
568 | 568 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
569 | 569 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
570 | 570 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
571 | 571 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
572 | 572 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
573 | 573 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
574 | - | let $ | |
575 | - | let wxToClaimUserNew = $ | |
576 | - | let integralSTATE = $ | |
577 | - | let debug = $ | |
574 | + | let $t02333023442 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
575 | + | let wxToClaimUserNew = $t02333023442._1 | |
576 | + | let integralSTATE = $t02333023442._2 | |
577 | + | let debug = $t02333023442._3 | |
578 | 578 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
579 | 579 | if ((zeroBigInt >= availableToClaim)) | |
580 | 580 | then throw("nothing to claim") | |
581 | 581 | else { | |
582 | 582 | let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0]) | |
583 | 583 | let minRewardPart = availableToClaim | |
584 | 584 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
585 | 585 | let totalReward = (minRewardPart + boostRewardPart) | |
586 | 586 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0]) | |
587 | 587 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil)) | |
588 | 588 | if ((emitBoost == emitBoost)) | |
589 | 589 | then { | |
590 | 590 | let claimedByUserValue = (claimedByUser + availableToClaim) | |
591 | 591 | let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart) | |
592 | 592 | let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart) | |
593 | 593 | let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart) | |
594 | 594 | $Tuple2([StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)], toInt(totalReward)) | |
595 | 595 | } | |
596 | 596 | else throw("Strict value is not equal to itself.") | |
597 | 597 | } | |
598 | 598 | } | |
599 | 599 | else throw("Strict value is not equal to itself.") | |
600 | 600 | } | |
601 | 601 | ||
602 | 602 | ||
603 | 603 | ||
604 | 604 | @Callable(i) | |
605 | 605 | func claimWxBulkInternalREADONLY (currentIter,lpAssetIds,userAddressStr,resAcc) = if ((currentIter == size(lpAssetIds))) | |
606 | 606 | then $Tuple2(nil, resAcc) | |
607 | 607 | else { | |
608 | 608 | let lpAssetId = lpAssetIds[currentIter] | |
609 | 609 | let info = split({ | |
610 | 610 | let @ = invoke(this, "claimWxREADONLY", [lpAssetId, userAddressStr], nil) | |
611 | 611 | if ($isInstanceOf(@, "String")) | |
612 | 612 | then @ | |
613 | 613 | else throw(($getType(@) + " couldn't be cast to String")) | |
614 | 614 | }, SEP) | |
615 | 615 | let unclaimed = info[3] | |
616 | 616 | let claimed = info[4] | |
617 | 617 | let res = (resAcc :+ makeString(["%d%d", unclaimed, claimed], SEP)) | |
618 | 618 | let inv = { | |
619 | 619 | let @ = invoke(this, "claimWxBulkInternalREADONLY", [(currentIter + 1), lpAssetIds, userAddressStr, res], nil) | |
620 | 620 | if ($isInstanceOf(@, "List[Any]")) | |
621 | 621 | then @ | |
622 | 622 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
623 | 623 | } | |
624 | 624 | if ((inv == inv)) | |
625 | 625 | then $Tuple2(nil, inv) | |
626 | 626 | else throw("Strict value is not equal to itself.") | |
627 | 627 | } | |
628 | 628 | ||
629 | 629 | ||
630 | 630 | ||
631 | 631 | @Callable(i) | |
632 | 632 | func claimWxBulkREADONLY (lpAssetIds,userAddressStr) = { | |
633 | 633 | let res = invoke(this, "claimWxBulkInternalREADONLY", [0, lpAssetIds, userAddressStr, nil], nil) | |
634 | 634 | $Tuple2(nil, res) | |
635 | 635 | } | |
636 | 636 | ||
637 | 637 | ||
638 | 638 | ||
639 | 639 | @Callable(i) | |
640 | 640 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
641 | 641 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
642 | 642 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
643 | 643 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
644 | 644 | let stakedByUser = readStaked(stakedByUserKEY) | |
645 | 645 | let stakedTotal = readStaked(stakedTotalKEY) | |
646 | 646 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
647 | 647 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
648 | 648 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
649 | 649 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
650 | 650 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
651 | 651 | let passedBlocks = if ((emissionStartBlock > height)) | |
652 | 652 | then 0 | |
653 | 653 | else (height - emissionStartBlock) | |
654 | 654 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
655 | 655 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
656 | - | let $ | |
657 | - | let wxToClaimUserNew = $ | |
658 | - | let integralSTATE = $ | |
659 | - | let debug = $ | |
656 | + | let $t02699527107 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
657 | + | let wxToClaimUserNew = $t02699527107._1 | |
658 | + | let integralSTATE = $t02699527107._2 | |
659 | + | let debug = $t02699527107._3 | |
660 | 660 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
661 | 661 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
662 | 662 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
663 | 663 | let boostDebug = asString(boostInvResult[1]) | |
664 | 664 | let minRewardPart = availableToClaim | |
665 | 665 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
666 | 666 | let totalReward = (minRewardPart + boostRewardPart) | |
667 | 667 | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), "soon"], SEP)) | |
668 | 668 | } | |
669 | 669 | ||
670 | 670 | ||
671 | 671 | ||
672 | 672 | @Callable(i) | |
673 | 673 | func stakedByUserREADONLY (lpAssetIdStr,userAddressStr) = { | |
674 | 674 | let stakedByUser = valueOrElse(getInteger(keyStakedByUser(userAddressStr, lpAssetIdStr)), 0) | |
675 | 675 | $Tuple2(nil, stakedByUser) | |
676 | 676 | } | |
677 | 677 | ||
678 | 678 | ||
679 | 679 | ||
680 | 680 | @Callable(i) | |
681 | 681 | func usersListTraversal (lpAssetId) = { | |
682 | 682 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), ""))) | |
683 | 683 | then true | |
684 | 684 | else mustManager(i) | |
685 | 685 | if ((checkCaller == checkCaller)) | |
686 | 686 | then { | |
687 | 687 | let listName = getUsersListName(lpAssetId) | |
688 | 688 | let userOrUnit = getString(keyNextUser(lpAssetId)) | |
689 | 689 | let headOrUnit = getString(keyListHead(listName)) | |
690 | 690 | match userOrUnit { | |
691 | 691 | case _: Unit => | |
692 | 692 | match headOrUnit { | |
693 | 693 | case _: Unit => | |
694 | 694 | $Tuple2(nil, false) | |
695 | 695 | case head: String => | |
696 | 696 | $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true) | |
697 | 697 | case _ => | |
698 | 698 | throw("Match error") | |
699 | 699 | } | |
700 | 700 | case userAddress: String => | |
701 | 701 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress)) | |
702 | 702 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
703 | 703 | let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1 | |
704 | 704 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
705 | 705 | let r = if ((availableToClaim > zeroBigInt)) | |
706 | 706 | then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil) | |
707 | 707 | else unit | |
708 | 708 | if ((r == r)) | |
709 | 709 | then { | |
710 | 710 | let nextUserOrUnit = getString(keyListNext(listName, userAddress)) | |
711 | 711 | match nextUserOrUnit { | |
712 | 712 | case _: Unit => | |
713 | 713 | $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false) | |
714 | 714 | case nextUser: String => | |
715 | 715 | $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true) | |
716 | 716 | case _ => | |
717 | 717 | throw("Match error") | |
718 | 718 | } | |
719 | 719 | } | |
720 | 720 | else throw("Strict value is not equal to itself.") | |
721 | 721 | case _ => | |
722 | 722 | throw("Match error") | |
723 | 723 | } | |
724 | 724 | } | |
725 | 725 | else throw("Strict value is not equal to itself.") | |
726 | 726 | } | |
727 | 727 | ||
728 | 728 | ||
729 | 729 | ||
730 | 730 | @Callable(i) | |
731 | 731 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
732 | 732 | then throw("permissions denied") | |
733 | 733 | else { | |
734 | - | let $ | |
735 | - | let wxPerLpIntegralNew = $ | |
736 | - | let poolIntegralSTATE = $ | |
737 | - | let poolDEBUG = $ | |
734 | + | let $t02961529725 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
735 | + | let wxPerLpIntegralNew = $t02961529725._1 | |
736 | + | let poolIntegralSTATE = $t02961529725._2 | |
737 | + | let poolDEBUG = $t02961529725._3 | |
738 | 738 | poolIntegralSTATE | |
739 | 739 | } | |
740 | 740 | ||
741 | 741 | ||
742 | 742 | @Verifier(tx) | |
743 | 743 | func verify () = { | |
744 | 744 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
745 | 745 | case pk: ByteVector => | |
746 | 746 | pk | |
747 | 747 | case _: Unit => | |
748 | 748 | tx.senderPublicKey | |
749 | 749 | case _ => | |
750 | 750 | throw("Match error") | |
751 | 751 | } | |
752 | 752 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
753 | 753 | } | |
754 | 754 |
github/deemru/w8io/fabc49c 96.83 ms ◑