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