tx · A4MpZkcfD8CUmaNtusZTvkrS9RdWe6CQFGoBxPmQmgdq

3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA:  -0.02500000 Waves

2023.07.05 15:11 [2652603] smart account 3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA > SELF 0.00000000 Waves

{ "type": 13, "id": "A4MpZkcfD8CUmaNtusZTvkrS9RdWe6CQFGoBxPmQmgdq", "fee": 2500000, "feeAssetId": null, "timestamp": 1688559103097, "version": 1, "sender": "3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA", "senderPublicKey": "8nr9XxGKmrRg6E6Zss6YPynBYEFbCf39Z2D9WvVuUgzY", "proofs": [ "2M5zs1aTEcD5L8MLPkcxSJTmZdZtxrtyff9vd27uzJ2rGKBjv6RT1kqbYYxF1DhDuJ6VFczCBcsy63MyQqtn2LTf" ], "script": "base64:BwIqCAISAwoBAhIGCgQCAQEBEgMKAQISAwoBAhIECgICAhIECgICAhIDCgECKgADU0VQAgJfXwANQ09OVFJBQ1RfTkFNRQIPY2FsY3VsYXRvci5yaWRlAAZTQ0FMRTgAgMLXLwAHUEVORElORwIHUEVORElORwAIRklOSVNIRUQCCEZJTklTSEVEAAVXQVZFUwIFV0FWRVMBB3dyYXBFcnIBAXMJAKwCAgkArAICBQ1DT05UUkFDVF9OQU1FAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD2Fzc2V0SWRUb1N0cmluZwEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDYBAEFAWIDCQABAgUHJG1hdGNoMAIEVW5pdAUFV0FWRVMJAAIBAgtNYXRjaCBlcnJvcgEDYWJzAQFuAwkAZgIAAAUBbgkBAS0BBQFuBQFuARFrZXlGYWN0b3J5QWRkcmVzcwAJALkJAgkAzAgCAgIlcwkAzAgCAgdmYWN0b3J5BQNuaWwFA1NFUA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uaWwFA25pbAkAzAgCCQD8BwQFFGZhY3RvcnlBZGRyZXNzT3JGYWlsAgxpbnRlZ2VyRW50cnkJAMwIAgkBC2tleUludmVzdGVkAQUEdW5pdAkAzAgCCQBkAgUIaW52ZXN0ZWQFGnJld2FyZFRvTWFpblRyZWFzdXJ5QW1vdW50BQNuaWwFA25pbAUDbmlsAwkAAAIFB2FjdGlvbnMFB2FjdGlvbnMJAJQKAgUDbmlsBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQJcHVibGljS2V5BAckbWF0Y2gwCQEZZ2V0TWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQDcHViBQckbWF0Y2gwBQNwdWIIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCXB1YmxpY0tleSKu6e8=", "chainId": 84, "height": 2652603, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2vR8ERZxpps5k958HXZ4WrVupTxnExYJJu8xUSqPVFi9 Next: DPFPUjQknkXcW39XR6YG7J82qbzUbjTKmSA75aVPE61d Diff:
OldNewDifferences
296296 else 0, SCALE8)
297297 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
298298 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
299- let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
300- let donatedWavesAmountNew = (donatedWavesAmount + donationProfitPart)
299+ let donatedWavesAmountNewRaw = (donatedWavesAmount + donationProfitPart)
300+ let investedWavesAmountNewRaw = (investedWavesAmount + investmentProfitPart)
301+ let donatedPartDebt = min([0, donatedWavesAmountNewRaw])
302+ let investedPartDebt = min([0, investedWavesAmountNewRaw])
303+ let donatedWavesAmountNew = (max([0, donatedWavesAmountNewRaw]) + investedPartDebt)
304+ let investedWavesAmountNew = (max([0, investedWavesAmountNewRaw]) + donatedPartDebt)
301305 let newPeriod = (currentPeriodOrFail + 1)
302306 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
303307 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
345349 let payment = if ((size(i.payments) == 1))
346350 then i.payments[0]
347351 else throwErr("invalid payments")
348- let $t01129211469 = if (if ((payment.assetId == unit))
352+ let $t01159211769 = if (if ((payment.assetId == unit))
349353 then (payment.amount > 0)
350354 else false)
351355 then $Tuple2(payment.amount, payment.assetId)
352356 else throwErr("invalid payment amount")
353- let paymentAmount = $t01129211469._1
354- let paymentAssetId = $t01129211469._2
357+ let paymentAmount = $t01159211769._1
358+ let paymentAssetId = $t01159211769._2
355359 let lpAssetAmount = if ((currentPriceOrFail > 0))
356360 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
357361 else 0
401405 let userAddress = Address(userAddressBytes)
402406 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
403407 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
404- let $t01387613989 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
405- let status = $t01387613989._1
406- let lpAssetAmount = $t01387613989._2
407- let targetPeriod = $t01387613989._3
408- let claimTxId = $t01387613989._4
408+ let $t01417614289 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
409+ let status = $t01417614289._1
410+ let lpAssetAmount = $t01417614289._2
411+ let targetPeriod = $t01417614289._3
412+ let claimTxId = $t01417614289._4
409413 let checks = [if ((status == PENDING))
410414 then true
411415 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
436440 let userAddress = Address(userAddressBytes)
437441 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
438442 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
439- let $t01532115434 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
440- let status = $t01532115434._1
441- let lpAssetAmount = $t01532115434._2
442- let targetPeriod = $t01532115434._3
443- let claimTxId = $t01532115434._4
443+ let $t01562115734 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
444+ let status = $t01562115734._1
445+ let lpAssetAmount = $t01562115734._2
446+ let targetPeriod = $t01562115734._3
447+ let claimTxId = $t01562115734._4
444448 if ((status == FINISHED))
445449 then throwErr("invalid withdrawal request status")
446450 else if ((targetPeriod > currentPeriodOrFail))
501505 let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toString(currentPeriodOrFail), toString(generator), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)]
502506 if ((factoryActionsSingle == factoryActionsSingle))
503507 then {
504- let $t01967019703 = acc
505- let lpAssetAcc = $t01967019703._1
506- let rewardAcc = $t01967019703._2
508+ let $t01997020003 = acc
509+ let lpAssetAcc = $t01997020003._1
510+ let rewardAcc = $t01997020003._2
507511 $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail))
508512 }
509513 else throw("Strict value is not equal to itself.")
510514 }
511515
512516 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]
513- let $t01997020046 = {
517+ let $t02027020346 = {
514518 let $l = list
515519 let $s = size($l)
516520 let $acc0 = $Tuple2(0, 0)
524528
525529 $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)
526530 }
527- if (($t01997020046 == $t01997020046))
531+ if (($t02027020346 == $t02027020346))
528532 then {
529- let rewardAmountTotal = $t01997020046._2
530- let lpAssetAmountTotal = $t01997020046._1
533+ let rewardAmountTotal = $t02027020346._2
534+ let lpAssetAmountTotal = $t02027020346._1
531535 let rewardToMainTreasuryAmount = (rewardAmountTotal - blockProcessingReward)
532536 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
533537 let actions = [invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [mainTreasuryAddressOrFail.bytes, rewardToMainTreasuryAmount], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + rewardToMainTreasuryAmount)], nil)]
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 PENDING = "PENDING"
1111
1212 let FINISHED = "FINISHED"
1313
1414 let WAVES = "WAVES"
1515
1616 func wrapErr (s) = ((CONTRACT_NAME + ": ") + s)
1717
1818
1919 func throwErr (s) = throw(wrapErr(s))
2020
2121
2222 func assetIdToString (assetId) = match assetId {
2323 case b: ByteVector =>
2424 toBase58String(b)
2525 case _: Unit =>
2626 WAVES
2727 case _ =>
2828 throw("Match error")
2929 }
3030
3131
3232 func abs (n) = if ((0 > n))
3333 then -(n)
3434 else n
3535
3636
3737 func keyFactoryAddress () = makeString(["%s", "factory"], SEP)
3838
3939
4040 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
4141
4242
4343 func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP)
4444
4545
4646 func keyProxyTreasuryAddress () = makeString(["%s", "proxyTreasury"], SEP)
4747
4848
4949 func keyMainTreasuryAddress () = makeString(["%s", "mainTreasury"], SEP)
5050
5151
5252 func keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP)
5353
5454
5555 func keyDonated (assetId) = makeString(["%s%s", "donated", assetIdToString(assetId)], SEP)
5656
5757
5858 func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP)
5959
6060
6161 func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP)
6262
6363
6464 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
6565
6666
6767 func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP)
6868
6969
7070 func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
7171
7272
7373 func keyPeriodLength () = "%s__periodLength"
7474
7575
7676 func keyBlockProcessingReward () = "%s__blockProcessingReward"
7777
7878
7979 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
8080
8181
8282 func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP)
8383
8484
8585 func keyWithdrawal () = "%s__withdrawal"
8686
8787
8888 func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP)
8989
9090
9191 func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = {
9292 let claimTxIdStr = match claimTxId {
9393 case b: ByteVector =>
9494 toBase58String(b)
9595 case _: Unit =>
9696 "SOON"
9797 case _ =>
9898 throw("Match error")
9999 }
100100 makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP)
101101 }
102102
103103
104104 func parseWithdrawalRequestValueOrFail (s) = {
105105 let parts = split(s, SEP)
106106 if ((size(parts) == 5))
107107 then {
108108 let status = parts[1]
109109 let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount"))
110110 let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod"))
111111 let claimTxId = parts[4]
112112 $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId)
113113 }
114114 else throwErr("invalid withdrawal request value")
115115 }
116116
117117
118118 let factoryAddressOption = match getString(this, keyFactoryAddress()) {
119119 case s: String =>
120120 addressFromString(s)
121121 case _: Unit =>
122122 unit
123123 case _ =>
124124 throw("Match error")
125125 }
126126
127127 let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
128128
129129 let lpAssetIdOption = match factoryAddressOption {
130130 case a: Address =>
131131 match getString(a, keyLpAssetId()) {
132132 case s: String =>
133133 fromBase58String(s)
134134 case _: Unit =>
135135 unit
136136 case _ =>
137137 throw("Match error")
138138 }
139139 case _: Unit =>
140140 unit
141141 case _ =>
142142 throw("Match error")
143143 }
144144
145145 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
146146
147147 let proxyTreasuryAddressOption = match factoryAddressOption {
148148 case a: Address =>
149149 match getString(a, keyProxyTreasuryAddress()) {
150150 case s: String =>
151151 addressFromString(s)
152152 case _: Unit =>
153153 unit
154154 case _ =>
155155 throw("Match error")
156156 }
157157 case _: Unit =>
158158 unit
159159 case _ =>
160160 throw("Match error")
161161 }
162162
163163 let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address"))
164164
165165 let mainTreasuryAddressOption = match factoryAddressOption {
166166 case a: Address =>
167167 match getString(a, keyMainTreasuryAddress()) {
168168 case s: String =>
169169 addressFromString(s)
170170 case _: Unit =>
171171 unit
172172 case _ =>
173173 throw("Match error")
174174 }
175175 case _: Unit =>
176176 unit
177177 case _ =>
178178 throw("Match error")
179179 }
180180
181181 let mainTreasuryAddressOrFail = valueOrErrorMessage(mainTreasuryAddressOption, wrapErr("invalid main treasury address"))
182182
183183 func getManagerPublicKeyOrUnit () = match factoryAddressOption {
184184 case fa: Address =>
185185 match getString(fa, keyManagerPublicKey()) {
186186 case pub: String =>
187187 fromBase58String(pub)
188188 case _ =>
189189 unit
190190 }
191191 case _ =>
192192 unit
193193 }
194194
195195
196196 func onlyAddress (i,address) = if ((i.caller == address))
197197 then true
198198 else throwErr("permission denied")
199199
200200
201201 func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail)
202202
203203
204204 func rewardForOption (rewards,target) = {
205205 let s = size(rewards)
206206 let $t046294654 = rewards[0]
207207 let a0 = $t046294654._1
208208 let r0 = $t046294654._2
209209 let $t046574682 = rewards[1]
210210 let a1 = $t046574682._1
211211 let r1 = $t046574682._2
212212 let $t046854710 = rewards[2]
213213 let a2 = $t046854710._1
214214 let r2 = $t046854710._2
215215 if (if ((s > 0))
216216 then (a0 == target)
217217 else false)
218218 then r0
219219 else if (if ((s > 1))
220220 then (a1 == target)
221221 else false)
222222 then r1
223223 else if (if ((s > 2))
224224 then (a2 == target)
225225 else false)
226226 then r2
227227 else unit
228228 }
229229
230230
231231 @Callable(i)
232232 func claimLP (userAddressBytes) = {
233233 let checkCaller = onlyFactory(i)
234234 if ((checkCaller == checkCaller))
235235 then {
236236 let userAddress = Address(userAddressBytes)
237237 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0)
238238 let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0)
239239 let factoryActions = if ((available > 0))
240240 then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)]
241241 else throwErr("nothing to claim")
242242 $Tuple2(nil, factoryActions)
243243 }
244244 else throw("Strict value is not equal to itself.")
245245 }
246246
247247
248248
249249 @Callable(i)
250250 func finalize (userAddressBytes,newTreasuryVolumeInWaves,pwrManagersBonusInWaves,treasuryVolumeDiffAllocationCoef) = {
251251 let checkCaller = onlyFactory(i)
252252 if ((checkCaller == checkCaller))
253253 then {
254254 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
255255 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
256256 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
257257 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
258258 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
259259 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
260260 let checks = [if ((i.originCaller == mainTreasuryAddressOrFail))
261261 then true
262262 else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight))
263263 then true
264264 else throwErr("unprocessed blocks"), if ((newTreasuryVolumeInWaves >= 0))
265265 then true
266266 else throwErr("invalid new treasury volume"), if ((pwrManagersBonusInWaves >= 0))
267267 then true
268268 else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8)))
269269 then (SCALE8 >= treasuryVolumeDiffAllocationCoef)
270270 else false)
271271 then true
272272 else throwErr("invalid treasury volume diff allocation coefficient")]
273273 if ((checks == checks))
274274 then {
275275 let donatedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyDonated(unit)), 0)
276276 let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
277277 let currentTreasuryVolumeInWaves = (donatedWavesAmount + investedWavesAmount)
278278 let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves)
279279 let pwrManagersBonusAmount = if (if ((profitRaw > 0))
280280 then (profitRaw >= pwrManagersBonusInWaves)
281281 else false)
282282 then pwrManagersBonusInWaves
283283 else 0
284284 let profit = (profitRaw - pwrManagersBonusAmount)
285285 let donationPart = if ((currentTreasuryVolumeInWaves > 0))
286286 then fraction(donatedWavesAmount, SCALE8, currentTreasuryVolumeInWaves)
287287 else 0
288288 let donationProfitPartRaw = fraction(profit, donationPart, SCALE8)
289289 let investmentProfitPartRaw = (profit - donationProfitPartRaw)
290290 let treasuryVolumeDiffAllocationCoefAbs = abs(treasuryVolumeDiffAllocationCoef)
291291 let amountToDonation = fraction(investmentProfitPartRaw, if ((0 > treasuryVolumeDiffAllocationCoef))
292292 then treasuryVolumeDiffAllocationCoefAbs
293293 else 0, SCALE8)
294294 let amountToInvestment = fraction(donationProfitPartRaw, if ((treasuryVolumeDiffAllocationCoef > 0))
295295 then treasuryVolumeDiffAllocationCoefAbs
296296 else 0, SCALE8)
297297 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
298298 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
299- let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
300- let donatedWavesAmountNew = (donatedWavesAmount + donationProfitPart)
299+ let donatedWavesAmountNewRaw = (donatedWavesAmount + donationProfitPart)
300+ let investedWavesAmountNewRaw = (investedWavesAmount + investmentProfitPart)
301+ let donatedPartDebt = min([0, donatedWavesAmountNewRaw])
302+ let investedPartDebt = min([0, investedWavesAmountNewRaw])
303+ let donatedWavesAmountNew = (max([0, donatedWavesAmountNewRaw]) + investedPartDebt)
304+ let investedWavesAmountNew = (max([0, investedWavesAmountNewRaw]) + donatedPartDebt)
301305 let newPeriod = (currentPeriodOrFail + 1)
302306 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
303307 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
304308 let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
305309 let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
306310 let paymentOption = if ((size(i.payments) > 0))
307311 then i.payments[0]
308312 else unit
309313 let paymentAmount = value(paymentOption).amount
310314 let paymentAssetId = value(paymentOption).assetId
311315 let checkPayment = if (if ((paymentAmountMin == 0))
312316 then true
313317 else if (if ((paymentOption != unit))
314318 then (paymentAssetId == unit)
315319 else false)
316320 then (paymentAmount >= paymentAmountMin)
317321 else false)
318322 then true
319323 else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
320324 if ((checkPayment == checkPayment))
321325 then {
322326 let actions = if ((paymentOption != unit))
323327 then [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)]
324328 else nil
325329 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), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), investedWavesAmountNew], nil), invoke(factoryAddressOrFail, "integerEntry", [keyDonated(unit), donatedWavesAmountNew], nil)]
326330 $Tuple2(actions, factoryActions)
327331 }
328332 else throw("Strict value is not equal to itself.")
329333 }
330334 else throw("Strict value is not equal to itself.")
331335 }
332336 else throw("Strict value is not equal to itself.")
333337 }
334338
335339
336340
337341 @Callable(i)
338342 func invest (userAddressBytes) = {
339343 let checkCaller = onlyFactory(i)
340344 if ((checkCaller == checkCaller))
341345 then {
342346 let userAddress = Address(userAddressBytes)
343347 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
344348 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
345349 let payment = if ((size(i.payments) == 1))
346350 then i.payments[0]
347351 else throwErr("invalid payments")
348- let $t01129211469 = if (if ((payment.assetId == unit))
352+ let $t01159211769 = if (if ((payment.assetId == unit))
349353 then (payment.amount > 0)
350354 else false)
351355 then $Tuple2(payment.amount, payment.assetId)
352356 else throwErr("invalid payment amount")
353- let paymentAmount = $t01129211469._1
354- let paymentAssetId = $t01129211469._2
357+ let paymentAmount = $t01159211769._1
358+ let paymentAssetId = $t01159211769._2
355359 let lpAssetAmount = if ((currentPriceOrFail > 0))
356360 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
357361 else 0
358362 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
359363 let actions = [ScriptTransfer(mainTreasuryAddressOrFail, paymentAmount, paymentAssetId)]
360364 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentAmount)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
361365 $Tuple2(actions, factoryActions)
362366 }
363367 else throw("Strict value is not equal to itself.")
364368 }
365369
366370
367371
368372 @Callable(i)
369373 func withdraw (userAddressBytes) = {
370374 let checkCaller = onlyFactory(i)
371375 if ((checkCaller == checkCaller))
372376 then {
373377 let userAddress = Address(userAddressBytes)
374378 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
375379 let payment = if ((size(i.payments) == 1))
376380 then i.payments[0]
377381 else throwErr(wrapErr("invalid payments"))
378382 let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail))
379383 then lpAssetIdOrFail
380384 else throwErr("invalid payment asset")
381385 let paymentAmount = if ((payment.amount > 0))
382386 then payment.amount
383387 else throwErr("invalid payment amount")
384388 let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
385389 let actions = [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)]
386390 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)]
387391 if ((factoryActions == factoryActions))
388392 then $Tuple2(actions, factoryActions)
389393 else throw("Strict value is not equal to itself.")
390394 }
391395 else throw("Strict value is not equal to itself.")
392396 }
393397
394398
395399
396400 @Callable(i)
397401 func cancelWithdraw (userAddressBytes,txId) = {
398402 let checkCaller = onlyFactory(i)
399403 if ((checkCaller == checkCaller))
400404 then {
401405 let userAddress = Address(userAddressBytes)
402406 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
403407 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
404- let $t01387613989 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
405- let status = $t01387613989._1
406- let lpAssetAmount = $t01387613989._2
407- let targetPeriod = $t01387613989._3
408- let claimTxId = $t01387613989._4
408+ let $t01417614289 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
409+ let status = $t01417614289._1
410+ let lpAssetAmount = $t01417614289._2
411+ let targetPeriod = $t01417614289._3
412+ let claimTxId = $t01417614289._4
409413 let checks = [if ((status == PENDING))
410414 then true
411415 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
412416 then true
413417 else throwErr("invalid withdrawal request period")]
414418 if ((checks == checks))
415419 then {
416420 let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount"))
417421 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount))
418422 then (withdrawal - lpAssetAmount)
419423 else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
420424 if ((factoryActions == factoryActions))
421425 then $Tuple2(nil, factoryActions)
422426 else throw("Strict value is not equal to itself.")
423427 }
424428 else throw("Strict value is not equal to itself.")
425429 }
426430 else throw("Strict value is not equal to itself.")
427431 }
428432
429433
430434
431435 @Callable(i)
432436 func claimWaves (userAddressBytes,txId) = {
433437 let checkCaller = onlyFactory(i)
434438 if ((checkCaller == checkCaller))
435439 then {
436440 let userAddress = Address(userAddressBytes)
437441 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
438442 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
439- let $t01532115434 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
440- let status = $t01532115434._1
441- let lpAssetAmount = $t01532115434._2
442- let targetPeriod = $t01532115434._3
443- let claimTxId = $t01532115434._4
443+ let $t01562115734 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
444+ let status = $t01562115734._1
445+ let lpAssetAmount = $t01562115734._2
446+ let targetPeriod = $t01562115734._3
447+ let claimTxId = $t01562115734._4
444448 if ((status == FINISHED))
445449 then throwErr("invalid withdrawal request status")
446450 else if ((targetPeriod > currentPeriodOrFail))
447451 then throwErr("invalid withdrawal request period")
448452 else {
449453 let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price"))
450454 let amount = if ((priceOrFail > 0))
451455 then fraction(lpAssetAmount, priceOrFail, SCALE8)
452456 else 0
453457 let factoryActions = [invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, txId), valueWithdrawalRequest(FINISHED, lpAssetAmount, targetPeriod, i.transactionId)], nil), invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, amount], nil)]
454458 $Tuple2(nil, factoryActions)
455459 }
456460 }
457461 else throw("Strict value is not equal to itself.")
458462 }
459463
460464
461465
462466 @Callable(i)
463467 func processBlocks (userAddressBytes) = {
464468 let checkCaller = onlyFactory(i)
465469 if ((checkCaller == checkCaller))
466470 then {
467471 let userAddress = Address(userAddressBytes)
468472 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
469473 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
470474 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
471475 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
472476 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
473477 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
474478 let blocksProcessingBatchSizeMax = 40
475479 let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess))
476480 then if ((nextBlockToProcess >= currentStartHeight))
477481 then true
478482 else (currentPeriodOrFail == 0)
479483 else false)
480484 then (periodEndHeight >= nextBlockToProcess)
481485 else false)
482486 then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax])
483487 else throwErr(wrapErr("invalid target block"))
484488 let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward"))
485489 let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize)
486490 let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize))
487491 func map (acc,inc) = if ((inc >= blocksProcessingBatchSize))
488492 then acc
489493 else {
490494 let targetBlockHeight = (nextBlockToProcess + inc)
491495 let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info"))
492496 let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, proxyTreasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight))))
493497 let generator = targetBlockInfo.generator
494498 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0)
495499 let callerReward = if ((inc == (blocksProcessingBatchSize - 1)))
496500 then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder)
497501 else blockProcessingRewardByGenerator
498502 let lpAssetAmount = if ((currentPriceOrFail > 0))
499503 then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail)
500504 else 0
501505 let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toString(currentPeriodOrFail), toString(generator), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)]
502506 if ((factoryActionsSingle == factoryActionsSingle))
503507 then {
504- let $t01967019703 = acc
505- let lpAssetAcc = $t01967019703._1
506- let rewardAcc = $t01967019703._2
508+ let $t01997020003 = acc
509+ let lpAssetAcc = $t01997020003._1
510+ let rewardAcc = $t01997020003._2
507511 $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail))
508512 }
509513 else throw("Strict value is not equal to itself.")
510514 }
511515
512516 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]
513- let $t01997020046 = {
517+ let $t02027020346 = {
514518 let $l = list
515519 let $s = size($l)
516520 let $acc0 = $Tuple2(0, 0)
517521 func $f0_1 ($a,$i) = if (($i >= $s))
518522 then $a
519523 else map($a, $l[$i])
520524
521525 func $f0_2 ($a,$i) = if (($i >= $s))
522526 then $a
523527 else throw("List size exceeds 40")
524528
525529 $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)
526530 }
527- if (($t01997020046 == $t01997020046))
531+ if (($t02027020346 == $t02027020346))
528532 then {
529- let rewardAmountTotal = $t01997020046._2
530- let lpAssetAmountTotal = $t01997020046._1
533+ let rewardAmountTotal = $t02027020346._2
534+ let lpAssetAmountTotal = $t02027020346._1
531535 let rewardToMainTreasuryAmount = (rewardAmountTotal - blockProcessingReward)
532536 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
533537 let actions = [invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [mainTreasuryAddressOrFail.bytes, rewardToMainTreasuryAmount], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + rewardToMainTreasuryAmount)], nil)]
534538 if ((actions == actions))
535539 then $Tuple2(nil, unit)
536540 else throw("Strict value is not equal to itself.")
537541 }
538542 else throw("Strict value is not equal to itself.")
539543 }
540544 else throw("Strict value is not equal to itself.")
541545 }
542546
543547
544548 @Verifier(tx)
545549 func verify () = {
546550 let publicKey = match getManagerPublicKeyOrUnit() {
547551 case pub: ByteVector =>
548552 pub
549553 case _ =>
550554 tx.senderPublicKey
551555 }
552556 sigVerify(tx.bodyBytes, tx.proofs[0], publicKey)
553557 }
554558

github/deemru/w8io/026f985 
67.28 ms