tx · 9infFmSwSemZgNBGjP6kd7DHhHBQY9QavdZYVBD9Gx69 3N74cvawpTtuuCbAasBo7oMJYrohgZYFCTj: -0.01400000 Waves 2021.12.23 18:15 [1847071] smart account 3N74cvawpTtuuCbAasBo7oMJYrohgZYFCTj > SELF 0.00000000 Waves
{ "type": 13, "id": "9infFmSwSemZgNBGjP6kd7DHhHBQY9QavdZYVBD9Gx69", "fee": 1400000, "feeAssetId": null, "timestamp": 1640272537014, "version": 1, "sender": "3N74cvawpTtuuCbAasBo7oMJYrohgZYFCTj", "senderPublicKey": "BgnyKECwUvFW1ThWpgKbmHMmJXJRgg5K56jKHZwVMbXL", "proofs": [ "y3qayji1NQAh4wZu4AvZbgZgYo6P5VizxXJFDBwsbUwejweMqaKuvJUYPzmnXdJXFWixCHLVoN2zMwcNehhcJT8" ], "script": "base64:AAIFAAAAAAAAAEUIAhIHCgUCAQEBARIAEgASBwoFAgEBAQESABIDCgEIEgUKAwEBARIFCgMBAQESBgoECAgIARIDCgEIEgASBwoFCAgICAgAAAAsAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAANTRVACAAAAAl9fAAAAAAhNQVhERVBUSAAAAAAAAAAAEQAAAAAJVVNFUkRFUFRIAAAAAAAAAAAaAAAAAAVTQ0FMRQAAAAAAAAAD6AAAAAAFTVVMVDgAAAAAAAX14QAAAAAACnplcm9CaWdJbnQJAAE2AAAAAQAAAAAAAAAAAAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQiA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WZmID0gCQABpgAAAAEFAAAABWREaWZmAAAAAI9PY2A=", "chainId": 84, "height": 1847071, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D6GLY9gYQZkDJVecwJrXyrhsktQuPmBR1mzChqvVWbNM Next: none Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | ||
12 | 12 | let SCALE = 1000 | |
13 | 13 | ||
14 | + | let MULT8 = 100000000 | |
15 | + | ||
16 | + | let zeroBigInt = toBigInt(0) | |
17 | + | ||
14 | 18 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
15 | 19 | ||
16 | 20 | ||
19 | 23 | ||
20 | 24 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
21 | 25 | ||
26 | + | ||
27 | + | func abs (val) = if ((zeroBigInt > val)) | |
28 | + | then -(val) | |
29 | + | else val | |
30 | + | ||
31 | + | ||
32 | + | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
33 | + | ||
34 | + | ||
35 | + | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
36 | + | ||
37 | + | let factoryContract = addressFromStringValue(factoryAddressStr) | |
22 | 38 | ||
23 | 39 | let IdxCfgAssetId = 1 | |
24 | 40 | ||
35 | 51 | ||
36 | 52 | ||
37 | 53 | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
54 | + | ||
55 | + | ||
56 | + | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
38 | 57 | ||
39 | 58 | ||
40 | 59 | func keyUsersCount () = "%s__nextUserNum" | |
228 | 247 | let latestPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
229 | 248 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
230 | 249 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
231 | - | let $ | |
232 | - | let userWeight = $ | |
233 | - | let ignored = $ | |
250 | + | let $t01121911331 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
251 | + | let userWeight = $t01121911331._1 | |
252 | + | let ignored = $t01121911331._2 | |
234 | 253 | let userAmountForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
235 | 254 | if (if ((0 >= depth)) | |
236 | 255 | then true | |
249 | 268 | then throw("Nothing to claim") | |
250 | 269 | else { | |
251 | 270 | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
252 | - | let $ | |
253 | - | let period = $ | |
254 | - | let amount = $ | |
271 | + | let $t01225212344 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0) | |
272 | + | let period = $t01225212344._1 | |
273 | + | let amount = $t01225212344._2 | |
255 | 274 | $Tuple5(period, amount, userIdx, cfgArray, latestPeriod) | |
256 | 275 | } | |
257 | 276 | } | |
320 | 339 | @Callable(i) | |
321 | 340 | func claimReward () = { | |
322 | 341 | let address = toString(i.caller) | |
323 | - | let $ | |
324 | - | let period = $ | |
325 | - | let amount = $ | |
326 | - | let userIdx = $ | |
327 | - | let cfgArray = $ | |
328 | - | let latestPeriod = $ | |
342 | + | let $t01528415366 = commonClaimReward(address) | |
343 | + | let period = $t01528415366._1 | |
344 | + | let amount = $t01528415366._2 | |
345 | + | let userIdx = $t01528415366._3 | |
346 | + | let cfgArray = $t01528415366._4 | |
347 | + | let latestPeriod = $t01528415366._5 | |
329 | 348 | $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, amount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, period, latestPeriod, i)], amount) | |
330 | 349 | } | |
331 | 350 | ||
351 | 370 | ||
352 | 371 | ||
353 | 372 | @Callable(i) | |
373 | + | func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = { | |
374 | + | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
375 | + | let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8) | |
376 | + | $Tuple2(nil, [gWxAmountStart]) | |
377 | + | } | |
378 | + | ||
379 | + | ||
380 | + | ||
381 | + | @Callable(i) | |
354 | 382 | func constructor (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = if ((this != i.caller)) | |
355 | 383 | then throw("not authorized") | |
356 | 384 | else [StringEntry(keyConfig(), formatConfig(wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, maxDepth))] | |
385 | + | ||
386 | + | ||
387 | + | ||
388 | + | @Callable(i) | |
389 | + | func constructorV2 (factoryAddress) = if ((this != i.caller)) | |
390 | + | then throw("not authorized") | |
391 | + | else [StringEntry(keyFactoryAddress(), factoryAddress)] | |
392 | + | ||
393 | + | ||
394 | + | ||
395 | + | @Callable(i) | |
396 | + | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
397 | + | then throw("permissions denied") | |
398 | + | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
399 | + | ||
400 | + | ||
401 | + | ||
402 | + | @Callable(i) | |
403 | + | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
404 | + | let nCoins = toBigInt(2) | |
405 | + | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
406 | + | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
407 | + | let x1 = parseBigIntValue(x1BigIntStr) | |
408 | + | let x2 = parseBigIntValue(x2BigIntStr) | |
409 | + | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
410 | + | let s = (x1 + x2) | |
411 | + | if ((s == zeroBigInt)) | |
412 | + | then $Tuple2(nil, toString(zeroBigInt)) | |
413 | + | else { | |
414 | + | let ann = (amp * nCoins) | |
415 | + | let arr = [1, 2, 3, 4, 5, 6, 7] | |
416 | + | func calc (acc,cur) = { | |
417 | + | let $t01804918238 = acc | |
418 | + | let d = $t01804918238._1 | |
419 | + | let dPrev = $t01804918238._2 | |
420 | + | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
421 | + | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
422 | + | $Tuple2(dNext, d) | |
423 | + | } | |
424 | + | ||
425 | + | let $t01845118501 = { | |
426 | + | let $l = arr | |
427 | + | let $s = size($l) | |
428 | + | let $acc0 = $Tuple2(s, unit) | |
429 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
430 | + | then $a | |
431 | + | else calc($a, $l[$i]) | |
432 | + | ||
433 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
434 | + | then $a | |
435 | + | else throw("List size exceeds 7") | |
436 | + | ||
437 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
438 | + | } | |
439 | + | let dNext = $t01845118501._1 | |
440 | + | let dPrev = $t01845118501._2 | |
441 | + | let dDiff = abs((dNext - value(dPrev))) | |
442 | + | if ((targetPrecision >= dDiff)) | |
443 | + | then $Tuple2(nil, toString(dNext)) | |
444 | + | else throw(("D calculation error, dDiff = " + toString(dDiff))) | |
445 | + | } | |
446 | + | } | |
357 | 447 | ||
358 | 448 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let revisionNum = "" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let MAXDEPTH = 17 | |
9 | 9 | ||
10 | 10 | let USERDEPTH = 26 | |
11 | 11 | ||
12 | 12 | let SCALE = 1000 | |
13 | 13 | ||
14 | + | let MULT8 = 100000000 | |
15 | + | ||
16 | + | let zeroBigInt = toBigInt(0) | |
17 | + | ||
14 | 18 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
15 | 19 | ||
16 | 20 | ||
17 | 21 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
18 | 22 | ||
19 | 23 | ||
20 | 24 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
21 | 25 | ||
26 | + | ||
27 | + | func abs (val) = if ((zeroBigInt > val)) | |
28 | + | then -(val) | |
29 | + | else val | |
30 | + | ||
31 | + | ||
32 | + | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
33 | + | ||
34 | + | ||
35 | + | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
36 | + | ||
37 | + | let factoryContract = addressFromStringValue(factoryAddressStr) | |
22 | 38 | ||
23 | 39 | let IdxCfgAssetId = 1 | |
24 | 40 | ||
25 | 41 | let IdxCfgPacemakerAddress = 2 | |
26 | 42 | ||
27 | 43 | let IdxCfgBoostingContract = 3 | |
28 | 44 | ||
29 | 45 | let IdxCfgMaxDepth = 4 | |
30 | 46 | ||
31 | 47 | func keyConfig () = "%s__config" | |
32 | 48 | ||
33 | 49 | ||
34 | 50 | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
35 | 51 | ||
36 | 52 | ||
37 | 53 | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
54 | + | ||
55 | + | ||
56 | + | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
38 | 57 | ||
39 | 58 | ||
40 | 59 | func keyUsersCount () = "%s__nextUserNum" | |
41 | 60 | ||
42 | 61 | ||
43 | 62 | func keyNextProcessedUser () = "%s__nextProcessedUser" | |
44 | 63 | ||
45 | 64 | ||
46 | 65 | func keyLatestPeriod () = "%s__latestPeriod" | |
47 | 66 | ||
48 | 67 | ||
49 | 68 | func keyNextPeriod () = "%s__nextPeriod" | |
50 | 69 | ||
51 | 70 | ||
52 | 71 | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
53 | 72 | ||
54 | 73 | ||
55 | 74 | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
56 | 75 | ||
57 | 76 | ||
58 | 77 | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
59 | 78 | ||
60 | 79 | ||
61 | 80 | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
62 | 81 | ||
63 | 82 | ||
64 | 83 | func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP) | |
65 | 84 | ||
66 | 85 | ||
67 | 86 | func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP) | |
68 | 87 | ||
69 | 88 | ||
70 | 89 | func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP) | |
71 | 90 | ||
72 | 91 | ||
73 | 92 | func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP) | |
74 | 93 | ||
75 | 94 | ||
76 | 95 | func HistoryEntry (type,user,amount,currentPeriod,latestPeriod,i) = { | |
77 | 96 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
78 | 97 | let historyDATA = makeString(["%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(currentPeriod), toString(latestPeriod)], SEP) | |
79 | 98 | StringEntry(historyKEY, historyDATA) | |
80 | 99 | } | |
81 | 100 | ||
82 | 101 | ||
83 | 102 | func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
84 | 103 | let kLast = keyLastProcessedPeriodOfUser(userIndex) | |
85 | 104 | let kKey = keyUserKValueForPeriod(period, userIndex) | |
86 | 105 | let kRaw = getInteger(boostingContractAddress, kKey) | |
87 | 106 | if (isDefined(kRaw)) | |
88 | 107 | then { | |
89 | 108 | let k = value(kRaw) | |
90 | 109 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
91 | 110 | let w = ((k * heightForPeriod) + b) | |
92 | 111 | if ((w > 0)) | |
93 | 112 | then $Tuple2((w / SCALE), [IntegerEntry(kLast, period)]) | |
94 | 113 | else $Tuple2(0, nil) | |
95 | 114 | } | |
96 | 115 | else { | |
97 | 116 | let p = getInteger(this, kLast) | |
98 | 117 | if (isDefined(p)) | |
99 | 118 | then { | |
100 | 119 | let pv = value(p) | |
101 | 120 | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
102 | 121 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
103 | 122 | let w = ((k * heightForPeriod) + b) | |
104 | 123 | if ((w > 0)) | |
105 | 124 | then $Tuple2((w / SCALE), nil) | |
106 | 125 | else $Tuple2(0, nil) | |
107 | 126 | } | |
108 | 127 | else $Tuple2(0, nil) | |
109 | 128 | } | |
110 | 129 | } | |
111 | 130 | ||
112 | 131 | ||
113 | 132 | func getUserIndexByAddress (boostingContractAddressStr,userAddress) = { | |
114 | 133 | let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP) | |
115 | 134 | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key))) | |
116 | 135 | } | |
117 | 136 | ||
118 | 137 | ||
119 | 138 | func nextPeriod () = getNumberByKey(keyNextPeriod()) | |
120 | 139 | ||
121 | 140 | ||
122 | 141 | func invokeProcess (boostingContract,period,user,depth,weight) = { | |
123 | 142 | let result = invoke(this, "processNextBatch", [boostingContract, period, user, depth, weight], nil) | |
124 | 143 | if ((result == result)) | |
125 | 144 | then match result { | |
126 | 145 | case r: (Int, Int, Int) => | |
127 | 146 | r | |
128 | 147 | case _ => | |
129 | 148 | throw("Incorrect invoke result") | |
130 | 149 | } | |
131 | 150 | else throw("Strict value is not equal to itself.") | |
132 | 151 | } | |
133 | 152 | ||
134 | 153 | ||
135 | 154 | func checkLastPartOfPeriod (boostingContract,currentPeriod,latestPeriod,depth,totalWeightKey,weight) = if ((latestPeriod >= (currentPeriod + 1))) | |
136 | 155 | then invokeProcess(boostingContract, (currentPeriod + 1), 0, (depth - 1), 0) | |
137 | 156 | else $Tuple3((currentPeriod + 1), 0, 0) | |
138 | 157 | ||
139 | 158 | ||
140 | 159 | func processNextBatchInternal (boostingContract,currentPeriod,currentUser,depth,totalWeight) = { | |
141 | 160 | let boostingContractAddress = Address(boostingContract) | |
142 | 161 | let latestPeriod = getNumberByKey(keyLatestPeriod()) | |
143 | 162 | let usersCount = valueOrElse(getInteger(boostingContractAddress, keyUsersCount()), 0) | |
144 | 163 | let totalWeightKey = keyTotalWeightForPeriod(currentPeriod) | |
145 | 164 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
146 | 165 | if (if ((depth > 0)) | |
147 | 166 | then (latestPeriod >= currentPeriod) | |
148 | 167 | else false) | |
149 | 168 | then { | |
150 | 169 | let t0 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
151 | 170 | let weight0 = (totalWeight + t0._1) | |
152 | 171 | if ((usersCount > (currentUser + 1))) | |
153 | 172 | then { | |
154 | 173 | let t1 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 1)) | |
155 | 174 | let weight1 = (weight0 + t1._1) | |
156 | 175 | if ((usersCount > (currentUser + 2))) | |
157 | 176 | then { | |
158 | 177 | let t2 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 2)) | |
159 | 178 | let weight2 = (weight1 + t2._1) | |
160 | 179 | if ((usersCount > (currentUser + 3))) | |
161 | 180 | then { | |
162 | 181 | let t3 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 3)) | |
163 | 182 | let weight3 = (weight2 + t3._1) | |
164 | 183 | if ((usersCount > (currentUser + 4))) | |
165 | 184 | then { | |
166 | 185 | let t4 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 4)) | |
167 | 186 | let weight4 = (weight3 + t4._1) | |
168 | 187 | if ((usersCount > (currentUser + 5))) | |
169 | 188 | then { | |
170 | 189 | let t5 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 5)) | |
171 | 190 | let weight5 = (weight4 + t5._1) | |
172 | 191 | if ((usersCount > (currentUser + 6))) | |
173 | 192 | then { | |
174 | 193 | let r5 = invokeProcess(boostingContract, currentPeriod, (currentUser + 6), (depth - 1), weight5) | |
175 | 194 | $Tuple4((((((t0._2 ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), r5._1, r5._2, r5._3) | |
176 | 195 | } | |
177 | 196 | else { | |
178 | 197 | let r5 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight5) | |
179 | 198 | $Tuple4((((((([IntegerEntry(totalWeightKey, weight5)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), r5._1, r5._2, r5._3) | |
180 | 199 | } | |
181 | 200 | } | |
182 | 201 | else { | |
183 | 202 | let r4 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight4) | |
184 | 203 | $Tuple4(((((([IntegerEntry(totalWeightKey, weight4)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2), r4._1, r4._2, r4._3) | |
185 | 204 | } | |
186 | 205 | } | |
187 | 206 | else { | |
188 | 207 | let r3 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight3) | |
189 | 208 | $Tuple4((((([IntegerEntry(totalWeightKey, weight3)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2), r3._1, r3._2, r3._3) | |
190 | 209 | } | |
191 | 210 | } | |
192 | 211 | else { | |
193 | 212 | let r2 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight2) | |
194 | 213 | $Tuple4(((([IntegerEntry(totalWeightKey, weight2)] ++ t0._2) ++ t1._2) ++ t2._2), r2._1, r2._2, r2._3) | |
195 | 214 | } | |
196 | 215 | } | |
197 | 216 | else { | |
198 | 217 | let r1 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight1) | |
199 | 218 | $Tuple4((([IntegerEntry(totalWeightKey, weight1)] ++ t0._2) ++ t1._2), r1._1, r1._2, r1._3) | |
200 | 219 | } | |
201 | 220 | } | |
202 | 221 | else { | |
203 | 222 | let r0 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight0) | |
204 | 223 | $Tuple4(([IntegerEntry(totalWeightKey, weight0)] ++ t0._2), r0._1, r0._2, r0._3) | |
205 | 224 | } | |
206 | 225 | } | |
207 | 226 | else if ((currentUser == 0)) | |
208 | 227 | then $Tuple4(nil, currentPeriod, 0, 0) | |
209 | 228 | else $Tuple4([IntegerEntry(totalWeightKey, totalWeight)], currentPeriod, currentUser, 0) | |
210 | 229 | } | |
211 | 230 | ||
212 | 231 | ||
213 | 232 | func invokeClaim (boostingContract,period,user,depth,total) = { | |
214 | 233 | let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, total], nil) | |
215 | 234 | if ((result == result)) | |
216 | 235 | then match result { | |
217 | 236 | case r: (Int, Int) => | |
218 | 237 | r | |
219 | 238 | case _ => | |
220 | 239 | throw("Incorrect invoke result") | |
221 | 240 | } | |
222 | 241 | else throw("Strict value is not equal to itself.") | |
223 | 242 | } | |
224 | 243 | ||
225 | 244 | ||
226 | 245 | func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulated) = { | |
227 | 246 | let boostingContractAddress = Address(boostingContract) | |
228 | 247 | let latestPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
229 | 248 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
230 | 249 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
231 | - | let $ | |
232 | - | let userWeight = $ | |
233 | - | let ignored = $ | |
250 | + | let $t01121911331 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
251 | + | let userWeight = $t01121911331._1 | |
252 | + | let ignored = $t01121911331._2 | |
234 | 253 | let userAmountForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
235 | 254 | if (if ((0 >= depth)) | |
236 | 255 | then true | |
237 | 256 | else ((currentPeriod + 1) >= latestPeriod)) | |
238 | 257 | then $Tuple2((currentPeriod + 1), (userAccumulated + userAmountForPeriod)) | |
239 | 258 | else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulated + userAmountForPeriod)) | |
240 | 259 | } | |
241 | 260 | ||
242 | 261 | ||
243 | 262 | func commonClaimReward (userAddress) = { | |
244 | 263 | let cfgArray = readConfigArrayOrFail() | |
245 | 264 | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
246 | 265 | let currentPeriod = getNumberByKey(keyNextUnlaimedPeriodOfUser(userIdx)) | |
247 | 266 | let latestPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
248 | 267 | if ((currentPeriod >= latestPeriod)) | |
249 | 268 | then throw("Nothing to claim") | |
250 | 269 | else { | |
251 | 270 | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
252 | - | let $ | |
253 | - | let period = $ | |
254 | - | let amount = $ | |
271 | + | let $t01225212344 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0) | |
272 | + | let period = $t01225212344._1 | |
273 | + | let amount = $t01225212344._2 | |
255 | 274 | $Tuple5(period, amount, userIdx, cfgArray, latestPeriod) | |
256 | 275 | } | |
257 | 276 | } | |
258 | 277 | ||
259 | 278 | ||
260 | 279 | @Callable(i) | |
261 | 280 | func processNextBatch (boostingContract,currentPeriod,currentUser,depth,totalWeight) = if ((i.caller != this)) | |
262 | 281 | then throw("Should be called by this script only") | |
263 | 282 | else { | |
264 | 283 | let tpl = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight) | |
265 | 284 | $Tuple2(tpl._1, $Tuple3(tpl._2, tpl._3, tpl._4)) | |
266 | 285 | } | |
267 | 286 | ||
268 | 287 | ||
269 | 288 | ||
270 | 289 | @Callable(i) | |
271 | 290 | func processPendingPeriodsAndUsers () = { | |
272 | 291 | let currentPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
273 | 292 | if ((currentPeriod > getNumberByKey(keyLatestPeriod()))) | |
274 | 293 | then throw("Nothing to process") | |
275 | 294 | else { | |
276 | 295 | let cfgArray = readConfigArrayOrFail() | |
277 | 296 | let depth = parseIntValue(cfgArray[IdxCfgMaxDepth]) | |
278 | 297 | if ((depth > MAXDEPTH)) | |
279 | 298 | then throw("Depth exceeds MAXDEPTH") | |
280 | 299 | else { | |
281 | 300 | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
282 | 301 | let currentUser = getNumberByKey(keyNextProcessedUser()) | |
283 | 302 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
284 | 303 | let r = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight) | |
285 | 304 | ((r._1 :+ IntegerEntry(keyNextProcessedPeriod(), r._2)) :+ IntegerEntry(keyNextProcessedUser(), r._3)) | |
286 | 305 | } | |
287 | 306 | } | |
288 | 307 | } | |
289 | 308 | ||
290 | 309 | ||
291 | 310 | ||
292 | 311 | @Callable(i) | |
293 | 312 | func deposit () = { | |
294 | 313 | let cfgArray = readConfigArrayOrFail() | |
295 | 314 | if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress])))) | |
296 | 315 | then throw("Wrong caller address") | |
297 | 316 | else { | |
298 | 317 | let assetId = value(value(i.payments[0]).assetId) | |
299 | 318 | if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId]))) | |
300 | 319 | then throw("Wrong payment asset") | |
301 | 320 | else { | |
302 | 321 | let period = nextPeriod() | |
303 | 322 | [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyTotalAmountForPeriod(period), value(i.payments[0]).amount), IntegerEntry(keyNextPeriod(), (period + 1))] | |
304 | 323 | } | |
305 | 324 | } | |
306 | 325 | } | |
307 | 326 | ||
308 | 327 | ||
309 | 328 | ||
310 | 329 | @Callable(i) | |
311 | 330 | func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalWeight) = if ((i.caller != this)) | |
312 | 331 | then throw("Should be called by this script only") | |
313 | 332 | else { | |
314 | 333 | let periodAndTotal = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight) | |
315 | 334 | $Tuple2(nil, periodAndTotal) | |
316 | 335 | } | |
317 | 336 | ||
318 | 337 | ||
319 | 338 | ||
320 | 339 | @Callable(i) | |
321 | 340 | func claimReward () = { | |
322 | 341 | let address = toString(i.caller) | |
323 | - | let $ | |
324 | - | let period = $ | |
325 | - | let amount = $ | |
326 | - | let userIdx = $ | |
327 | - | let cfgArray = $ | |
328 | - | let latestPeriod = $ | |
342 | + | let $t01528415366 = commonClaimReward(address) | |
343 | + | let period = $t01528415366._1 | |
344 | + | let amount = $t01528415366._2 | |
345 | + | let userIdx = $t01528415366._3 | |
346 | + | let cfgArray = $t01528415366._4 | |
347 | + | let latestPeriod = $t01528415366._5 | |
329 | 348 | $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, amount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, period, latestPeriod, i)], amount) | |
330 | 349 | } | |
331 | 350 | ||
332 | 351 | ||
333 | 352 | ||
334 | 353 | @Callable(i) | |
335 | 354 | func claimRewardREADONLY (address) = { | |
336 | 355 | let claimResults = commonClaimReward(address) | |
337 | 356 | let amount = claimResults._2 | |
338 | 357 | $Tuple2(nil, amount) | |
339 | 358 | } | |
340 | 359 | ||
341 | 360 | ||
342 | 361 | ||
343 | 362 | @Callable(i) | |
344 | 363 | func calcGwxParamsREADONLY (wxAmount,lockStartHeight,lockDurationBlocks) = { | |
345 | 364 | let lockEndHeight = (lockStartHeight + lockDurationBlocks) | |
346 | 365 | let scale8ParamK = -(fraction(wxAmount, SCALE, lockDurationBlocks)) | |
347 | 366 | let scale8ParamB = (fraction(wxAmount, SCALE, lockDurationBlocks) * lockEndHeight) | |
348 | 367 | $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()]) | |
349 | 368 | } | |
350 | 369 | ||
351 | 370 | ||
352 | 371 | ||
353 | 372 | @Callable(i) | |
373 | + | func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = { | |
374 | + | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
375 | + | let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8) | |
376 | + | $Tuple2(nil, [gWxAmountStart]) | |
377 | + | } | |
378 | + | ||
379 | + | ||
380 | + | ||
381 | + | @Callable(i) | |
354 | 382 | func constructor (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = if ((this != i.caller)) | |
355 | 383 | then throw("not authorized") | |
356 | 384 | else [StringEntry(keyConfig(), formatConfig(wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, maxDepth))] | |
385 | + | ||
386 | + | ||
387 | + | ||
388 | + | @Callable(i) | |
389 | + | func constructorV2 (factoryAddress) = if ((this != i.caller)) | |
390 | + | then throw("not authorized") | |
391 | + | else [StringEntry(keyFactoryAddress(), factoryAddress)] | |
392 | + | ||
393 | + | ||
394 | + | ||
395 | + | @Callable(i) | |
396 | + | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
397 | + | then throw("permissions denied") | |
398 | + | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
399 | + | ||
400 | + | ||
401 | + | ||
402 | + | @Callable(i) | |
403 | + | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
404 | + | let nCoins = toBigInt(2) | |
405 | + | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
406 | + | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
407 | + | let x1 = parseBigIntValue(x1BigIntStr) | |
408 | + | let x2 = parseBigIntValue(x2BigIntStr) | |
409 | + | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
410 | + | let s = (x1 + x2) | |
411 | + | if ((s == zeroBigInt)) | |
412 | + | then $Tuple2(nil, toString(zeroBigInt)) | |
413 | + | else { | |
414 | + | let ann = (amp * nCoins) | |
415 | + | let arr = [1, 2, 3, 4, 5, 6, 7] | |
416 | + | func calc (acc,cur) = { | |
417 | + | let $t01804918238 = acc | |
418 | + | let d = $t01804918238._1 | |
419 | + | let dPrev = $t01804918238._2 | |
420 | + | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
421 | + | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
422 | + | $Tuple2(dNext, d) | |
423 | + | } | |
424 | + | ||
425 | + | let $t01845118501 = { | |
426 | + | let $l = arr | |
427 | + | let $s = size($l) | |
428 | + | let $acc0 = $Tuple2(s, unit) | |
429 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
430 | + | then $a | |
431 | + | else calc($a, $l[$i]) | |
432 | + | ||
433 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
434 | + | then $a | |
435 | + | else throw("List size exceeds 7") | |
436 | + | ||
437 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
438 | + | } | |
439 | + | let dNext = $t01845118501._1 | |
440 | + | let dPrev = $t01845118501._2 | |
441 | + | let dDiff = abs((dNext - value(dPrev))) | |
442 | + | if ((targetPrecision >= dDiff)) | |
443 | + | then $Tuple2(nil, toString(dNext)) | |
444 | + | else throw(("D calculation error, dDiff = " + toString(dDiff))) | |
445 | + | } | |
446 | + | } | |
357 | 447 | ||
358 | 448 |
github/deemru/w8io/169f3d6 57.94 ms ◑