tx · 3ZWpezVTnGgcvWUTckonuDj6ChvnjDnCXPzoRopTVFjy 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.01000000 Waves 2021.12.09 18:44 [1826907] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "3ZWpezVTnGgcvWUTckonuDj6ChvnjDnCXPzoRopTVFjy", "fee": 1000000, "feeAssetId": null, "timestamp": 1639064675510, "version": 1, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "3YkswqzZnoVGo26uZXG7rdEoTbz5SAVBuabprnz6DRFGw5UHUsG6jaLgSmF5Wvz4xBLjY3zKjC9Y1hAxNMrGo1wA" ], "script": "base64:AAIFAAAAAAAAACwIAhIICgYICAEBAQgSAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCAAAAFYAAAAAA1NFUAIAAAACX18AAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAADlBPT0xXRUlHSFRNVUxUBQAAAAVNVUxUOAEAAAAPZ2V0U3RyaW5nT3JGYWlsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAICAAAAD21hbmRhdG9yeSB0aGlzLgUAAAADa2V5AgAAAA8gaXMgbm90IGRlZmluZWQBAAAADGdldEludE9yWmVybwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AAAAAAAAAAAAAQAAAA9nZXRJbnRPckRlZmF1bHQAAAADAAAAB2FkZHJlc3MAAAADa2V5AAAACmRlZmF1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xvY2tEdXJhdGlvbgAAAAAAAAAAAAAAAAAAAAAAAAkAAaQAAAABBQAAAAZwZXJpb2QJAQAAAApTdGF0c0VudHJ5AAAABAkBAAAAAS0AAAABBQAAAAp1c2VyQW1vdW50AAAAAAAAAAAAAAAAAAAAAAAAAP//////////CQEAAAAMSGlzdG9yeUVudHJ5AAAACAIAAAAGdW5sb2NrBQAAAAt1c2VyQWRkcmVzcwUAAAAKdXNlckFtb3VudAUAAAAJbG9ja1N0YXJ0BQAAAAxsb2NrRHVyYXRpb24AAAAAAAAAAAAAAAAAAAAAAAAFAAAAAWkJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAC3VzZXJBZGRyZXNzBQAAAAp1c2VyQW1vdW50BQAAAAdhc3NldElkAAAAAWkBAAAAE2d3eFVzZXJJbmZvUkVBRE9OTFkAAAABAAAAC3VzZXJBZGRyZXNzBAAAAAlnd3hBbW91bnQJAQAAABRjYWxjQ3VycmVudEd3eEFtb3VudAAAAAEFAAAAC3VzZXJBZGRyZXNzCQAFFAAAAAIFAAAAA25pbAkABEwAAAACBQAAAAlnd3hBbW91bnQFAAAAA25pbAAAAAB+GcdM", "chainId": 84, "height": 1826907, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7M8JiRPJcoT4Gzw7gvDqQJQxkXMBaMzWHzHsJTQnGLZv Next: FmkW2RFt83X8WvmcREmKXuvDFw3skvHA7YKYB8nBwvQ5 Diff:
Old | New | Differences | |
---|---|---|---|
389 | 389 | else false) | |
390 | 390 | then throw("there is an active lock - consider to use increaseLock") | |
391 | 391 | else if ((getIntOrZero(this, userAmountKEY) > 0)) | |
392 | - | then throw("there are locked WXs - consider to use increaseLock") | |
392 | + | then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY)) | |
393 | 393 | else { | |
394 | 394 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
395 | 395 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
501 | 501 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
502 | 502 | then throw("permissions denied") | |
503 | 503 | else { | |
504 | - | let $ | |
505 | - | let userBoostAvailable = $ | |
506 | - | let dataState = $ | |
507 | - | let debug = $ | |
504 | + | let $t02482124923 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
505 | + | let userBoostAvailable = $t02482124923._1 | |
506 | + | let dataState = $t02482124923._2 | |
507 | + | let debug = $t02482124923._3 | |
508 | 508 | $Tuple2(dataState, [userBoostAvailable]) | |
509 | 509 | } | |
510 | 510 | ||
512 | 512 | ||
513 | 513 | @Callable(i) | |
514 | 514 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
515 | - | let $ | |
516 | - | let userBoostAvailable = $ | |
517 | - | let dataState = $ | |
518 | - | let debug = $ | |
515 | + | let $t02505525156 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
516 | + | let userBoostAvailable = $t02505525156._1 | |
517 | + | let dataState = $t02505525156._2 | |
518 | + | let debug = $t02505525156._3 | |
519 | 519 | $Tuple2(nil, [userBoostAvailable, debug]) | |
520 | 520 | } | |
521 | 521 |
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 getStringOrFail (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 asAnyList (val) = match val { | |
25 | 25 | case valAnyLyst: List[Any] => | |
26 | 26 | valAnyLyst | |
27 | 27 | case _ => | |
28 | 28 | throw("fail to cast into List[Any]") | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func asInt (val) = match val { | |
33 | 33 | case valInt: Int => | |
34 | 34 | valInt | |
35 | 35 | case _ => | |
36 | 36 | throw("fail to cast into Int") | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | let IdxFactoryCfgStakingDapp = 1 | |
44 | 44 | ||
45 | 45 | let IdxFactoryCfgBoostingDapp = 2 | |
46 | 46 | ||
47 | 47 | let IdxFactoryCfgIdoDapp = 3 | |
48 | 48 | ||
49 | 49 | let IdxFactoryCfgTeamDapp = 4 | |
50 | 50 | ||
51 | 51 | let IdxFactoryCfgEmissionDapp = 5 | |
52 | 52 | ||
53 | 53 | let IdxFactoryCfgRestDapp = 6 | |
54 | 54 | ||
55 | 55 | let IdxFactoryCfgSlippageDapp = 7 | |
56 | 56 | ||
57 | 57 | func keyFactoryCfg () = "%s__factoryConfig" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyFactoryLpList () = "%s__lpTokensList" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress())) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyNextPeriod () = "%s__nextPeriod" | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | let IdxCfgAssetId = 1 | |
109 | 109 | ||
110 | 110 | let IdxCfgMinLockAmount = 2 | |
111 | 111 | ||
112 | 112 | let IdxCfgMinLockDuration = 3 | |
113 | 113 | ||
114 | 114 | let IdxCfgMaxLockDuration = 4 | |
115 | 115 | ||
116 | 116 | let IdxCfgMathContract = 5 | |
117 | 117 | ||
118 | 118 | func keyConfig () = "%s__config" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func readConfigArrayOrFail () = split(getStringOrFail(this, keyConfig()), SEP) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | let IdxLockUserNum = 1 | |
131 | 131 | ||
132 | 132 | let IdxLockAmount = 2 | |
133 | 133 | ||
134 | 134 | let IdxLockStart = 3 | |
135 | 135 | ||
136 | 136 | let IdxLockDuration = 4 | |
137 | 137 | ||
138 | 138 | let IdxLockParamK = 5 | |
139 | 139 | ||
140 | 140 | let IdxLockParamB = 6 | |
141 | 141 | ||
142 | 142 | func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func readLockParamsRecordOrFail (userAddress) = split(getStringOrFail(this, keyLockParamsRecord(userAddress)), SEP) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | 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) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | 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)) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyNextUserNum () = "%s__nextUserNum" | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func keyStatsLocksCount () = "%s%s__stats__locksCount" | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func keyStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastInt", userNum, lpAssetId], SEP) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | let factoryContract = readFactoryAddressOrFail() | |
218 | 218 | ||
219 | 219 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
220 | 220 | ||
221 | 221 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
222 | 222 | ||
223 | 223 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
224 | 224 | ||
225 | 225 | func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = { | |
226 | 226 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
227 | 227 | 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) | |
228 | 228 | StringEntry(historyKEY, historyDATA) | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
233 | 233 | let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks() | |
234 | 234 | let locksCountKEY = keyStatsLocksCount() | |
235 | 235 | let usersCountKEY = keyStatsUsersCount() | |
236 | 236 | let totalAmountKEY = keyLockParamTotalAmount() | |
237 | 237 | let locksDurationSumInBlocks = getIntOrZero(this, locksDurationSumInBlocksKEY) | |
238 | 238 | let locksCount = getIntOrZero(this, locksCountKEY) | |
239 | 239 | let usersCount = getIntOrZero(this, usersCountKEY) | |
240 | 240 | let totalAmount = getIntOrZero(this, totalAmountKEY) | |
241 | 241 | [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))] | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func calcGwxAmount (kRaw,bRaw,h) = { | |
246 | 246 | let SCALE = 1000 | |
247 | 247 | (((kRaw * h) + bRaw) / SCALE) | |
248 | 248 | } | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = { | |
252 | 252 | let userAmountKEY = keyLockParamUserAmount(userNum) | |
253 | 253 | let startBlockKEY = keyLockParamStartBlock(userNum) | |
254 | 254 | let durationKEY = keyLockParamDuration(userNum) | |
255 | 255 | let kKEY = keyLockParamK(userNum) | |
256 | 256 | let bKEY = keyLockParamB(userNum) | |
257 | 257 | let kByPerioKEY = keyLockParamByPeriodK(userNum, period) | |
258 | 258 | let bByPeriodKEY = keyLockParamByPeriodB(userNum, period) | |
259 | 259 | let gwxAmount = calcGwxAmount(k, b, height) | |
260 | 260 | [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPerioKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))] | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1)) | |
265 | 265 | then throw("only one payment is allowed") | |
266 | 266 | else if ((size(i.payments) == 0)) | |
267 | 267 | then 0 | |
268 | 268 | else { | |
269 | 269 | let pmt = i.payments[0] | |
270 | 270 | if ((value(pmt.assetId) != expectedAssetId)) | |
271 | 271 | then throw("invalid asset id in payment") | |
272 | 272 | else pmt.amount | |
273 | 273 | } | |
274 | 274 | ||
275 | 275 | ||
276 | 276 | func calcCurrentGwxAmount (userAddress) = { | |
277 | 277 | let EMPTY = "empty" | |
278 | 278 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
279 | 279 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
280 | 280 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
281 | 281 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
282 | 282 | let gwxAmountCalc = calcGwxAmount(k, b, height) | |
283 | 283 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
284 | 284 | then 0 | |
285 | 285 | else gwxAmountCalc | |
286 | 286 | gwxAmount | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
291 | 291 | let EMPTY = "EMPTY" | |
292 | 292 | let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY) | |
293 | 293 | if ((userRecordOrEmpty == EMPTY)) | |
294 | 294 | then $Tuple3(0, nil, "userRecord::is::empty") | |
295 | 295 | else { | |
296 | 296 | let userRecordArray = split(userRecordOrEmpty, SEP) | |
297 | 297 | let userNumStr = userRecordArray[IdxLockUserNum] | |
298 | 298 | let EMPTYSTR = "empty" | |
299 | 299 | let poolWeight = if ((lpAssetIdStr != EMPTYSTR)) | |
300 | 300 | then { | |
301 | 301 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
302 | 302 | getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
303 | 303 | } | |
304 | 304 | else if (readOnly) | |
305 | 305 | then 0 | |
306 | 306 | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
307 | 307 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
308 | 308 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
309 | 309 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
310 | 310 | let h = if ((height > emissionEnd)) | |
311 | 311 | then emissionEnd | |
312 | 312 | else height | |
313 | 313 | let dh = max([(h - emissionStart), 0]) | |
314 | 314 | let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr) | |
315 | 315 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
316 | 316 | let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), getIntOrZero(this, userBoostEmissionLastIntegralKEY)) | |
317 | 317 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
318 | 318 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
319 | 319 | if ((0 > userBoostEmissionIntegral)) | |
320 | 320 | then throw("wrong calculations") | |
321 | 321 | else { | |
322 | 322 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
323 | 323 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
324 | 324 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
325 | 325 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
326 | 326 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
327 | 327 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
328 | 328 | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
329 | 329 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
330 | 330 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
331 | 331 | let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT) | |
332 | 332 | let userBoostAvaliableToClaimTotalNew = if ((totalCachedGwx == 0)) | |
333 | 333 | then 0 | |
334 | 334 | else fraction(poolUserBoostEmissionIntegral, userCurrGwx, totalCachedGwx) | |
335 | 335 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
336 | 336 | let userBoostClaimed = getIntOrZero(this, userBoostClaimedKEY) | |
337 | 337 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
338 | 338 | let dataState = [IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] | |
339 | 339 | 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)), ("poolUserBoostEmissionIntegral=" + toString(poolUserBoostEmissionIntegral)), ("userCurrGwx=" + toString(userCurrGwx)), ("totalCachedGwx" + toString(totalCachedGwx))], "::") | |
340 | 340 | $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug) | |
341 | 341 | } | |
342 | 342 | } | |
343 | 343 | } | |
344 | 344 | ||
345 | 345 | ||
346 | 346 | @Callable(i) | |
347 | 347 | func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = if ((this != i.caller)) | |
348 | 348 | then throw("not authorized") | |
349 | 349 | else ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0)) | |
350 | 350 | ||
351 | 351 | ||
352 | 352 | ||
353 | 353 | @Callable(i) | |
354 | 354 | func lock (duration) = { | |
355 | 355 | let cfgArray = readConfigArrayOrFail() | |
356 | 356 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
357 | 357 | let assetId = fromBase58String(assetIdStr) | |
358 | 358 | let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount]) | |
359 | 359 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
360 | 360 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
361 | 361 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
362 | 362 | if ((size(i.payments) != 1)) | |
363 | 363 | then throw("invalid payment - exact one payment must be attached") | |
364 | 364 | else { | |
365 | 365 | let pmt = i.payments[0] | |
366 | 366 | let pmtAmount = pmt.amount | |
367 | 367 | if ((assetId != value(pmt.assetId))) | |
368 | 368 | then throw((("invalid asset is in payment - " + assetIdStr) + " is expected")) | |
369 | 369 | else { | |
370 | 370 | let nextUserNumKEY = keyNextUserNum() | |
371 | 371 | let userAddressStr = toString(i.caller) | |
372 | 372 | let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr))) | |
373 | 373 | let userNumStr = if (userIsExisting) | |
374 | 374 | then value(getString(keyUser2NumMapping(userAddressStr))) | |
375 | 375 | else toString(getIntOrFail(this, nextUserNumKEY)) | |
376 | 376 | let userNum = parseIntValue(userNumStr) | |
377 | 377 | let lockStart = height | |
378 | 378 | let startBlockKEY = keyLockParamStartBlock(userNumStr) | |
379 | 379 | let durationKEY = keyLockParamDuration(userNumStr) | |
380 | 380 | let userAmountKEY = keyLockParamUserAmount(userNumStr) | |
381 | 381 | if ((minLockAmount > pmtAmount)) | |
382 | 382 | then throw(("amount is less then minLockAmount=" + toString(minLockAmount))) | |
383 | 383 | else if ((minLockDuration > duration)) | |
384 | 384 | then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration))) | |
385 | 385 | else if ((duration > maxLockDuration)) | |
386 | 386 | then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
387 | 387 | else if (if (userIsExisting) | |
388 | 388 | then ((getIntOrFail(this, startBlockKEY) + getIntOrFail(this, durationKEY)) >= lockStart) | |
389 | 389 | else false) | |
390 | 390 | then throw("there is an active lock - consider to use increaseLock") | |
391 | 391 | else if ((getIntOrZero(this, userAmountKEY) > 0)) | |
392 | - | then throw("there are locked WXs - consider to use increaseLock") | |
392 | + | then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY)) | |
393 | 393 | else { | |
394 | 394 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
395 | 395 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
396 | 396 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil)) | |
397 | 397 | let k = asInt(gWxParamsResultList[0]) | |
398 | 398 | let b = asInt(gWxParamsResultList[1]) | |
399 | 399 | let period = toString(asInt(gWxParamsResultList[2])) | |
400 | 400 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
401 | 401 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
402 | 402 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
403 | 403 | let h = if ((height > emissionEnd)) | |
404 | 404 | then emissionEnd | |
405 | 405 | else height | |
406 | 406 | let dh = max([(h - emissionStart), 0]) | |
407 | 407 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
408 | 408 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
409 | 409 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
410 | 410 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
411 | 411 | let userMaxBoostInt = ((gWxAmountStart * duration) / 2) | |
412 | 412 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
413 | 413 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
414 | 414 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
415 | 415 | let arr = if (userIsExisting) | |
416 | 416 | then nil | |
417 | 417 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
418 | 418 | ((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
419 | 419 | then 0 | |
420 | 420 | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gWxAmountStart))]) | |
421 | 421 | } | |
422 | 422 | } | |
423 | 423 | } | |
424 | 424 | } | |
425 | 425 | ||
426 | 426 | ||
427 | 427 | ||
428 | 428 | @Callable(i) | |
429 | 429 | func increaseLock (deltaDuration) = { | |
430 | 430 | let cfgArray = readConfigArrayOrFail() | |
431 | 431 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
432 | 432 | let assetId = fromBase58String(assetIdStr) | |
433 | 433 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
434 | 434 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
435 | 435 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
436 | 436 | let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId) | |
437 | 437 | let userAddressStr = toString(i.caller) | |
438 | 438 | let userRecordArray = readLockParamsRecordOrFail(userAddressStr) | |
439 | 439 | let userNumStr = userRecordArray[IdxLockUserNum] | |
440 | 440 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
441 | 441 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
442 | 442 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
443 | 443 | let lockEnd = (lockStart + lockDuration) | |
444 | 444 | let remainingDuration = max([(lockEnd - height), 0]) | |
445 | 445 | let userAmountNew = (userAmount + pmtAmount) | |
446 | 446 | let lockDurationNew = (remainingDuration + deltaDuration) | |
447 | 447 | if ((0 > deltaDuration)) | |
448 | 448 | then throw("duration is less then zero") | |
449 | 449 | else if ((minLockDuration > lockDurationNew)) | |
450 | 450 | then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration))) | |
451 | 451 | else if ((lockDurationNew > maxLockDuration)) | |
452 | 452 | then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
453 | 453 | else { | |
454 | 454 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration) | |
455 | 455 | let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
456 | 456 | let lockStartNew = height | |
457 | 457 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil)) | |
458 | 458 | let k = asInt(gWxParamsResultList[0]) | |
459 | 459 | let b = asInt(gWxParamsResultList[1]) | |
460 | 460 | let period = toString(asInt(gWxParamsResultList[2])) | |
461 | 461 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
462 | 462 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
463 | 463 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
464 | 464 | let h = if ((height > emissionEnd)) | |
465 | 465 | then emissionEnd | |
466 | 466 | else height | |
467 | 467 | let dh = max([(h - emissionStart), 0]) | |
468 | 468 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
469 | 469 | let userBoostEmissionLastIntegral = getIntOrZero(this, userBoostEmissionLastIntegralKEY) | |
470 | 470 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
471 | 471 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
472 | 472 | if ((0 > userBoostEmissionIntegral)) | |
473 | 473 | then throw("wrong calculations") | |
474 | 474 | else { | |
475 | 475 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
476 | 476 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
477 | 477 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
478 | 478 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
479 | 479 | let currUserGwx = calcCurrentGwxAmount(userAddressStr) | |
480 | 480 | let gwxDiff = (gWxAmountStart - currUserGwx) | |
481 | 481 | if ((0 > gwxDiff)) | |
482 | 482 | then throw("gwxDiff is less then 0") | |
483 | 483 | else { | |
484 | 484 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
485 | 485 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
486 | 486 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
487 | 487 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
488 | 488 | let userBoostAvaliableToClaimTotalNew = fraction(userBoostEmissionIntegral, currUserGwx, totalCachedGwx) | |
489 | 489 | let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2) | |
490 | 490 | let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2) | |
491 | 491 | let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt) | |
492 | 492 | (((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))]) | |
493 | 493 | } | |
494 | 494 | } | |
495 | 495 | } | |
496 | 496 | } | |
497 | 497 | ||
498 | 498 | ||
499 | 499 | ||
500 | 500 | @Callable(i) | |
501 | 501 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
502 | 502 | then throw("permissions denied") | |
503 | 503 | else { | |
504 | - | let $ | |
505 | - | let userBoostAvailable = $ | |
506 | - | let dataState = $ | |
507 | - | let debug = $ | |
504 | + | let $t02482124923 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
505 | + | let userBoostAvailable = $t02482124923._1 | |
506 | + | let dataState = $t02482124923._2 | |
507 | + | let debug = $t02482124923._3 | |
508 | 508 | $Tuple2(dataState, [userBoostAvailable]) | |
509 | 509 | } | |
510 | 510 | ||
511 | 511 | ||
512 | 512 | ||
513 | 513 | @Callable(i) | |
514 | 514 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
515 | - | let $ | |
516 | - | let userBoostAvailable = $ | |
517 | - | let dataState = $ | |
518 | - | let debug = $ | |
515 | + | let $t02505525156 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
516 | + | let userBoostAvailable = $t02505525156._1 | |
517 | + | let dataState = $t02505525156._2 | |
518 | + | let debug = $t02505525156._3 | |
519 | 519 | $Tuple2(nil, [userBoostAvailable, debug]) | |
520 | 520 | } | |
521 | 521 | ||
522 | 522 | ||
523 | 523 | ||
524 | 524 | @Callable(i) | |
525 | 525 | func unlock (userAddress) = { | |
526 | 526 | let userRecordArray = readLockParamsRecordOrFail(userAddress) | |
527 | 527 | let userNumStr = userRecordArray[IdxLockUserNum] | |
528 | 528 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
529 | 529 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
530 | 530 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
531 | 531 | let lockEnd = (lockStart + lockDuration) | |
532 | 532 | let cfgArray = readConfigArrayOrFail() | |
533 | 533 | let assetId = fromBase58String(cfgArray[IdxCfgAssetId]) | |
534 | 534 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
535 | 535 | if ((lockEnd >= height)) | |
536 | 536 | then throw((("wait " + toString(lockEnd)) + " to unlock")) | |
537 | 537 | else if ((0 >= userAmount)) | |
538 | 538 | then throw("nothing to unlock") | |
539 | 539 | else { | |
540 | 540 | let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0) | |
541 | 541 | (((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)) | |
542 | 542 | } | |
543 | 543 | } | |
544 | 544 | ||
545 | 545 | ||
546 | 546 | ||
547 | 547 | @Callable(i) | |
548 | 548 | func gwxUserInfoREADONLY (userAddress) = { | |
549 | 549 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
550 | 550 | $Tuple2(nil, [gwxAmount]) | |
551 | 551 | } | |
552 | 552 | ||
553 | 553 |
github/deemru/w8io/fabc49c 65.07 ms ◑