tx · 5gDoQabBG3oRZAkDKXQq23Fz3Rq2xVWvQ7sBd1CRqrZA 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.02700000 Waves 2023.01.11 16:55 [2400382] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "5gDoQabBG3oRZAkDKXQq23Fz3Rq2xVWvQ7sBd1CRqrZA", "fee": 2700000, "feeAssetId": null, "timestamp": 1673445281261, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "Gor5Mm8oD4EKpMha52kvAt2k6vtd1KjhirhYNLW495GuPaRxdLKPWM7qQxMJg79ciVN1ACvvjvaK6BLRgGbiYTW" ], "script": "base64:BgJLCAISAwoBCBIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBgoEARgIGBIECgIYCBIECgIICBIECgIICBIDCgEIEgQKAggIYQAGU0NBTEU4AAgABU1VTFQ4AIDC1y8AB1NDQUxFMTgAEgAGTVVMVDE4CQC2AgEAgICQu7rWrfANAANTRVACAl9fAA5QT09MV0VJR0hUTVVMVAUFTVVMVDgACnplcm9CaWdJbnQJALYCAQAAAAlvbmVCaWdJbnQJALYCAQABAQd3cmFwRXJyAQNtc2cJAAIBCQC5CQIJAMwIAgINc3Rha2luZy5yaWRlOgkAzAgCCQClCAEFBHRoaXMJAMwIAgUDbXNnBQNuaWwCASABCHRocm93RXJyAQNtc2cJAAIBCQEHd3JhcEVycgEFA21zZwEJYXNBbnlMaXN0AQN2YWwEByRtYXRjaDAFA3ZhbAMJAAECBQckbWF0Y2gwAglMaXN0W0FueV0ECnZhbEFueUx5c3QFByRtYXRjaDAFCnZhbEFueUx5c3QJAAIBAhtmYWlsIHRvIGNhc3QgaW50byBMaXN0W0FueV0BBWFzSW50AQ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ACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBDm9uTW9kaWZ5V2VpZ2h0AgxscEFzc2V0SWRTdHIOcG9vbEFkZHJlc3NTdHIDCQECIT0CCAUBaQZjYWxsZXIFD2ZhY3RvcnlDb250cmFjdAkAAgECEnBlcm1pc3Npb25zIGRlbmllZAQNJHQwMjk2MjkyOTczOQkBFHJlZnJlc2hQb29sSU5URUdSQUxTAwUMbHBBc3NldElkU3RyBQ5wb29sQWRkcmVzc1N0cgAABBJ3eFBlckxwSW50ZWdyYWxOZXcIBQ0kdDAyOTYyOTI5NzM5Al8xBBFwb29sSW50ZWdyYWxTVEFURQgFDSR0MDI5NjI5Mjk3MzkCXzIECXBvb2xERUJVRwgFDSR0MDI5NjI5Mjk3MzkCXzMFEXBvb2xJbnRlZ3JhbFNUQVRFAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5asviww==", "height": 2400382, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EDTfHekTcBW1zB1qPbg39UYZs8ofTjfxvjxTHax4VwEQ Next: FNuZtVcQfU3qYjpZ1ejvjQesbHXpuyknJ5MhxAM16s7w Diff:
Old | New | Differences | |
---|---|---|---|
245 | 245 | ||
246 | 246 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
247 | 247 | ||
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")) | |
248 | + | let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(boostingContract, 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 | ||
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 $t01477414896 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
361 | + | let wxPerLpIntegralNew = $t01477414896._1 | |
362 | + | let poolIntegralSTATE = $t01477414896._2 | |
363 | + | let poolDEBUG = $t01477414896._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 $t01933219449 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
498 | + | let wxToClaimUserNew = $t01933219449._1 | |
499 | + | let integralSTATE = $t01933219449._2 | |
500 | + | let debug = $t01933219449._3 | |
501 | 501 | let listName = getUsersListName(lpAssetIdStr) | |
502 | 502 | let listActions = if (containsNode(listName, userAddressStr)) | |
503 | 503 | then nil | |
575 | 575 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
576 | 576 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
577 | 577 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
578 | - | let $ | |
579 | - | let wxToClaimUserNew = $ | |
580 | - | let integralSTATE = $ | |
581 | - | let debug = $ | |
578 | + | let $t02334423456 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
579 | + | let wxToClaimUserNew = $t02334423456._1 | |
580 | + | let integralSTATE = $t02334423456._2 | |
581 | + | let debug = $t02334423456._3 | |
582 | 582 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
583 | 583 | if ((zeroBigInt >= availableToClaim)) | |
584 | 584 | then throw("nothing to claim") | |
657 | 657 | else (height - emissionStartBlock) | |
658 | 658 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
659 | 659 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
660 | - | let $ | |
661 | - | let wxToClaimUserNew = $ | |
662 | - | let integralSTATE = $ | |
663 | - | let debug = $ | |
660 | + | let $t02700927121 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
661 | + | let wxToClaimUserNew = $t02700927121._1 | |
662 | + | let integralSTATE = $t02700927121._2 | |
663 | + | let debug = $t02700927121._3 | |
664 | 664 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
665 | 665 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
666 | 666 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
735 | 735 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
736 | 736 | then throw("permissions denied") | |
737 | 737 | else { | |
738 | - | let $ | |
739 | - | let wxPerLpIntegralNew = $ | |
740 | - | let poolIntegralSTATE = $ | |
741 | - | let poolDEBUG = $ | |
738 | + | let $t02962929739 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
739 | + | let wxPerLpIntegralNew = $t02962929739._1 | |
740 | + | let poolIntegralSTATE = $t02962929739._2 | |
741 | + | let poolDEBUG = $t02962929739._3 | |
742 | 742 | poolIntegralSTATE | |
743 | 743 | } | |
744 | 744 |
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 | 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 | - | 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")) | |
248 | + | let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(boostingContract, 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 $t01477414896 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
361 | + | let wxPerLpIntegralNew = $t01477414896._1 | |
362 | + | let poolIntegralSTATE = $t01477414896._2 | |
363 | + | let poolDEBUG = $t01477414896._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 $t01933219449 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
498 | + | let wxToClaimUserNew = $t01933219449._1 | |
499 | + | let integralSTATE = $t01933219449._2 | |
500 | + | let debug = $t01933219449._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 | if ((userAddressStr == userAddressStr)) | |
524 | 524 | then { | |
525 | 525 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
526 | 526 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
527 | 527 | let stakedByUser = readStaked(stakedByUserKEY) | |
528 | 528 | let stakedTotal = readStaked(stakedTotalKEY) | |
529 | 529 | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
530 | 530 | let listName = getUsersListName(lpAssetIdStr) | |
531 | 531 | let listActions = if (if (containsNode(listName, userAddressStr)) | |
532 | 532 | then (amount == stakedByUser) | |
533 | 533 | else false) | |
534 | 534 | then deleteNodeActions(listName, userAddressStr) | |
535 | 535 | else nil | |
536 | 536 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
537 | 537 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
538 | 538 | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
539 | 539 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
540 | 540 | let r = if ((availableToClaim > zeroBigInt)) | |
541 | 541 | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
542 | 542 | else unit | |
543 | 543 | if ((r == r)) | |
544 | 544 | then if ((amount > stakedByUser)) | |
545 | 545 | then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY)) | |
546 | 546 | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
547 | 547 | else throw("Strict value is not equal to itself.") | |
548 | 548 | } | |
549 | 549 | else throw("Strict value is not equal to itself.") | |
550 | 550 | } | |
551 | 551 | ||
552 | 552 | ||
553 | 553 | ||
554 | 554 | @Callable(i) | |
555 | 555 | func claimWx (lpAssetIdStr) = { | |
556 | 556 | let userAddressStr = toString(i.caller) | |
557 | 557 | let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
558 | 558 | $Tuple2(nil, result) | |
559 | 559 | } | |
560 | 560 | ||
561 | 561 | ||
562 | 562 | ||
563 | 563 | @Callable(i) | |
564 | 564 | func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = { | |
565 | 565 | let checkCaller = mustThis(i) | |
566 | 566 | if ((checkCaller == checkCaller)) | |
567 | 567 | then { | |
568 | 568 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address") | |
569 | 569 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
570 | 570 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
571 | 571 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
572 | 572 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
573 | 573 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
574 | 574 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
575 | 575 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
576 | 576 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
577 | 577 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
578 | - | let $ | |
579 | - | let wxToClaimUserNew = $ | |
580 | - | let integralSTATE = $ | |
581 | - | let debug = $ | |
578 | + | let $t02334423456 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
579 | + | let wxToClaimUserNew = $t02334423456._1 | |
580 | + | let integralSTATE = $t02334423456._2 | |
581 | + | let debug = $t02334423456._3 | |
582 | 582 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
583 | 583 | if ((zeroBigInt >= availableToClaim)) | |
584 | 584 | then throw("nothing to claim") | |
585 | 585 | else { | |
586 | 586 | let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0]) | |
587 | 587 | let minRewardPart = availableToClaim | |
588 | 588 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
589 | 589 | let totalReward = (minRewardPart + boostRewardPart) | |
590 | 590 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0]) | |
591 | 591 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil)) | |
592 | 592 | if ((emitBoost == emitBoost)) | |
593 | 593 | then { | |
594 | 594 | let claimedByUserValue = (claimedByUser + availableToClaim) | |
595 | 595 | let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart) | |
596 | 596 | let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart) | |
597 | 597 | let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart) | |
598 | 598 | $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)) | |
599 | 599 | } | |
600 | 600 | else throw("Strict value is not equal to itself.") | |
601 | 601 | } | |
602 | 602 | } | |
603 | 603 | else throw("Strict value is not equal to itself.") | |
604 | 604 | } | |
605 | 605 | ||
606 | 606 | ||
607 | 607 | ||
608 | 608 | @Callable(i) | |
609 | 609 | func claimWxBulkInternalREADONLY (currentIter,lpAssetIds,userAddressStr,resAcc) = if ((currentIter == size(lpAssetIds))) | |
610 | 610 | then $Tuple2(nil, resAcc) | |
611 | 611 | else { | |
612 | 612 | let lpAssetId = lpAssetIds[currentIter] | |
613 | 613 | let info = split({ | |
614 | 614 | let @ = invoke(this, "claimWxREADONLY", [lpAssetId, userAddressStr], nil) | |
615 | 615 | if ($isInstanceOf(@, "String")) | |
616 | 616 | then @ | |
617 | 617 | else throw(($getType(@) + " couldn't be cast to String")) | |
618 | 618 | }, SEP) | |
619 | 619 | let unclaimed = info[3] | |
620 | 620 | let claimed = info[4] | |
621 | 621 | let res = (resAcc :+ makeString(["%d%d", unclaimed, claimed], SEP)) | |
622 | 622 | let inv = { | |
623 | 623 | let @ = invoke(this, "claimWxBulkInternalREADONLY", [(currentIter + 1), lpAssetIds, userAddressStr, res], nil) | |
624 | 624 | if ($isInstanceOf(@, "List[Any]")) | |
625 | 625 | then @ | |
626 | 626 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
627 | 627 | } | |
628 | 628 | if ((inv == inv)) | |
629 | 629 | then $Tuple2(nil, inv) | |
630 | 630 | else throw("Strict value is not equal to itself.") | |
631 | 631 | } | |
632 | 632 | ||
633 | 633 | ||
634 | 634 | ||
635 | 635 | @Callable(i) | |
636 | 636 | func claimWxBulkREADONLY (lpAssetIds,userAddressStr) = { | |
637 | 637 | let res = invoke(this, "claimWxBulkInternalREADONLY", [0, lpAssetIds, userAddressStr, nil], nil) | |
638 | 638 | $Tuple2(nil, res) | |
639 | 639 | } | |
640 | 640 | ||
641 | 641 | ||
642 | 642 | ||
643 | 643 | @Callable(i) | |
644 | 644 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
645 | 645 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
646 | 646 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
647 | 647 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
648 | 648 | let stakedByUser = readStaked(stakedByUserKEY) | |
649 | 649 | let stakedTotal = readStaked(stakedTotalKEY) | |
650 | 650 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
651 | 651 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
652 | 652 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
653 | 653 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
654 | 654 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
655 | 655 | let passedBlocks = if ((emissionStartBlock > height)) | |
656 | 656 | then 0 | |
657 | 657 | else (height - emissionStartBlock) | |
658 | 658 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
659 | 659 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
660 | - | let $ | |
661 | - | let wxToClaimUserNew = $ | |
662 | - | let integralSTATE = $ | |
663 | - | let debug = $ | |
660 | + | let $t02700927121 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
661 | + | let wxToClaimUserNew = $t02700927121._1 | |
662 | + | let integralSTATE = $t02700927121._2 | |
663 | + | let debug = $t02700927121._3 | |
664 | 664 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
665 | 665 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
666 | 666 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
667 | 667 | let boostDebug = asString(boostInvResult[1]) | |
668 | 668 | let minRewardPart = availableToClaim | |
669 | 669 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
670 | 670 | let totalReward = (minRewardPart + boostRewardPart) | |
671 | 671 | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), "soon"], SEP)) | |
672 | 672 | } | |
673 | 673 | ||
674 | 674 | ||
675 | 675 | ||
676 | 676 | @Callable(i) | |
677 | 677 | func stakedByUserREADONLY (lpAssetIdStr,userAddressStr) = { | |
678 | 678 | let stakedByUser = valueOrElse(getInteger(keyStakedByUser(userAddressStr, lpAssetIdStr)), 0) | |
679 | 679 | $Tuple2(nil, stakedByUser) | |
680 | 680 | } | |
681 | 681 | ||
682 | 682 | ||
683 | 683 | ||
684 | 684 | @Callable(i) | |
685 | 685 | func usersListTraversal (lpAssetId) = { | |
686 | 686 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), ""))) | |
687 | 687 | then true | |
688 | 688 | else mustManager(i) | |
689 | 689 | if ((checkCaller == checkCaller)) | |
690 | 690 | then { | |
691 | 691 | let listName = getUsersListName(lpAssetId) | |
692 | 692 | let userOrUnit = getString(keyNextUser(lpAssetId)) | |
693 | 693 | let headOrUnit = getString(keyListHead(listName)) | |
694 | 694 | match userOrUnit { | |
695 | 695 | case _: Unit => | |
696 | 696 | match headOrUnit { | |
697 | 697 | case _: Unit => | |
698 | 698 | $Tuple2(nil, false) | |
699 | 699 | case head: String => | |
700 | 700 | $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true) | |
701 | 701 | case _ => | |
702 | 702 | throw("Match error") | |
703 | 703 | } | |
704 | 704 | case userAddress: String => | |
705 | 705 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress)) | |
706 | 706 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
707 | 707 | let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1 | |
708 | 708 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
709 | 709 | let r = if ((availableToClaim > zeroBigInt)) | |
710 | 710 | then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil) | |
711 | 711 | else unit | |
712 | 712 | if ((r == r)) | |
713 | 713 | then { | |
714 | 714 | let nextUserOrUnit = getString(keyListNext(listName, userAddress)) | |
715 | 715 | match nextUserOrUnit { | |
716 | 716 | case _: Unit => | |
717 | 717 | $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false) | |
718 | 718 | case nextUser: String => | |
719 | 719 | $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true) | |
720 | 720 | case _ => | |
721 | 721 | throw("Match error") | |
722 | 722 | } | |
723 | 723 | } | |
724 | 724 | else throw("Strict value is not equal to itself.") | |
725 | 725 | case _ => | |
726 | 726 | throw("Match error") | |
727 | 727 | } | |
728 | 728 | } | |
729 | 729 | else throw("Strict value is not equal to itself.") | |
730 | 730 | } | |
731 | 731 | ||
732 | 732 | ||
733 | 733 | ||
734 | 734 | @Callable(i) | |
735 | 735 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
736 | 736 | then throw("permissions denied") | |
737 | 737 | else { | |
738 | - | let $ | |
739 | - | let wxPerLpIntegralNew = $ | |
740 | - | let poolIntegralSTATE = $ | |
741 | - | let poolDEBUG = $ | |
738 | + | let $t02962929739 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
739 | + | let wxPerLpIntegralNew = $t02962929739._1 | |
740 | + | let poolIntegralSTATE = $t02962929739._2 | |
741 | + | let poolDEBUG = $t02962929739._3 | |
742 | 742 | poolIntegralSTATE | |
743 | 743 | } | |
744 | 744 | ||
745 | 745 | ||
746 | 746 | @Verifier(tx) | |
747 | 747 | func verify () = { | |
748 | 748 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
749 | 749 | case pk: ByteVector => | |
750 | 750 | pk | |
751 | 751 | case _: Unit => | |
752 | 752 | tx.senderPublicKey | |
753 | 753 | case _ => | |
754 | 754 | throw("Match error") | |
755 | 755 | } | |
756 | 756 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
757 | 757 | } | |
758 | 758 |
github/deemru/w8io/fabc49c 93.87 ms ◑