tx · 9heaPi1NThZTuxzCg1yfszA6b4YefV7GErYeH45e7MmE 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.01400000 Waves 2022.03.17 13:27 [1967815] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "9heaPi1NThZTuxzCg1yfszA6b4YefV7GErYeH45e7MmE", "fee": 1400000, "feeAssetId": null, "timestamp": 1647512843669, "version": 1, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "qfFFqpmyECtSfJQa28NYsgrTS8xjRmj2SU2QuYf2rti78v3pYxyT3UihmSxmo9eDDR6Z1jqTvFodY4xWPpd1Z9K" ], "script": "base64:AAIFAAAAAAAAFtsIAhIICgYICAEBAQgSAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIECgIIARIDCgEIEgAaGQoBQRIUSWR4RmFjdG9yeUNmZ0Rhb0RhcHAaHwoBQhIaSWR4RmFjdG9yeUNmZ01hcmtldGluZ0RhcHAaHwoBQxIaSWR4RmFjdG9yeUNmZ0d3eFJld2FyZERhcHAaGwoBRBIWSWR4RmFjdG9yeUNmZ0JpcmRzRGFwcBoSCgFFEg1rZXlGYWN0b3J5Q2ZnGh8KAUYSGmtleUZhY3RvcnlMcDJBc3NldHNNYXBwaW5nGg8KAUcSCmxwQXNzZXRTdHIaFQoBSBIQa2V5RmFjdG9yeUxwTGlzdBorCgFJEiZrZXlGYWN0b3J5THBBc3NldFRvUG9vbENvbnRyYWN0QWRkcmVzcxoZCgFKEhRrZXlGYWN0b3J5UG9vbFdlaWdodBoUCgFLEg9jb250cmFjdEFkZHJlc3MaIAoBTBIba2V5RmFjdG9yeVBvb2xXZWlnaHRIaXN0b3J5GhAKAU0SC3Bvb2xBZGRyZXNzGggKAU4SA251bRodCgFPEhhyZWF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JAAH0AAAAAwgFAAAAAmRSAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACZFIAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJkVE4n94w=", "chainId": 84, "height": 1967815, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HnAN5fcy312uGAVtMs9ZCcoBEU51nyRf3PyNe4DH7mw1 Next: 4vPaHqZC5m7isPt1EnhiRwn2YVmPVRaf91eGUNUipm14 Diff:
Old | New | Differences | |
---|---|---|---|
340 | 340 | } | |
341 | 341 | ||
342 | 342 | ||
343 | - | func | |
343 | + | func calcUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
344 | 344 | let EMPTY = "empty" | |
345 | 345 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
346 | 346 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
347 | 347 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
348 | 348 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
349 | - | let gwxAmountCalc = calcGwxAmount(k, b, | |
349 | + | let gwxAmountCalc = calcGwxAmount(k, b, targetHeight) | |
350 | 350 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
351 | 351 | then 0 | |
352 | 352 | else gwxAmountCalc | |
353 | 353 | gwxAmount | |
354 | 354 | } | |
355 | + | ||
356 | + | ||
357 | + | func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height) | |
355 | 358 | ||
356 | 359 | ||
357 | 360 | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
364 | 367 | let userNumStr = userRecordArray[IdxLockUserNum] | |
365 | 368 | let gwxRewardEmissionStartHeight = valueOrElse(getInteger(gwxRewardContract, keyGwxRewardEmissionStartHeight()), 0) | |
366 | 369 | let EMPTYSTR = "empty" | |
367 | - | let $ | |
370 | + | let $t01317413742 = if ((lpAssetIdStr != EMPTYSTR)) | |
368 | 371 | then { | |
369 | 372 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
370 | 373 | let pw1 = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
374 | 377 | else if (readOnly) | |
375 | 378 | then $Tuple2(0, 0) | |
376 | 379 | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
377 | - | let poolWeight0 = $ | |
378 | - | let poolWeight1 = $ | |
380 | + | let poolWeight0 = $t01317413742._1 | |
381 | + | let poolWeight1 = $t01317413742._2 | |
379 | 382 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
380 | 383 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
381 | 384 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
593 | 596 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
594 | 597 | then throw("permissions denied") | |
595 | 598 | else { | |
596 | - | let $ | |
597 | - | let userBoostAvailable = $ | |
598 | - | let dataState = $ | |
599 | - | let debug = $ | |
599 | + | let $t02794228044 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
600 | + | let userBoostAvailable = $t02794228044._1 | |
601 | + | let dataState = $t02794228044._2 | |
602 | + | let debug = $t02794228044._3 | |
600 | 603 | $Tuple2(dataState, [userBoostAvailable]) | |
601 | 604 | } | |
602 | 605 | ||
604 | 607 | ||
605 | 608 | @Callable(i) | |
606 | 609 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
607 | - | let $ | |
608 | - | let userBoostAvailable = $ | |
609 | - | let dataState = $ | |
610 | - | let debug = $ | |
610 | + | let $t02817628277 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
611 | + | let userBoostAvailable = $t02817628277._1 | |
612 | + | let dataState = $t02817628277._2 | |
613 | + | let debug = $t02817628277._3 | |
611 | 614 | $Tuple2(nil, [userBoostAvailable, debug]) | |
612 | 615 | } | |
613 | 616 | ||
640 | 643 | func gwxUserInfoREADONLY (userAddress) = { | |
641 | 644 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
642 | 645 | $Tuple2(nil, [gwxAmount]) | |
646 | + | } | |
647 | + | ||
648 | + | ||
649 | + | ||
650 | + | @Callable(i) | |
651 | + | func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = { | |
652 | + | let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight) | |
653 | + | $Tuple2(nil, gwxAmount) | |
643 | 654 | } | |
644 | 655 | ||
645 | 656 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let SCALE8 = 8 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let POOLWEIGHTMULT = MULT8 | |
11 | 11 | ||
12 | 12 | func strf (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func abs (val) = if ((0 > val)) | |
25 | 25 | then -(val) | |
26 | 26 | else val | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func asAnyList (val) = match val { | |
30 | 30 | case valAnyLyst: List[Any] => | |
31 | 31 | valAnyLyst | |
32 | 32 | case _ => | |
33 | 33 | throw("fail to cast into List[Any]") | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func asInt (val) = match val { | |
38 | 38 | case valInt: Int => | |
39 | 39 | valInt | |
40 | 40 | case _ => | |
41 | 41 | throw("fail to cast into Int") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let IdxFactoryCfgStakingDapp = 1 | |
49 | 49 | ||
50 | 50 | let IdxFactoryCfgBoostingDapp = 2 | |
51 | 51 | ||
52 | 52 | let IdxFactoryCfgIdoDapp = 3 | |
53 | 53 | ||
54 | 54 | let IdxFactoryCfgTeamDapp = 4 | |
55 | 55 | ||
56 | 56 | let IdxFactoryCfgEmissionDapp = 5 | |
57 | 57 | ||
58 | 58 | let IdxFactoryCfgRestDapp = 6 | |
59 | 59 | ||
60 | 60 | let IdxFactoryCfgSlippageDapp = 7 | |
61 | 61 | ||
62 | 62 | let IdxFactoryCfgDaoDapp = 8 | |
63 | 63 | ||
64 | 64 | let IdxFactoryCfgMarketingDapp = 9 | |
65 | 65 | ||
66 | 66 | let IdxFactoryCfgGwxRewardDapp = 10 | |
67 | 67 | ||
68 | 68 | let IdxFactoryCfgBirdsDapp = 11 | |
69 | 69 | ||
70 | 70 | func keyFactoryCfg () = "%s__factoryConfig" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyFactoryLpList () = "%s__lpTokensList" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func readFactoryAddressOrFail () = addressFromStringValue(strf(this, keyFactoryAddress())) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func readFactoryCfgOrFail (factory) = split(strf(factory, keyFactoryCfg()), SEP) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
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 keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyNextPeriod () = "%s__nextPeriod" | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | let IdxCfgAssetId = 1 | |
137 | 137 | ||
138 | 138 | let IdxCfgMinLockAmount = 2 | |
139 | 139 | ||
140 | 140 | let IdxCfgMinLockDuration = 3 | |
141 | 141 | ||
142 | 142 | let IdxCfgMaxLockDuration = 4 | |
143 | 143 | ||
144 | 144 | let IdxCfgMathContract = 5 | |
145 | 145 | ||
146 | 146 | func keyConfig () = "%s__config" | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func readConfigArrayOrFail () = split(strf(this, keyConfig()), SEP) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
159 | 159 | case s: String => | |
160 | 160 | fromBase58String(s) | |
161 | 161 | case _: Unit => | |
162 | 162 | unit | |
163 | 163 | case _ => | |
164 | 164 | throw("Match error") | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
169 | 169 | case s: String => | |
170 | 170 | fromBase58String(s) | |
171 | 171 | case _: Unit => | |
172 | 172 | unit | |
173 | 173 | case _ => | |
174 | 174 | throw("Match error") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func mustManager (i) = { | |
179 | 179 | let pd = throw("Permission denied") | |
180 | 180 | match managerPublicKeyOrUnit() { | |
181 | 181 | case pk: ByteVector => | |
182 | 182 | if ((i.callerPublicKey == pk)) | |
183 | 183 | then true | |
184 | 184 | else pd | |
185 | 185 | case _: Unit => | |
186 | 186 | if ((i.caller == this)) | |
187 | 187 | then true | |
188 | 188 | else pd | |
189 | 189 | case _ => | |
190 | 190 | throw("Match error") | |
191 | 191 | } | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | let IdxLockUserNum = 1 | |
196 | 196 | ||
197 | 197 | let IdxLockAmount = 2 | |
198 | 198 | ||
199 | 199 | let IdxLockStart = 3 | |
200 | 200 | ||
201 | 201 | let IdxLockDuration = 4 | |
202 | 202 | ||
203 | 203 | let IdxLockParamK = 5 | |
204 | 204 | ||
205 | 205 | let IdxLockParamB = 6 | |
206 | 206 | ||
207 | 207 | func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func readLockParamsRecordOrFail (userAddress) = split(strf(this, keyLockParamsRecord(userAddress)), SEP) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func formatLockParamsRecordS (userNum,amount,start,duration,paramK,paramB,lastUpdTimestamp,gwxAmount) = makeString(["%d%d%d%d%d%d%d%d", userNum, amount, start, duration, paramK, paramB, lastUpdTimestamp, gwxAmount], SEP) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func formatLockParamsRecord (userNum,amount,start,duration,paramK,paramB,gwxAmount) = formatLockParamsRecordS(userNum, toString(amount), toString(start), toString(duration), toString(paramK), toString(paramB), toString(lastBlock.timestamp), toString(gwxAmount)) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func keyNextUserNum () = "%s__nextUserNum" | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func keyStatsLocksCount () = "%s%s__stats__locksCount" | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func keyStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastInt", userNum, lpAssetId], SEP) | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
274 | 274 | ||
275 | 275 | ||
276 | 276 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | let factoryContract = readFactoryAddressOrFail() | |
283 | 283 | ||
284 | 284 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
285 | 285 | ||
286 | 286 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
287 | 287 | ||
288 | 288 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
289 | 289 | ||
290 | 290 | let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg) | |
291 | 291 | ||
292 | 292 | func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = { | |
293 | 293 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
294 | 294 | let historyDATA = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(lockStart), toString(duration), toString(k), toString(b)], SEP) | |
295 | 295 | StringEntry(historyKEY, historyDATA) | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
300 | 300 | let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks() | |
301 | 301 | let locksCountKEY = keyStatsLocksCount() | |
302 | 302 | let usersCountKEY = keyStatsUsersCount() | |
303 | 303 | let totalAmountKEY = keyLockParamTotalAmount() | |
304 | 304 | let locksDurationSumInBlocks = getIntOrZero(this, locksDurationSumInBlocksKEY) | |
305 | 305 | let locksCount = getIntOrZero(this, locksCountKEY) | |
306 | 306 | let usersCount = getIntOrZero(this, usersCountKEY) | |
307 | 307 | let totalAmount = getIntOrZero(this, totalAmountKEY) | |
308 | 308 | [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))] | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | func calcGwxAmount (kRaw,bRaw,h) = { | |
313 | 313 | let SCALE = 1000 | |
314 | 314 | (((kRaw * h) + bRaw) / SCALE) | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = { | |
319 | 319 | let userAmountKEY = keyLockParamUserAmount(userNum) | |
320 | 320 | let startBlockKEY = keyLockParamStartBlock(userNum) | |
321 | 321 | let durationKEY = keyLockParamDuration(userNum) | |
322 | 322 | let kKEY = keyLockParamK(userNum) | |
323 | 323 | let bKEY = keyLockParamB(userNum) | |
324 | 324 | let kByPeriodKEY = keyLockParamByPeriodK(userNum, period) | |
325 | 325 | let bByPeriodKEY = keyLockParamByPeriodB(userNum, period) | |
326 | 326 | let gwxAmount = calcGwxAmount(k, b, height) | |
327 | 327 | [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPeriodKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))] | |
328 | 328 | } | |
329 | 329 | ||
330 | 330 | ||
331 | 331 | func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1)) | |
332 | 332 | then throw("only one payment is allowed") | |
333 | 333 | else if ((size(i.payments) == 0)) | |
334 | 334 | then 0 | |
335 | 335 | else { | |
336 | 336 | let pmt = i.payments[0] | |
337 | 337 | if ((value(pmt.assetId) != expectedAssetId)) | |
338 | 338 | then throw("invalid asset id in payment") | |
339 | 339 | else pmt.amount | |
340 | 340 | } | |
341 | 341 | ||
342 | 342 | ||
343 | - | func | |
343 | + | func calcUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
344 | 344 | let EMPTY = "empty" | |
345 | 345 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
346 | 346 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
347 | 347 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
348 | 348 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
349 | - | let gwxAmountCalc = calcGwxAmount(k, b, | |
349 | + | let gwxAmountCalc = calcGwxAmount(k, b, targetHeight) | |
350 | 350 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
351 | 351 | then 0 | |
352 | 352 | else gwxAmountCalc | |
353 | 353 | gwxAmount | |
354 | 354 | } | |
355 | + | ||
356 | + | ||
357 | + | func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height) | |
355 | 358 | ||
356 | 359 | ||
357 | 360 | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
358 | 361 | let EMPTY = "EMPTY" | |
359 | 362 | let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY) | |
360 | 363 | if ((userRecordOrEmpty == EMPTY)) | |
361 | 364 | then $Tuple3(0, nil, "userRecord::is::empty") | |
362 | 365 | else { | |
363 | 366 | let userRecordArray = split(userRecordOrEmpty, SEP) | |
364 | 367 | let userNumStr = userRecordArray[IdxLockUserNum] | |
365 | 368 | let gwxRewardEmissionStartHeight = valueOrElse(getInteger(gwxRewardContract, keyGwxRewardEmissionStartHeight()), 0) | |
366 | 369 | let EMPTYSTR = "empty" | |
367 | - | let $ | |
370 | + | let $t01317413742 = if ((lpAssetIdStr != EMPTYSTR)) | |
368 | 371 | then { | |
369 | 372 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
370 | 373 | let pw1 = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
371 | 374 | let pw0 = valueOrElse(getInteger(factoryContract, keyFactoryPoolWeightHistory(poolAddressStr, 0)), pw1) | |
372 | 375 | $Tuple2(pw0, pw1) | |
373 | 376 | } | |
374 | 377 | else if (readOnly) | |
375 | 378 | then $Tuple2(0, 0) | |
376 | 379 | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
377 | - | let poolWeight0 = $ | |
378 | - | let poolWeight1 = $ | |
380 | + | let poolWeight0 = $t01317413742._1 | |
381 | + | let poolWeight1 = $t01317413742._2 | |
379 | 382 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
380 | 383 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
381 | 384 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
382 | 385 | let h = if ((height > emissionEnd)) | |
383 | 386 | then emissionEnd | |
384 | 387 | else height | |
385 | 388 | let dh = max([(h - emissionStart), 0]) | |
386 | 389 | let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr) | |
387 | 390 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
388 | 391 | let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), getIntOrZero(this, userBoostEmissionLastIntegralKEY)) | |
389 | 392 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
390 | 393 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
391 | 394 | let udh = fraction(userBoostEmissionIntegral, 3, (2 * wxEmissionPerBlock)) | |
392 | 395 | let uLastH = (h - udh) | |
393 | 396 | let udh0 = max([(gwxRewardEmissionStartHeight - uLastH), 0]) | |
394 | 397 | let udh1 = ((h - uLastH) - udh0) | |
395 | 398 | if (if (if ((0 > uLastH)) | |
396 | 399 | then true | |
397 | 400 | else (0 > udh1)) | |
398 | 401 | then true | |
399 | 402 | else (abs(((udh0 + udh1) - udh)) >= 1)) | |
400 | 403 | then throw(((((((("invalid udh calc: udh=" + toString(udh)) + " uLastH=") + toString(uLastH)) + " udh0=") + toString(udh0)) + " udh1=") + toString(udh1))) | |
401 | 404 | else if ((0 > userBoostEmissionIntegral)) | |
402 | 405 | then throw("wrong calculations") | |
403 | 406 | else { | |
404 | 407 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
405 | 408 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
406 | 409 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
407 | 410 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
408 | 411 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
409 | 412 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
410 | 413 | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
411 | 414 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
412 | 415 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
413 | 416 | let userBoostEmissionIntegral0 = fraction(userBoostEmissionIntegral, udh0, udh) | |
414 | 417 | let userBoostEmissionIntegral1 = fraction(userBoostEmissionIntegral, udh1, udh) | |
415 | 418 | let poolUserBoostEmissionIntegral0 = fraction(userBoostEmissionIntegral0, poolWeight0, POOLWEIGHTMULT) | |
416 | 419 | let poolUserBoostEmissionIntegral1 = fraction(userBoostEmissionIntegral1, poolWeight1, POOLWEIGHTMULT) | |
417 | 420 | let userBoostAvaliableToClaimTotalNew0 = if ((totalCachedGwx == 0)) | |
418 | 421 | then 0 | |
419 | 422 | else fraction(poolUserBoostEmissionIntegral0, userCurrGwx, totalCachedGwx) | |
420 | 423 | let userBoostAvaliableToClaimTotalNew1 = if ((totalCachedGwx == 0)) | |
421 | 424 | then 0 | |
422 | 425 | else fraction(poolUserBoostEmissionIntegral1, userCurrGwx, totalCachedGwx) | |
423 | 426 | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotalNew0 + userBoostAvaliableToClaimTotalNew1) | |
424 | 427 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
425 | 428 | let userBoostClaimed = getIntOrZero(this, userBoostClaimedKEY) | |
426 | 429 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
427 | 430 | let dataState = [IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] | |
428 | 431 | let debug = makeString([("userBoostEmissionLastIntegral=" + toString(userBoostEmissionLastIntegral)), ("userBoostEmissionIntegral=" + toString(userBoostEmissionIntegral)), ("userMaxBoostInt=" + toString(userMaxBoostInt)), ("totalMaxBoostInt=" + toString(totalMaxBoostInt)), ("userBoostAvaliableToClaimTotal=" + toString(userBoostAvaliableToClaimTotal)), ("userBoostAvaliableToClaimTotalNew=" + toString(userBoostAvaliableToClaimTotalNew)), ("userBoostClaimed=" + toString(userBoostClaimed)), ("userBoostAvailable=" + toString(userBoostAvailable)), ("userBoostEmissionIntegral0=" + toString(userBoostEmissionIntegral0)), ("userBoostEmissionIntegral1=" + toString(userBoostEmissionIntegral1)), ("poolUserBoostEmissionIntegral0=" + toString(poolUserBoostEmissionIntegral0)), ("poolUserBoostEmissionIntegral1=" + toString(poolUserBoostEmissionIntegral1)), ("poolWeight0=" + toString(poolWeight0)), ("poolWeight1=" + toString(poolWeight1)), ("h=" + toString(h)), ("udh=" + toString(udh)), ("uLastH=" + toString(uLastH)), ("udh0=" + toString(udh0)), ("udh1=" + toString(udh1)), ("userCurrGwx=" + toString(userCurrGwx)), ("totalCachedGwx=" + toString(totalCachedGwx))], "::") | |
429 | 432 | $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug) | |
430 | 433 | } | |
431 | 434 | } | |
432 | 435 | } | |
433 | 436 | ||
434 | 437 | ||
435 | 438 | @Callable(i) | |
436 | 439 | func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = { | |
437 | 440 | let checkCaller = mustManager(i) | |
438 | 441 | if ((checkCaller == checkCaller)) | |
439 | 442 | then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0)) | |
440 | 443 | else throw("Strict value is not equal to itself.") | |
441 | 444 | } | |
442 | 445 | ||
443 | 446 | ||
444 | 447 | ||
445 | 448 | @Callable(i) | |
446 | 449 | func lock (duration) = { | |
447 | 450 | let cfgArray = readConfigArrayOrFail() | |
448 | 451 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
449 | 452 | let assetId = fromBase58String(assetIdStr) | |
450 | 453 | let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount]) | |
451 | 454 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
452 | 455 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
453 | 456 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
454 | 457 | if ((size(i.payments) != 1)) | |
455 | 458 | then throw("invalid payment - exact one payment must be attached") | |
456 | 459 | else { | |
457 | 460 | let pmt = i.payments[0] | |
458 | 461 | let pmtAmount = pmt.amount | |
459 | 462 | if ((assetId != value(pmt.assetId))) | |
460 | 463 | then throw((("invalid asset is in payment - " + assetIdStr) + " is expected")) | |
461 | 464 | else { | |
462 | 465 | let nextUserNumKEY = keyNextUserNum() | |
463 | 466 | let userAddressStr = toString(i.caller) | |
464 | 467 | let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr))) | |
465 | 468 | let userNumStr = if (userIsExisting) | |
466 | 469 | then value(getString(keyUser2NumMapping(userAddressStr))) | |
467 | 470 | else toString(getIntOrFail(this, nextUserNumKEY)) | |
468 | 471 | let userNum = parseIntValue(userNumStr) | |
469 | 472 | let lockStart = height | |
470 | 473 | let startBlockKEY = keyLockParamStartBlock(userNumStr) | |
471 | 474 | let durationKEY = keyLockParamDuration(userNumStr) | |
472 | 475 | let userAmountKEY = keyLockParamUserAmount(userNumStr) | |
473 | 476 | if ((minLockAmount > pmtAmount)) | |
474 | 477 | then throw(("amount is less then minLockAmount=" + toString(minLockAmount))) | |
475 | 478 | else if ((minLockDuration > duration)) | |
476 | 479 | then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration))) | |
477 | 480 | else if ((duration > maxLockDuration)) | |
478 | 481 | then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
479 | 482 | else if (if (userIsExisting) | |
480 | 483 | then ((getIntOrFail(this, startBlockKEY) + getIntOrFail(this, durationKEY)) >= lockStart) | |
481 | 484 | else false) | |
482 | 485 | then throw("there is an active lock - consider to use increaseLock") | |
483 | 486 | else if ((getIntOrZero(this, userAmountKEY) > 0)) | |
484 | 487 | then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY)) | |
485 | 488 | else { | |
486 | 489 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
487 | 490 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
488 | 491 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil)) | |
489 | 492 | let k = asInt(gWxParamsResultList[0]) | |
490 | 493 | let b = asInt(gWxParamsResultList[1]) | |
491 | 494 | let period = toString(asInt(gWxParamsResultList[2])) | |
492 | 495 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
493 | 496 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
494 | 497 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
495 | 498 | let h = if ((height > emissionEnd)) | |
496 | 499 | then emissionEnd | |
497 | 500 | else height | |
498 | 501 | let dh = max([(h - emissionStart), 0]) | |
499 | 502 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
500 | 503 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
501 | 504 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
502 | 505 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
503 | 506 | let userMaxBoostInt = ((gWxAmountStart * duration) / 2) | |
504 | 507 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
505 | 508 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
506 | 509 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
507 | 510 | let arr = if (userIsExisting) | |
508 | 511 | then nil | |
509 | 512 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
510 | 513 | ((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
511 | 514 | then 0 | |
512 | 515 | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gWxAmountStart))]) | |
513 | 516 | } | |
514 | 517 | } | |
515 | 518 | } | |
516 | 519 | } | |
517 | 520 | ||
518 | 521 | ||
519 | 522 | ||
520 | 523 | @Callable(i) | |
521 | 524 | func increaseLock (deltaDuration) = { | |
522 | 525 | let cfgArray = readConfigArrayOrFail() | |
523 | 526 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
524 | 527 | let assetId = fromBase58String(assetIdStr) | |
525 | 528 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
526 | 529 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
527 | 530 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
528 | 531 | let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId) | |
529 | 532 | let userAddressStr = toString(i.caller) | |
530 | 533 | let userRecordArray = readLockParamsRecordOrFail(userAddressStr) | |
531 | 534 | let userNumStr = userRecordArray[IdxLockUserNum] | |
532 | 535 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
533 | 536 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
534 | 537 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
535 | 538 | let lockEnd = (lockStart + lockDuration) | |
536 | 539 | let remainingDuration = max([(lockEnd - height), 0]) | |
537 | 540 | let userAmountNew = (userAmount + pmtAmount) | |
538 | 541 | let lockDurationNew = (remainingDuration + deltaDuration) | |
539 | 542 | if ((0 > deltaDuration)) | |
540 | 543 | then throw("duration is less then zero") | |
541 | 544 | else if ((minLockDuration > lockDurationNew)) | |
542 | 545 | then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration))) | |
543 | 546 | else if ((lockDurationNew > maxLockDuration)) | |
544 | 547 | then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
545 | 548 | else { | |
546 | 549 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration) | |
547 | 550 | let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
548 | 551 | let lockStartNew = height | |
549 | 552 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil)) | |
550 | 553 | let k = asInt(gWxParamsResultList[0]) | |
551 | 554 | let b = asInt(gWxParamsResultList[1]) | |
552 | 555 | let period = toString(asInt(gWxParamsResultList[2])) | |
553 | 556 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
554 | 557 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
555 | 558 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
556 | 559 | let h = if ((height > emissionEnd)) | |
557 | 560 | then emissionEnd | |
558 | 561 | else height | |
559 | 562 | let dh = max([(h - emissionStart), 0]) | |
560 | 563 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
561 | 564 | let userBoostEmissionLastIntegral = getIntOrZero(this, userBoostEmissionLastIntegralKEY) | |
562 | 565 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
563 | 566 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
564 | 567 | if ((0 > userBoostEmissionIntegral)) | |
565 | 568 | then throw("wrong calculations") | |
566 | 569 | else { | |
567 | 570 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
568 | 571 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
569 | 572 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
570 | 573 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
571 | 574 | let currUserGwx = calcCurrentGwxAmount(userAddressStr) | |
572 | 575 | let gwxDiff = (gWxAmountStart - currUserGwx) | |
573 | 576 | if ((0 > gwxDiff)) | |
574 | 577 | then throw(("gwxDiff is less then 0: " + toString(gwxDiff))) | |
575 | 578 | else { | |
576 | 579 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
577 | 580 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
578 | 581 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
579 | 582 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
580 | 583 | let userBoostAvaliableToClaimTotalNew = fraction(userBoostEmissionIntegral, currUserGwx, totalCachedGwx) | |
581 | 584 | let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2) | |
582 | 585 | let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2) | |
583 | 586 | let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt) | |
584 | 587 | (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStartNew, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gwxDiff))]) | |
585 | 588 | } | |
586 | 589 | } | |
587 | 590 | } | |
588 | 591 | } | |
589 | 592 | ||
590 | 593 | ||
591 | 594 | ||
592 | 595 | @Callable(i) | |
593 | 596 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
594 | 597 | then throw("permissions denied") | |
595 | 598 | else { | |
596 | - | let $ | |
597 | - | let userBoostAvailable = $ | |
598 | - | let dataState = $ | |
599 | - | let debug = $ | |
599 | + | let $t02794228044 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
600 | + | let userBoostAvailable = $t02794228044._1 | |
601 | + | let dataState = $t02794228044._2 | |
602 | + | let debug = $t02794228044._3 | |
600 | 603 | $Tuple2(dataState, [userBoostAvailable]) | |
601 | 604 | } | |
602 | 605 | ||
603 | 606 | ||
604 | 607 | ||
605 | 608 | @Callable(i) | |
606 | 609 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
607 | - | let $ | |
608 | - | let userBoostAvailable = $ | |
609 | - | let dataState = $ | |
610 | - | let debug = $ | |
610 | + | let $t02817628277 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
611 | + | let userBoostAvailable = $t02817628277._1 | |
612 | + | let dataState = $t02817628277._2 | |
613 | + | let debug = $t02817628277._3 | |
611 | 614 | $Tuple2(nil, [userBoostAvailable, debug]) | |
612 | 615 | } | |
613 | 616 | ||
614 | 617 | ||
615 | 618 | ||
616 | 619 | @Callable(i) | |
617 | 620 | func unlock (userAddress) = { | |
618 | 621 | let userRecordArray = readLockParamsRecordOrFail(userAddress) | |
619 | 622 | let userNumStr = userRecordArray[IdxLockUserNum] | |
620 | 623 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
621 | 624 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
622 | 625 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
623 | 626 | let lockEnd = (lockStart + lockDuration) | |
624 | 627 | let cfgArray = readConfigArrayOrFail() | |
625 | 628 | let assetId = fromBase58String(cfgArray[IdxCfgAssetId]) | |
626 | 629 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
627 | 630 | if ((lockEnd >= height)) | |
628 | 631 | then throw((("wait " + toString(lockEnd)) + " to unlock")) | |
629 | 632 | else if ((0 >= userAmount)) | |
630 | 633 | then throw("nothing to unlock") | |
631 | 634 | else { | |
632 | 635 | let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0) | |
633 | 636 | (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, toString(period)) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId)) | |
634 | 637 | } | |
635 | 638 | } | |
636 | 639 | ||
637 | 640 | ||
638 | 641 | ||
639 | 642 | @Callable(i) | |
640 | 643 | func gwxUserInfoREADONLY (userAddress) = { | |
641 | 644 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
642 | 645 | $Tuple2(nil, [gwxAmount]) | |
646 | + | } | |
647 | + | ||
648 | + | ||
649 | + | ||
650 | + | @Callable(i) | |
651 | + | func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = { | |
652 | + | let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight) | |
653 | + | $Tuple2(nil, gwxAmount) | |
643 | 654 | } | |
644 | 655 | ||
645 | 656 | ||
646 | 657 | ||
647 | 658 | @Callable(i) | |
648 | 659 | func setManager (pendingManagerPublicKey) = { | |
649 | 660 | let checkCaller = mustManager(i) | |
650 | 661 | if ((checkCaller == checkCaller)) | |
651 | 662 | then { | |
652 | 663 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
653 | 664 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
654 | 665 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
655 | 666 | else throw("Strict value is not equal to itself.") | |
656 | 667 | } | |
657 | 668 | else throw("Strict value is not equal to itself.") | |
658 | 669 | } | |
659 | 670 | ||
660 | 671 | ||
661 | 672 | ||
662 | 673 | @Callable(i) | |
663 | 674 | func confirmManager () = { | |
664 | 675 | let pm = pendingManagerPublicKeyOrUnit() | |
665 | 676 | let hasPM = if (isDefined(pm)) | |
666 | 677 | then true | |
667 | 678 | else throw("No pending manager") | |
668 | 679 | if ((hasPM == hasPM)) | |
669 | 680 | then { | |
670 | 681 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
671 | 682 | then true | |
672 | 683 | else throw("You are not pending manager") | |
673 | 684 | if ((checkPM == checkPM)) | |
674 | 685 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
675 | 686 | else throw("Strict value is not equal to itself.") | |
676 | 687 | } | |
677 | 688 | else throw("Strict value is not equal to itself.") | |
678 | 689 | } | |
679 | 690 | ||
680 | 691 | ||
681 | 692 | @Verifier(tx) | |
682 | 693 | func verify () = { | |
683 | 694 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
684 | 695 | case pk: ByteVector => | |
685 | 696 | pk | |
686 | 697 | case _: Unit => | |
687 | 698 | tx.senderPublicKey | |
688 | 699 | case _ => | |
689 | 700 | throw("Match error") | |
690 | 701 | } | |
691 | 702 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
692 | 703 | } | |
693 | 704 |
github/deemru/w8io/026f985 92.74 ms ◑