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