tx · BcM2YkLT9CAJtvtavJSGYTDTzgapKXtVXN4tB7D29onc

3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE:  -0.01400000 Waves

2021.12.23 18:18 [1847073] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves

{ "type": 13, "id": "BcM2YkLT9CAJtvtavJSGYTDTzgapKXtVXN4tB7D29onc", "fee": 1400000, "feeAssetId": null, "timestamp": 1640272792318, "version": 1, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "4wNjZceBGuHvRaxXiop5ZwgPLVrCqCroNTChhZSW8pvc6MyxVXiAAmiEjB8J84vgXWMgtqrdLEUkA1kzZ93PEb1R" ], "script": "base64:AAIFAAAAAAAAAEUIAhIHCgUCAQEBARIAEgASBwoFAgEBAQESABIDCgEIEgUKAwEBARIFCgMBAQESBgoECAgIARIDCgEIEgASBwoFCAgICAgAAAAsAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAANTRVACAAAAAl9fAAAAAAhNQVhERVBUSAAAAAAAAAAAEQAAAAAJVVNFUkRFUFRIAAAAAAAAAAAaAAAAAAVTQ0FMRQAAAAAAAAAD6AAAAAAFTVVMVDgAAAAAAAX14QAAAAAACnplcm9CaWdJbnQJAAE2AAAAAQAAAAAAAAAAAAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJA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IGREaWZmID0gCQABpgAAAAEFAAAABWREaWZmAAAAAI9PY2A=", "chainId": 84, "height": 1847073, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9U1BrvMcfzZY2mTbNvYVAvLZc93n5EGrTkjMygeNmnWE Next: Btqaz7LkQ49be4o2iEZTeSPA84wRNo2odZzzkTzfmRCw Diff:
OldNewDifferences
1313
1414 let MULT8 = 100000000
1515
16+let zeroBigInt = toBigInt(0)
17+
1618 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1719
1820
2022
2123
2224 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
25+
26+
27+func abs (val) = if ((zeroBigInt > val))
28+ then -(val)
29+ else val
2330
2431
2532 func keyFactoryAddress () = "%s%s__config__factoryAddress"
240247 let latestPeriod = getNumberByKey(keyNextProcessedPeriod())
241248 let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod))
242249 let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod))
243- let $t01112411236 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser)
244- let userWeight = $t01112411236._1
245- let ignored = $t01112411236._2
250+ let $t01121911331 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser)
251+ let userWeight = $t01121911331._1
252+ let ignored = $t01121911331._2
246253 let userAmountForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight)
247254 if (if ((0 >= depth))
248255 then true
261268 then throw("Nothing to claim")
262269 else {
263270 let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract])
264- let $t01215712249 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0)
265- let period = $t01215712249._1
266- let amount = $t01215712249._2
271+ let $t01225212344 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0)
272+ let period = $t01225212344._1
273+ let amount = $t01225212344._2
267274 $Tuple5(period, amount, userIdx, cfgArray, latestPeriod)
268275 }
269276 }
332339 @Callable(i)
333340 func claimReward () = {
334341 let address = toString(i.caller)
335- let $t01518915271 = commonClaimReward(address)
336- let period = $t01518915271._1
337- let amount = $t01518915271._2
338- let userIdx = $t01518915271._3
339- let cfgArray = $t01518915271._4
340- let latestPeriod = $t01518915271._5
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
341348 $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, amount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, period, latestPeriod, i)], amount)
342349 }
343350
391398 else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)]
392399
393400
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+ }
447+
448+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let revisionNum = ""
55
66 let SEP = "__"
77
88 let MAXDEPTH = 17
99
1010 let USERDEPTH = 26
1111
1212 let SCALE = 1000
1313
1414 let MULT8 = 100000000
1515
16+let zeroBigInt = toBigInt(0)
17+
1618 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1719
1820
1921 func getStringByKey (key) = valueOrElse(getString(this, key), "")
2022
2123
2224 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
25+
26+
27+func abs (val) = if ((zeroBigInt > val))
28+ then -(val)
29+ else val
2330
2431
2532 func keyFactoryAddress () = "%s%s__config__factoryAddress"
2633
2734
2835 let factoryAddressStr = getStringOrFail(keyFactoryAddress())
2936
3037 let factoryContract = addressFromStringValue(factoryAddressStr)
3138
3239 let IdxCfgAssetId = 1
3340
3441 let IdxCfgPacemakerAddress = 2
3542
3643 let IdxCfgBoostingContract = 3
3744
3845 let IdxCfgMaxDepth = 4
3946
4047 func keyConfig () = "%s__config"
4148
4249
4350 func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP)
4451
4552
4653 func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP)
4754
4855
4956 func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
5057
5158
5259 func keyUsersCount () = "%s__nextUserNum"
5360
5461
5562 func keyNextProcessedUser () = "%s__nextProcessedUser"
5663
5764
5865 func keyLatestPeriod () = "%s__latestPeriod"
5966
6067
6168 func keyNextPeriod () = "%s__nextPeriod"
6269
6370
6471 func keyNextProcessedPeriod () = "%s__nextProcessedPeriod"
6572
6673
6774 func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP)
6875
6976
7077 func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP)
7178
7279
7380 func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP)
7481
7582
7683 func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP)
7784
7885
7986 func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP)
8087
8188
8289 func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP)
8390
8491
8592 func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP)
8693
8794
8895 func HistoryEntry (type,user,amount,currentPeriod,latestPeriod,i) = {
8996 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
9097 let historyDATA = makeString(["%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(currentPeriod), toString(latestPeriod)], SEP)
9198 StringEntry(historyKEY, historyDATA)
9299 }
93100
94101
95102 func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = {
96103 let kLast = keyLastProcessedPeriodOfUser(userIndex)
97104 let kKey = keyUserKValueForPeriod(period, userIndex)
98105 let kRaw = getInteger(boostingContractAddress, kKey)
99106 if (isDefined(kRaw))
100107 then {
101108 let k = value(kRaw)
102109 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex)))
103110 let w = ((k * heightForPeriod) + b)
104111 if ((w > 0))
105112 then $Tuple2((w / SCALE), [IntegerEntry(kLast, period)])
106113 else $Tuple2(0, nil)
107114 }
108115 else {
109116 let p = getInteger(this, kLast)
110117 if (isDefined(p))
111118 then {
112119 let pv = value(p)
113120 let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex)))
114121 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex)))
115122 let w = ((k * heightForPeriod) + b)
116123 if ((w > 0))
117124 then $Tuple2((w / SCALE), nil)
118125 else $Tuple2(0, nil)
119126 }
120127 else $Tuple2(0, nil)
121128 }
122129 }
123130
124131
125132 func getUserIndexByAddress (boostingContractAddressStr,userAddress) = {
126133 let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP)
127134 parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key)))
128135 }
129136
130137
131138 func nextPeriod () = getNumberByKey(keyNextPeriod())
132139
133140
134141 func invokeProcess (boostingContract,period,user,depth,weight) = {
135142 let result = invoke(this, "processNextBatch", [boostingContract, period, user, depth, weight], nil)
136143 if ((result == result))
137144 then match result {
138145 case r: (Int, Int, Int) =>
139146 r
140147 case _ =>
141148 throw("Incorrect invoke result")
142149 }
143150 else throw("Strict value is not equal to itself.")
144151 }
145152
146153
147154 func checkLastPartOfPeriod (boostingContract,currentPeriod,latestPeriod,depth,totalWeightKey,weight) = if ((latestPeriod >= (currentPeriod + 1)))
148155 then invokeProcess(boostingContract, (currentPeriod + 1), 0, (depth - 1), 0)
149156 else $Tuple3((currentPeriod + 1), 0, 0)
150157
151158
152159 func processNextBatchInternal (boostingContract,currentPeriod,currentUser,depth,totalWeight) = {
153160 let boostingContractAddress = Address(boostingContract)
154161 let latestPeriod = getNumberByKey(keyLatestPeriod())
155162 let usersCount = valueOrElse(getInteger(boostingContractAddress, keyUsersCount()), 0)
156163 let totalWeightKey = keyTotalWeightForPeriod(currentPeriod)
157164 let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod))
158165 if (if ((depth > 0))
159166 then (latestPeriod >= currentPeriod)
160167 else false)
161168 then {
162169 let t0 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser)
163170 let weight0 = (totalWeight + t0._1)
164171 if ((usersCount > (currentUser + 1)))
165172 then {
166173 let t1 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 1))
167174 let weight1 = (weight0 + t1._1)
168175 if ((usersCount > (currentUser + 2)))
169176 then {
170177 let t2 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 2))
171178 let weight2 = (weight1 + t2._1)
172179 if ((usersCount > (currentUser + 3)))
173180 then {
174181 let t3 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 3))
175182 let weight3 = (weight2 + t3._1)
176183 if ((usersCount > (currentUser + 4)))
177184 then {
178185 let t4 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 4))
179186 let weight4 = (weight3 + t4._1)
180187 if ((usersCount > (currentUser + 5)))
181188 then {
182189 let t5 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 5))
183190 let weight5 = (weight4 + t5._1)
184191 if ((usersCount > (currentUser + 6)))
185192 then {
186193 let r5 = invokeProcess(boostingContract, currentPeriod, (currentUser + 6), (depth - 1), weight5)
187194 $Tuple4((((((t0._2 ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), r5._1, r5._2, r5._3)
188195 }
189196 else {
190197 let r5 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight5)
191198 $Tuple4((((((([IntegerEntry(totalWeightKey, weight5)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), r5._1, r5._2, r5._3)
192199 }
193200 }
194201 else {
195202 let r4 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight4)
196203 $Tuple4(((((([IntegerEntry(totalWeightKey, weight4)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2), r4._1, r4._2, r4._3)
197204 }
198205 }
199206 else {
200207 let r3 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight3)
201208 $Tuple4((((([IntegerEntry(totalWeightKey, weight3)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2), r3._1, r3._2, r3._3)
202209 }
203210 }
204211 else {
205212 let r2 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight2)
206213 $Tuple4(((([IntegerEntry(totalWeightKey, weight2)] ++ t0._2) ++ t1._2) ++ t2._2), r2._1, r2._2, r2._3)
207214 }
208215 }
209216 else {
210217 let r1 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight1)
211218 $Tuple4((([IntegerEntry(totalWeightKey, weight1)] ++ t0._2) ++ t1._2), r1._1, r1._2, r1._3)
212219 }
213220 }
214221 else {
215222 let r0 = checkLastPartOfPeriod(boostingContract, currentPeriod, latestPeriod, depth, totalWeightKey, weight0)
216223 $Tuple4(([IntegerEntry(totalWeightKey, weight0)] ++ t0._2), r0._1, r0._2, r0._3)
217224 }
218225 }
219226 else if ((currentUser == 0))
220227 then $Tuple4(nil, currentPeriod, 0, 0)
221228 else $Tuple4([IntegerEntry(totalWeightKey, totalWeight)], currentPeriod, currentUser, 0)
222229 }
223230
224231
225232 func invokeClaim (boostingContract,period,user,depth,total) = {
226233 let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, total], nil)
227234 if ((result == result))
228235 then match result {
229236 case r: (Int, Int) =>
230237 r
231238 case _ =>
232239 throw("Incorrect invoke result")
233240 }
234241 else throw("Strict value is not equal to itself.")
235242 }
236243
237244
238245 func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulated) = {
239246 let boostingContractAddress = Address(boostingContract)
240247 let latestPeriod = getNumberByKey(keyNextProcessedPeriod())
241248 let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod))
242249 let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod))
243- let $t01112411236 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser)
244- let userWeight = $t01112411236._1
245- let ignored = $t01112411236._2
250+ let $t01121911331 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser)
251+ let userWeight = $t01121911331._1
252+ let ignored = $t01121911331._2
246253 let userAmountForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight)
247254 if (if ((0 >= depth))
248255 then true
249256 else ((currentPeriod + 1) >= latestPeriod))
250257 then $Tuple2((currentPeriod + 1), (userAccumulated + userAmountForPeriod))
251258 else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulated + userAmountForPeriod))
252259 }
253260
254261
255262 func commonClaimReward (userAddress) = {
256263 let cfgArray = readConfigArrayOrFail()
257264 let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress)
258265 let currentPeriod = getNumberByKey(keyNextUnlaimedPeriodOfUser(userIdx))
259266 let latestPeriod = getNumberByKey(keyNextProcessedPeriod())
260267 if ((currentPeriod >= latestPeriod))
261268 then throw("Nothing to claim")
262269 else {
263270 let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract])
264- let $t01215712249 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0)
265- let period = $t01215712249._1
266- let amount = $t01215712249._2
271+ let $t01225212344 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0)
272+ let period = $t01225212344._1
273+ let amount = $t01225212344._2
267274 $Tuple5(period, amount, userIdx, cfgArray, latestPeriod)
268275 }
269276 }
270277
271278
272279 @Callable(i)
273280 func processNextBatch (boostingContract,currentPeriod,currentUser,depth,totalWeight) = if ((i.caller != this))
274281 then throw("Should be called by this script only")
275282 else {
276283 let tpl = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight)
277284 $Tuple2(tpl._1, $Tuple3(tpl._2, tpl._3, tpl._4))
278285 }
279286
280287
281288
282289 @Callable(i)
283290 func processPendingPeriodsAndUsers () = {
284291 let currentPeriod = getNumberByKey(keyNextProcessedPeriod())
285292 if ((currentPeriod > getNumberByKey(keyLatestPeriod())))
286293 then throw("Nothing to process")
287294 else {
288295 let cfgArray = readConfigArrayOrFail()
289296 let depth = parseIntValue(cfgArray[IdxCfgMaxDepth])
290297 if ((depth > MAXDEPTH))
291298 then throw("Depth exceeds MAXDEPTH")
292299 else {
293300 let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract])
294301 let currentUser = getNumberByKey(keyNextProcessedUser())
295302 let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod))
296303 let r = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight)
297304 ((r._1 :+ IntegerEntry(keyNextProcessedPeriod(), r._2)) :+ IntegerEntry(keyNextProcessedUser(), r._3))
298305 }
299306 }
300307 }
301308
302309
303310
304311 @Callable(i)
305312 func deposit () = {
306313 let cfgArray = readConfigArrayOrFail()
307314 if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress]))))
308315 then throw("Wrong caller address")
309316 else {
310317 let assetId = value(value(i.payments[0]).assetId)
311318 if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId])))
312319 then throw("Wrong payment asset")
313320 else {
314321 let period = nextPeriod()
315322 [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyTotalAmountForPeriod(period), value(i.payments[0]).amount), IntegerEntry(keyNextPeriod(), (period + 1))]
316323 }
317324 }
318325 }
319326
320327
321328
322329 @Callable(i)
323330 func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalWeight) = if ((i.caller != this))
324331 then throw("Should be called by this script only")
325332 else {
326333 let periodAndTotal = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight)
327334 $Tuple2(nil, periodAndTotal)
328335 }
329336
330337
331338
332339 @Callable(i)
333340 func claimReward () = {
334341 let address = toString(i.caller)
335- let $t01518915271 = commonClaimReward(address)
336- let period = $t01518915271._1
337- let amount = $t01518915271._2
338- let userIdx = $t01518915271._3
339- let cfgArray = $t01518915271._4
340- let latestPeriod = $t01518915271._5
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
341348 $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, amount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, period, latestPeriod, i)], amount)
342349 }
343350
344351
345352
346353 @Callable(i)
347354 func claimRewardREADONLY (address) = {
348355 let claimResults = commonClaimReward(address)
349356 let amount = claimResults._2
350357 $Tuple2(nil, amount)
351358 }
352359
353360
354361
355362 @Callable(i)
356363 func calcGwxParamsREADONLY (wxAmount,lockStartHeight,lockDurationBlocks) = {
357364 let lockEndHeight = (lockStartHeight + lockDurationBlocks)
358365 let scale8ParamK = -(fraction(wxAmount, SCALE, lockDurationBlocks))
359366 let scale8ParamB = (fraction(wxAmount, SCALE, lockDurationBlocks) * lockEndHeight)
360367 $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()])
361368 }
362369
363370
364371
365372 @Callable(i)
366373 func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = {
367374 let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration)
368375 let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8)
369376 $Tuple2(nil, [gWxAmountStart])
370377 }
371378
372379
373380
374381 @Callable(i)
375382 func constructor (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = if ((this != i.caller))
376383 then throw("not authorized")
377384 else [StringEntry(keyConfig(), formatConfig(wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, maxDepth))]
378385
379386
380387
381388 @Callable(i)
382389 func constructorV2 (factoryAddress) = if ((this != i.caller))
383390 then throw("not authorized")
384391 else [StringEntry(keyFactoryAddress(), factoryAddress)]
385392
386393
387394
388395 @Callable(i)
389396 func onEmissionForGwxStart () = if ((i.caller != factoryContract))
390397 then throw("permissions denied")
391398 else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)]
392399
393400
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+ }
447+
448+

github/deemru/w8io/169f3d6 
68.50 ms