tx · 4eGwYzfrhm5M6ohyQsDHjMFGTCcMVxqnmZDhv5PdH5eU

3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP:  -0.01900000 Waves

2023.06.22 16:22 [2633893] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves

{ "type": 13, "id": "4eGwYzfrhm5M6ohyQsDHjMFGTCcMVxqnmZDhv5PdH5eU", "fee": 1900000, "feeAssetId": null, "timestamp": 1687440252226, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "4h8LAsaHeYiFoheedK2Nh3eVnJLkniwqHQuDcFmg7mkAuDRYTbmCXo8uUSXeSih8xJpcygKWcddqJNiwn2tPctbr" ], "script": "base64:BwIrCAISAwoBAhIHCgUCAQEBARIDCgECEgMKAQISBAoCAgISBAoCAgISAwoBAigAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8ABlNDQUxFNgDAhD0AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9hc3NldElkVG9TdHJpbmcBB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkA2AQBBQFiAwkAAQIFByRtYXRjaDACBFVuaXQFBVdBVkVTCQACAQILTWF0Y2ggZXJyb3IBA2FicwEBbgMJAGYCAAAFAW4JAQEtAQUBbgUBbgERa2V5RmFjdG9yeUFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgI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AgkAZAIFEm5leHRCbG9ja1RvUHJvY2VzcwUZYmxvY2tzUHJvY2Vzc2luZ0JhdGNoU2l6ZQUDbmlsBQNuaWwFA25pbAMJAAACBQdhY3Rpb25zBQdhY3Rpb25zCQCUCgIFA25pbAUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlOD0x+", "height": 2633893, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7ZnmG9nsCR5qWzhQqeoZZSTe3kBgc8DbjD3uaYPyc9fA Next: 2exwXVqToTEqykJyzsPpZ5H9hRhvUQxk17HzDyuyARnJ Diff:
OldNewDifferences
288288 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
289289 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
290290 let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
291- let paymentAmountMin = fraction(lpAssetAmountToBurn, newPrice, SCALE8)
291+ let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
292292 let checkPaymentAmount = if (if ((paymentAmountMin == 0))
293293 then true
294294 else if (if ((size(i.payments) == 1))
375375 let userAddress = Address(userAddressBytes)
376376 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
377377 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
378- let $t01299513108 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
379- let status = $t01299513108._1
380- let lpAssetAmount = $t01299513108._2
381- let targetPeriod = $t01299513108._3
382- let claimTxId = $t01299513108._4
378+ let $t01330013413 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
379+ let status = $t01330013413._1
380+ let lpAssetAmount = $t01330013413._2
381+ let targetPeriod = $t01330013413._3
382+ let claimTxId = $t01330013413._4
383383 let checks = [if ((status == PENDING))
384384 then true
385385 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
410410 let userAddress = Address(userAddressBytes)
411411 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
412412 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
413- let $t01444014553 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
414- let status = $t01444014553._1
415- let lpAssetAmount = $t01444014553._2
416- let targetPeriod = $t01444014553._3
417- let claimTxId = $t01444014553._4
413+ let $t01474514858 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
414+ let status = $t01474514858._1
415+ let lpAssetAmount = $t01474514858._2
416+ let targetPeriod = $t01474514858._3
417+ let claimTxId = $t01474514858._4
418418 if ((status == FINISHED))
419419 then throwErr("invalid withdrawal request status")
420420 else if ((targetPeriod > currentPeriodOrFail))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let CONTRACT_NAME = "calculator.ride"
77
88 let SCALE8 = 100000000
99
1010 let SCALE6 = 1000000
1111
1212 let PENDING = "PENDING"
1313
1414 let FINISHED = "FINISHED"
1515
1616 let WAVES = "WAVES"
1717
1818 func wrapErr (s) = ((CONTRACT_NAME + ": ") + s)
1919
2020
2121 func throwErr (s) = throw(wrapErr(s))
2222
2323
2424 func assetIdToString (assetId) = match assetId {
2525 case b: ByteVector =>
2626 toBase58String(b)
2727 case _: Unit =>
2828 WAVES
2929 case _ =>
3030 throw("Match error")
3131 }
3232
3333
3434 func abs (n) = if ((0 > n))
3535 then -(n)
3636 else n
3737
3838
3939 func keyFactoryAddress () = makeString(["%s", "factory"], SEP)
4040
4141
4242 func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP)
4343
4444
4545 func keyXtnAssetId () = makeString(["%s", "xtnAssetId"], SEP)
4646
4747
4848 func keyTreasuryAddress () = makeString(["%s", "treasury"], SEP)
4949
5050
5151 func keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP)
5252
5353
5454 func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP)
5555
5656
5757 func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP)
5858
5959
6060 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
6161
6262
6363 func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP)
6464
6565
6666 func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
6767
6868
6969 func keyPeriodLength () = "%s__periodLength"
7070
7171
7272 func keyBlockProcessingReward () = "%s__blockProcessingReward"
7373
7474
7575 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
7676
7777
7878 func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP)
7979
8080
8181 func keyWithdrawal () = "%s__withdrawal"
8282
8383
8484 func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP)
8585
8686
8787 func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = {
8888 let claimTxIdStr = match claimTxId {
8989 case b: ByteVector =>
9090 toBase58String(b)
9191 case _: Unit =>
9292 "SOON"
9393 case _ =>
9494 throw("Match error")
9595 }
9696 makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP)
9797 }
9898
9999
100100 func parseWithdrawalRequestValueOrFail (s) = {
101101 let parts = split(s, SEP)
102102 if ((size(parts) == 5))
103103 then {
104104 let status = parts[1]
105105 let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount"))
106106 let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod"))
107107 let claimTxId = parts[4]
108108 $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId)
109109 }
110110 else throwErr("invalid withdrawal request value")
111111 }
112112
113113
114114 let factoryAddressOption = match getString(this, keyFactoryAddress()) {
115115 case s: String =>
116116 addressFromString(s)
117117 case _: Unit =>
118118 unit
119119 case _ =>
120120 throw("Match error")
121121 }
122122
123123 let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
124124
125125 let lpAssetIdOption = match factoryAddressOption {
126126 case a: Address =>
127127 match getString(a, keyLpAssetId()) {
128128 case s: String =>
129129 fromBase58String(s)
130130 case _: Unit =>
131131 unit
132132 case _ =>
133133 throw("Match error")
134134 }
135135 case _: Unit =>
136136 unit
137137 case _ =>
138138 throw("Match error")
139139 }
140140
141141 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
142142
143143 let xtnAssetIdOption = match factoryAddressOption {
144144 case a: Address =>
145145 match getString(a, keyXtnAssetId()) {
146146 case s: String =>
147147 fromBase58String(s)
148148 case _: Unit =>
149149 unit
150150 case _ =>
151151 throw("Match error")
152152 }
153153 case _: Unit =>
154154 unit
155155 case _ =>
156156 throw("Match error")
157157 }
158158
159159 let xtnAssetIdOrFail = valueOrErrorMessage(xtnAssetIdOption, wrapErr("invalid xtnAssetId"))
160160
161161 let treasuryAddressOption = match factoryAddressOption {
162162 case a: Address =>
163163 match getString(a, keyTreasuryAddress()) {
164164 case s: String =>
165165 addressFromString(s)
166166 case _: Unit =>
167167 unit
168168 case _ =>
169169 throw("Match error")
170170 }
171171 case _: Unit =>
172172 unit
173173 case _ =>
174174 throw("Match error")
175175 }
176176
177177 let treasuryAddressOrFail = valueOrErrorMessage(treasuryAddressOption, wrapErr("invalid treasury address"))
178178
179179 func onlyAddress (i,address) = if ((i.caller == address))
180180 then true
181181 else throwErr("permission denied")
182182
183183
184184 func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail)
185185
186186
187187 func rewardForOption (rewards,target) = {
188188 let s = size(rewards)
189189 let $t040964121 = rewards[0]
190190 let a0 = $t040964121._1
191191 let r0 = $t040964121._2
192192 let $t041244149 = rewards[1]
193193 let a1 = $t041244149._1
194194 let r1 = $t041244149._2
195195 let $t041524177 = rewards[2]
196196 let a2 = $t041524177._1
197197 let r2 = $t041524177._2
198198 if (if ((s > 0))
199199 then (a0 == target)
200200 else false)
201201 then r0
202202 else if (if ((s > 1))
203203 then (a1 == target)
204204 else false)
205205 then r1
206206 else if (if ((s > 2))
207207 then (a2 == target)
208208 else false)
209209 then r2
210210 else unit
211211 }
212212
213213
214214 @Callable(i)
215215 func claimLP (userAddressBytes) = {
216216 let checkCaller = onlyFactory(i)
217217 if ((checkCaller == checkCaller))
218218 then {
219219 let userAddress = Address(userAddressBytes)
220220 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0)
221221 let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0)
222222 let factoryActions = if ((available > 0))
223223 then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)]
224224 else throwErr("nothing to claim")
225225 $Tuple2(nil, factoryActions)
226226 }
227227 else throw("Strict value is not equal to itself.")
228228 }
229229
230230
231231
232232 @Callable(i)
233233 func finalize (userAddressBytes,newTreasuryVolumeInWaves,xtnPrice,pwrManagersBonus,treasuryVolumeDiffAllocationCoef) = {
234234 let checkCaller = onlyFactory(i)
235235 if ((checkCaller == checkCaller))
236236 then {
237237 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
238238 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
239239 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
240240 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
241241 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
242242 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
243243 let checks = [if ((i.originCaller == treasuryAddressOrFail))
244244 then true
245245 else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight))
246246 then true
247247 else throwErr("unprocessed blocks"), if ((newTreasuryVolumeInWaves >= 0))
248248 then true
249249 else throwErr("invalid new treasury volume"), if ((xtnPrice >= 0))
250250 then true
251251 else throwErr("invalid XTN price"), if (if ((pwrManagersBonus >= 0))
252252 then (SCALE8 >= pwrManagersBonus)
253253 else false)
254254 then true
255255 else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8)))
256256 then (SCALE8 >= treasuryVolumeDiffAllocationCoef)
257257 else false)
258258 then true
259259 else throwErr("invalid treasury volume diff allocation coefficient")]
260260 if ((checks == checks))
261261 then {
262262 let investedXtnAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(xtnAssetIdOrFail)), 0)
263263 let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
264264 let investedXtnAmountInWaves = fraction(investedXtnAmount, xtnPrice, SCALE6)
265265 let currentTreasuryVolumeInWaves = (investedXtnAmountInWaves + investedWavesAmount)
266266 let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves)
267267 let pwrManagersBonusAmount = if ((profitRaw > 0))
268268 then fraction(profitRaw, pwrManagersBonus, SCALE8)
269269 else 0
270270 let profit = (profitRaw - pwrManagersBonusAmount)
271271 let donationPart = if ((currentTreasuryVolumeInWaves > 0))
272272 then fraction(investedXtnAmountInWaves, SCALE8, currentTreasuryVolumeInWaves)
273273 else 0
274274 let donationProfitPartRaw = fraction(profit, donationPart, SCALE8)
275275 let investmentProfitPartRaw = (profit - donationProfitPartRaw)
276276 let treasuryVolumeDiffAllocationCoefAbs = abs(treasuryVolumeDiffAllocationCoef)
277277 let amountToDonation = fraction(investmentProfitPartRaw, if ((0 > treasuryVolumeDiffAllocationCoef))
278278 then treasuryVolumeDiffAllocationCoefAbs
279279 else 0, SCALE8)
280280 let amountToInvestment = fraction(donationProfitPartRaw, if ((treasuryVolumeDiffAllocationCoef > 0))
281281 then treasuryVolumeDiffAllocationCoefAbs
282282 else 0, SCALE8)
283283 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
284284 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
285285 let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
286286 let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), SCALE6, xtnPrice)
287287 let newPeriod = (currentPeriodOrFail + 1)
288288 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
289289 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
290290 let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
291- let paymentAmountMin = fraction(lpAssetAmountToBurn, newPrice, SCALE8)
291+ let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
292292 let checkPaymentAmount = if (if ((paymentAmountMin == 0))
293293 then true
294294 else if (if ((size(i.payments) == 1))
295295 then (i.payments[0].assetId == unit)
296296 else false)
297297 then (i.payments[0].amount >= paymentAmountMin)
298298 else false)
299299 then true
300300 else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
301301 if ((checkPaymentAmount == checkPaymentAmount))
302302 then {
303303 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyCurrentPeriod(), newPeriod], nil), invoke(factoryAddressOrFail, "integerEntry", [keyPriceForPeriod(newPeriod), newPrice], nil), invoke(factoryAddressOrFail, "integerEntry", [keyStartHeight(newPeriod), (periodEndHeight + 1)], nil), invoke(factoryAddressOrFail, "burn", [lpAssetAmountToBurn], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), 0], nil)]
304304 $Tuple2(nil, factoryActions)
305305 }
306306 else throw("Strict value is not equal to itself.")
307307 }
308308 else throw("Strict value is not equal to itself.")
309309 }
310310 else throw("Strict value is not equal to itself.")
311311 }
312312
313313
314314
315315 @Callable(i)
316316 func invest (userAddressBytes) = {
317317 let checkCaller = onlyFactory(i)
318318 if ((checkCaller == checkCaller))
319319 then {
320320 let userAddress = Address(userAddressBytes)
321321 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
322322 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
323323 let payment = if ((size(i.payments) == 1))
324324 then i.payments[0]
325325 else throwErr("invalid payments")
326326 let paymentAmount = if (if ((payment.assetId == unit))
327327 then (payment.amount > 0)
328328 else false)
329329 then payment.amount
330330 else throwErr("invalid payment amount")
331331 let lpAssetAmount = if ((currentPriceOrFail > 0))
332332 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
333333 else 0
334334 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
335335 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentAmount)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "transferWaves", [treasuryAddressOrFail.bytes, paymentAmount], [AttachedPayment(unit, paymentAmount)])]
336336 $Tuple2(nil, factoryActions)
337337 }
338338 else throw("Strict value is not equal to itself.")
339339 }
340340
341341
342342
343343 @Callable(i)
344344 func withdraw (userAddressBytes) = {
345345 let checkCaller = onlyFactory(i)
346346 if ((checkCaller == checkCaller))
347347 then {
348348 let userAddress = Address(userAddressBytes)
349349 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
350350 let payment = if ((size(i.payments) == 1))
351351 then i.payments[0]
352352 else throwErr(wrapErr("invalid payments"))
353353 let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail))
354354 then lpAssetIdOrFail
355355 else throwErr("invalid payment asset")
356356 let paymentAmount = if ((payment.amount > 0))
357357 then payment.amount
358358 else throwErr("invalid payment amount")
359359 let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
360360 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)]
361361 if ((factoryActions == factoryActions))
362362 then $Tuple2([ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)], factoryActions)
363363 else throw("Strict value is not equal to itself.")
364364 }
365365 else throw("Strict value is not equal to itself.")
366366 }
367367
368368
369369
370370 @Callable(i)
371371 func cancelWithdraw (userAddressBytes,txId) = {
372372 let checkCaller = onlyFactory(i)
373373 if ((checkCaller == checkCaller))
374374 then {
375375 let userAddress = Address(userAddressBytes)
376376 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
377377 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
378- let $t01299513108 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
379- let status = $t01299513108._1
380- let lpAssetAmount = $t01299513108._2
381- let targetPeriod = $t01299513108._3
382- let claimTxId = $t01299513108._4
378+ let $t01330013413 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
379+ let status = $t01330013413._1
380+ let lpAssetAmount = $t01330013413._2
381+ let targetPeriod = $t01330013413._3
382+ let claimTxId = $t01330013413._4
383383 let checks = [if ((status == PENDING))
384384 then true
385385 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
386386 then true
387387 else throwErr("invalid withdrawal request period")]
388388 if ((checks == checks))
389389 then {
390390 let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount"))
391391 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount))
392392 then (withdrawal - lpAssetAmount)
393393 else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
394394 if ((factoryActions == factoryActions))
395395 then $Tuple2(nil, factoryActions)
396396 else throw("Strict value is not equal to itself.")
397397 }
398398 else throw("Strict value is not equal to itself.")
399399 }
400400 else throw("Strict value is not equal to itself.")
401401 }
402402
403403
404404
405405 @Callable(i)
406406 func claimWaves (userAddressBytes,txId) = {
407407 let checkCaller = onlyFactory(i)
408408 if ((checkCaller == checkCaller))
409409 then {
410410 let userAddress = Address(userAddressBytes)
411411 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
412412 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
413- let $t01444014553 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
414- let status = $t01444014553._1
415- let lpAssetAmount = $t01444014553._2
416- let targetPeriod = $t01444014553._3
417- let claimTxId = $t01444014553._4
413+ let $t01474514858 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
414+ let status = $t01474514858._1
415+ let lpAssetAmount = $t01474514858._2
416+ let targetPeriod = $t01474514858._3
417+ let claimTxId = $t01474514858._4
418418 if ((status == FINISHED))
419419 then throwErr("invalid withdrawal request status")
420420 else if ((targetPeriod > currentPeriodOrFail))
421421 then throwErr("invalid withdrawal request period")
422422 else {
423423 let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price"))
424424 let amount = if ((priceOrFail > 0))
425425 then fraction(lpAssetAmount, priceOrFail, SCALE8)
426426 else 0
427427 let factoryActions = [invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, txId), valueWithdrawalRequest(FINISHED, lpAssetAmount, targetPeriod, i.transactionId)], nil), invoke(factoryAddressOrFail, "burn", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, amount], nil)]
428428 $Tuple2(nil, factoryActions)
429429 }
430430 }
431431 else throw("Strict value is not equal to itself.")
432432 }
433433
434434
435435
436436 @Callable(i)
437437 func processBlocks (userAddressBytes) = {
438438 let checkCaller = onlyFactory(i)
439439 if ((checkCaller == checkCaller))
440440 then {
441441 let userAddress = Address(userAddressBytes)
442442 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
443443 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
444444 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
445445 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
446446 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
447447 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
448448 let blocksProcessingBatchSizeMax = 40
449449 let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess))
450450 then if ((nextBlockToProcess >= currentStartHeight))
451451 then true
452452 else (currentPeriodOrFail == 0)
453453 else false)
454454 then (periodEndHeight >= nextBlockToProcess)
455455 else false)
456456 then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax])
457457 else throwErr(wrapErr("invalid target block"))
458458 let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward"))
459459 let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize)
460460 let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize))
461461 func map (acc,inc) = if ((inc >= blocksProcessingBatchSize))
462462 then acc
463463 else {
464464 let targetBlockHeight = (nextBlockToProcess + inc)
465465 let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info"))
466466 let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, treasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight))))
467467 let generator = targetBlockInfo.generator
468468 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0)
469469 let callerReward = if ((inc == (blocksProcessingBatchSize - 1)))
470470 then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder)
471471 else blockProcessingRewardByGenerator
472472 let lpAssetAmount = if ((currentPriceOrFail > 0))
473473 then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail)
474474 else 0
475475 let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)]
476476 if ((factoryActionsSingle == factoryActionsSingle))
477477 then (acc + lpAssetAmount)
478478 else throw("Strict value is not equal to itself.")
479479 }
480480
481481 let list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]
482482 let lpAssetAmountTotal = {
483483 let $l = list
484484 let $s = size($l)
485485 let $acc0 = 0
486486 func $f0_1 ($a,$i) = if (($i >= $s))
487487 then $a
488488 else map($a, $l[$i])
489489
490490 func $f0_2 ($a,$i) = if (($i >= $s))
491491 then $a
492492 else throw("List size exceeds 40")
493493
494494 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40)
495495 }
496496 if ((lpAssetAmountTotal == lpAssetAmountTotal))
497497 then {
498498 let actions = [invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil)]
499499 if ((actions == actions))
500500 then $Tuple2(nil, unit)
501501 else throw("Strict value is not equal to itself.")
502502 }
503503 else throw("Strict value is not equal to itself.")
504504 }
505505 else throw("Strict value is not equal to itself.")
506506 }
507507
508508
509509 @Verifier(tx)
510510 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
511511

github/deemru/w8io/169f3d6 
73.31 ms