tx · DZYiVb1nMQ2pJKqCDRp2LPatLbdkTKBQfZLMcZxya4wv

3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA:  -0.02500000 Waves

2023.07.05 16:15 [2652661] smart account 3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA > SELF 0.00000000 Waves

{ "type": 13, "id": "DZYiVb1nMQ2pJKqCDRp2LPatLbdkTKBQfZLMcZxya4wv", "fee": 2500000, "feeAssetId": null, "timestamp": 1688562969265, "version": 1, "sender": "3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA", "senderPublicKey": "8nr9XxGKmrRg6E6Zss6YPynBYEFbCf39Z2D9WvVuUgzY", "proofs": [ "5yVBiAFtspnkgXoqo46Fwf49zZ45E8xM2joHFJTJA1umEnDddDA28a4oyYxojP3qdnJXvhK9Yy7u6DjYhb2LfskA" ], "script": "base64:BwIqCAISAwoBAhIGCgQCAQEBEgMKAQISAwoBAhIECgICAhIECgICAhIDCgECKgADU0VQAgJfXwANQ09OVFJBQ1RfTkFNRQIPY2FsY3VsYXRvci5yaWRlAAZTQ0FMRTgAgMLXLwAHUEVORElORwIHUEVORElORwAIRklOSVNIRUQCCEZJTklTSEVEAAVXQVZFUwIFV0FWRVMBB3dyYXBFcnIBAXMJAKwCAgkArAICBQ1DT05UUkFDVF9OQU1FAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD2Fzc2V0SWRUb1N0cmluZwEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDYBAEFAWIDCQABAgUHJG1hdGNoMAIEVW5pdAUFV0FWRVMJAAIBAgtNYXRjaCBlcnJvcgEDYWJzAQFuAwkAZgIAAAUBbgkBAS0BBQFuBQFuARFrZXlGYWN0b3J5QWRkcmVzcwAJALkJAgkAzAgCAgIlcwkAzAgCAgdmYWN0b3J5BQNuaWwFA1NFUAETa2V5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ff:
OldNewDifferences
305305 let newPeriod = (currentPeriodOrFail + 1)
306306 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
307307 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
308- let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
309- let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
310- let paymentOption = if ((size(i.payments) > 0))
311- then i.payments[0]
312- else unit
313- let paymentAmount = value(paymentOption).amount
314- let paymentAssetId = value(paymentOption).assetId
315- let checkPayment = if (if ((paymentAmountMin == 0))
308+ let checkIfPriceNotZero = if ((newPrice != 0))
316309 then true
317- else if (if ((paymentOption != unit))
318- then (paymentAssetId == unit)
319- else false)
320- then (paymentAmount >= paymentAmountMin)
321- else false)
322- then true
323- else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
324- if ((checkPayment == checkPayment))
310+ else throwErr("LP price cannot be 0")
311+ if ((checkIfPriceNotZero == checkIfPriceNotZero))
325312 then {
326- let checkIfPriceNotZero = if ((newPrice != 0))
313+ let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
314+ let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
315+ let paymentOption = if ((size(i.payments) > 0))
316+ then i.payments[0]
317+ else unit
318+ let paymentAmount = value(paymentOption).amount
319+ let paymentAssetId = value(paymentOption).assetId
320+ let checkPayment = if (if ((paymentAmountMin == 0))
327321 then true
328- else throwErr("LP price cannot be 0")
329- if ((checkIfPriceNotZero == checkIfPriceNotZero))
322+ else if (if ((paymentOption != unit))
323+ then (paymentAssetId == unit)
324+ else false)
325+ then (paymentAmount >= paymentAmountMin)
326+ else false)
327+ then true
328+ else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
329+ if ((checkPayment == checkPayment))
330330 then {
331331 let actions = if ((paymentOption != unit))
332332 then [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)]
333333 else nil
334- 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)]
334+ 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 - paymentAmountMin)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyDonated(unit), donatedWavesAmountNew], nil)]
335335 $Tuple2(actions, factoryActions)
336336 }
337337 else throw("Strict value is not equal to itself.")
356356 let payment = if ((size(i.payments) == 1))
357357 then i.payments[0]
358358 else throwErr("invalid payments")
359- let $t01167711854 = if (if ((payment.assetId == unit))
359+ let $t01169511872 = if (if ((payment.assetId == unit))
360360 then (payment.amount > 0)
361361 else false)
362362 then $Tuple2(payment.amount, payment.assetId)
363363 else throwErr("invalid payment amount")
364- let paymentAmount = $t01167711854._1
365- let paymentAssetId = $t01167711854._2
364+ let paymentAmount = $t01169511872._1
365+ let paymentAssetId = $t01169511872._2
366366 let lpAssetAmount = if ((currentPriceOrFail > 0))
367367 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
368368 else 0
412412 let userAddress = Address(userAddressBytes)
413413 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
414414 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
415- let $t01426114374 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
416- let status = $t01426114374._1
417- let lpAssetAmount = $t01426114374._2
418- let targetPeriod = $t01426114374._3
419- let claimTxId = $t01426114374._4
415+ let $t01427914392 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
416+ let status = $t01427914392._1
417+ let lpAssetAmount = $t01427914392._2
418+ let targetPeriod = $t01427914392._3
419+ let claimTxId = $t01427914392._4
420420 let checks = [if ((status == PENDING))
421421 then true
422422 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
447447 let userAddress = Address(userAddressBytes)
448448 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
449449 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
450- let $t01570615819 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
451- let status = $t01570615819._1
452- let lpAssetAmount = $t01570615819._2
453- let targetPeriod = $t01570615819._3
454- let claimTxId = $t01570615819._4
450+ let $t01572415837 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
451+ let status = $t01572415837._1
452+ let lpAssetAmount = $t01572415837._2
453+ let targetPeriod = $t01572415837._3
454+ let claimTxId = $t01572415837._4
455455 if ((status == FINISHED))
456456 then throwErr("invalid withdrawal request status")
457457 else if ((targetPeriod > currentPeriodOrFail))
512512 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)]
513513 if ((factoryActionsSingle == factoryActionsSingle))
514514 then {
515- let $t02005520088 = acc
516- let lpAssetAcc = $t02005520088._1
517- let rewardAcc = $t02005520088._2
515+ let $t02007320106 = acc
516+ let lpAssetAcc = $t02007320106._1
517+ let rewardAcc = $t02007320106._2
518518 $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail))
519519 }
520520 else throw("Strict value is not equal to itself.")
521521 }
522522
523523 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]
524- let $t02035520431 = {
524+ let $t02037320449 = {
525525 let $l = list
526526 let $s = size($l)
527527 let $acc0 = $Tuple2(0, 0)
535535
536536 $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)
537537 }
538- if (($t02035520431 == $t02035520431))
538+ if (($t02037320449 == $t02037320449))
539539 then {
540- let rewardAmountTotal = $t02035520431._2
541- let lpAssetAmountTotal = $t02035520431._1
540+ let rewardAmountTotal = $t02037320449._2
541+ let lpAssetAmountTotal = $t02037320449._1
542542 let rewardToMainTreasuryAmount = (rewardAmountTotal - blockProcessingReward)
543543 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
544544 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)
299299 let donatedWavesAmountNewRaw = (donatedWavesAmount + donationProfitPart)
300300 let investedWavesAmountNewRaw = (investedWavesAmount + investmentProfitPart)
301301 let donatedPartDebt = min([0, donatedWavesAmountNewRaw])
302302 let investedPartDebt = min([0, investedWavesAmountNewRaw])
303303 let donatedWavesAmountNew = (max([0, donatedWavesAmountNewRaw]) + investedPartDebt)
304304 let investedWavesAmountNew = (max([0, investedWavesAmountNewRaw]) + donatedPartDebt)
305305 let newPeriod = (currentPeriodOrFail + 1)
306306 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
307307 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
308- let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
309- let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
310- let paymentOption = if ((size(i.payments) > 0))
311- then i.payments[0]
312- else unit
313- let paymentAmount = value(paymentOption).amount
314- let paymentAssetId = value(paymentOption).assetId
315- let checkPayment = if (if ((paymentAmountMin == 0))
308+ let checkIfPriceNotZero = if ((newPrice != 0))
316309 then true
317- else if (if ((paymentOption != unit))
318- then (paymentAssetId == unit)
319- else false)
320- then (paymentAmount >= paymentAmountMin)
321- else false)
322- then true
323- else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
324- if ((checkPayment == checkPayment))
310+ else throwErr("LP price cannot be 0")
311+ if ((checkIfPriceNotZero == checkIfPriceNotZero))
325312 then {
326- let checkIfPriceNotZero = if ((newPrice != 0))
313+ let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
314+ let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
315+ let paymentOption = if ((size(i.payments) > 0))
316+ then i.payments[0]
317+ else unit
318+ let paymentAmount = value(paymentOption).amount
319+ let paymentAssetId = value(paymentOption).assetId
320+ let checkPayment = if (if ((paymentAmountMin == 0))
327321 then true
328- else throwErr("LP price cannot be 0")
329- if ((checkIfPriceNotZero == checkIfPriceNotZero))
322+ else if (if ((paymentOption != unit))
323+ then (paymentAssetId == unit)
324+ else false)
325+ then (paymentAmount >= paymentAmountMin)
326+ else false)
327+ then true
328+ else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
329+ if ((checkPayment == checkPayment))
330330 then {
331331 let actions = if ((paymentOption != unit))
332332 then [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)]
333333 else nil
334- 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)]
334+ 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 - paymentAmountMin)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyDonated(unit), donatedWavesAmountNew], nil)]
335335 $Tuple2(actions, factoryActions)
336336 }
337337 else throw("Strict value is not equal to itself.")
338338 }
339339 else throw("Strict value is not equal to itself.")
340340 }
341341 else throw("Strict value is not equal to itself.")
342342 }
343343 else throw("Strict value is not equal to itself.")
344344 }
345345
346346
347347
348348 @Callable(i)
349349 func invest (userAddressBytes) = {
350350 let checkCaller = onlyFactory(i)
351351 if ((checkCaller == checkCaller))
352352 then {
353353 let userAddress = Address(userAddressBytes)
354354 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
355355 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
356356 let payment = if ((size(i.payments) == 1))
357357 then i.payments[0]
358358 else throwErr("invalid payments")
359- let $t01167711854 = if (if ((payment.assetId == unit))
359+ let $t01169511872 = if (if ((payment.assetId == unit))
360360 then (payment.amount > 0)
361361 else false)
362362 then $Tuple2(payment.amount, payment.assetId)
363363 else throwErr("invalid payment amount")
364- let paymentAmount = $t01167711854._1
365- let paymentAssetId = $t01167711854._2
364+ let paymentAmount = $t01169511872._1
365+ let paymentAssetId = $t01169511872._2
366366 let lpAssetAmount = if ((currentPriceOrFail > 0))
367367 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
368368 else 0
369369 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
370370 let actions = [ScriptTransfer(mainTreasuryAddressOrFail, paymentAmount, paymentAssetId)]
371371 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentAmount)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
372372 $Tuple2(actions, factoryActions)
373373 }
374374 else throw("Strict value is not equal to itself.")
375375 }
376376
377377
378378
379379 @Callable(i)
380380 func withdraw (userAddressBytes) = {
381381 let checkCaller = onlyFactory(i)
382382 if ((checkCaller == checkCaller))
383383 then {
384384 let userAddress = Address(userAddressBytes)
385385 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
386386 let payment = if ((size(i.payments) == 1))
387387 then i.payments[0]
388388 else throwErr(wrapErr("invalid payments"))
389389 let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail))
390390 then lpAssetIdOrFail
391391 else throwErr("invalid payment asset")
392392 let paymentAmount = if ((payment.amount > 0))
393393 then payment.amount
394394 else throwErr("invalid payment amount")
395395 let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
396396 let actions = [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)]
397397 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)]
398398 if ((factoryActions == factoryActions))
399399 then $Tuple2(actions, factoryActions)
400400 else throw("Strict value is not equal to itself.")
401401 }
402402 else throw("Strict value is not equal to itself.")
403403 }
404404
405405
406406
407407 @Callable(i)
408408 func cancelWithdraw (userAddressBytes,txId) = {
409409 let checkCaller = onlyFactory(i)
410410 if ((checkCaller == checkCaller))
411411 then {
412412 let userAddress = Address(userAddressBytes)
413413 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
414414 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
415- let $t01426114374 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
416- let status = $t01426114374._1
417- let lpAssetAmount = $t01426114374._2
418- let targetPeriod = $t01426114374._3
419- let claimTxId = $t01426114374._4
415+ let $t01427914392 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
416+ let status = $t01427914392._1
417+ let lpAssetAmount = $t01427914392._2
418+ let targetPeriod = $t01427914392._3
419+ let claimTxId = $t01427914392._4
420420 let checks = [if ((status == PENDING))
421421 then true
422422 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
423423 then true
424424 else throwErr("invalid withdrawal request period")]
425425 if ((checks == checks))
426426 then {
427427 let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount"))
428428 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount))
429429 then (withdrawal - lpAssetAmount)
430430 else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
431431 if ((factoryActions == factoryActions))
432432 then $Tuple2(nil, factoryActions)
433433 else throw("Strict value is not equal to itself.")
434434 }
435435 else throw("Strict value is not equal to itself.")
436436 }
437437 else throw("Strict value is not equal to itself.")
438438 }
439439
440440
441441
442442 @Callable(i)
443443 func claimWaves (userAddressBytes,txId) = {
444444 let checkCaller = onlyFactory(i)
445445 if ((checkCaller == checkCaller))
446446 then {
447447 let userAddress = Address(userAddressBytes)
448448 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
449449 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
450- let $t01570615819 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
451- let status = $t01570615819._1
452- let lpAssetAmount = $t01570615819._2
453- let targetPeriod = $t01570615819._3
454- let claimTxId = $t01570615819._4
450+ let $t01572415837 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
451+ let status = $t01572415837._1
452+ let lpAssetAmount = $t01572415837._2
453+ let targetPeriod = $t01572415837._3
454+ let claimTxId = $t01572415837._4
455455 if ((status == FINISHED))
456456 then throwErr("invalid withdrawal request status")
457457 else if ((targetPeriod > currentPeriodOrFail))
458458 then throwErr("invalid withdrawal request period")
459459 else {
460460 let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price"))
461461 let amount = if ((priceOrFail > 0))
462462 then fraction(lpAssetAmount, priceOrFail, SCALE8)
463463 else 0
464464 let factoryActions = [invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, txId), valueWithdrawalRequest(FINISHED, lpAssetAmount, targetPeriod, i.transactionId)], nil), invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, amount], nil)]
465465 $Tuple2(nil, factoryActions)
466466 }
467467 }
468468 else throw("Strict value is not equal to itself.")
469469 }
470470
471471
472472
473473 @Callable(i)
474474 func processBlocks (userAddressBytes) = {
475475 let checkCaller = onlyFactory(i)
476476 if ((checkCaller == checkCaller))
477477 then {
478478 let userAddress = Address(userAddressBytes)
479479 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
480480 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
481481 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
482482 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
483483 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
484484 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
485485 let blocksProcessingBatchSizeMax = 40
486486 let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess))
487487 then if ((nextBlockToProcess >= currentStartHeight))
488488 then true
489489 else (currentPeriodOrFail == 0)
490490 else false)
491491 then (periodEndHeight >= nextBlockToProcess)
492492 else false)
493493 then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax])
494494 else throwErr(wrapErr("invalid target block"))
495495 let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward"))
496496 let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize)
497497 let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize))
498498 func map (acc,inc) = if ((inc >= blocksProcessingBatchSize))
499499 then acc
500500 else {
501501 let targetBlockHeight = (nextBlockToProcess + inc)
502502 let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info"))
503503 let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, proxyTreasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight))))
504504 let generator = targetBlockInfo.generator
505505 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0)
506506 let callerReward = if ((inc == (blocksProcessingBatchSize - 1)))
507507 then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder)
508508 else blockProcessingRewardByGenerator
509509 let lpAssetAmount = if ((currentPriceOrFail > 0))
510510 then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail)
511511 else 0
512512 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)]
513513 if ((factoryActionsSingle == factoryActionsSingle))
514514 then {
515- let $t02005520088 = acc
516- let lpAssetAcc = $t02005520088._1
517- let rewardAcc = $t02005520088._2
515+ let $t02007320106 = acc
516+ let lpAssetAcc = $t02007320106._1
517+ let rewardAcc = $t02007320106._2
518518 $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail))
519519 }
520520 else throw("Strict value is not equal to itself.")
521521 }
522522
523523 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]
524- let $t02035520431 = {
524+ let $t02037320449 = {
525525 let $l = list
526526 let $s = size($l)
527527 let $acc0 = $Tuple2(0, 0)
528528 func $f0_1 ($a,$i) = if (($i >= $s))
529529 then $a
530530 else map($a, $l[$i])
531531
532532 func $f0_2 ($a,$i) = if (($i >= $s))
533533 then $a
534534 else throw("List size exceeds 40")
535535
536536 $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)
537537 }
538- if (($t02035520431 == $t02035520431))
538+ if (($t02037320449 == $t02037320449))
539539 then {
540- let rewardAmountTotal = $t02035520431._2
541- let lpAssetAmountTotal = $t02035520431._1
540+ let rewardAmountTotal = $t02037320449._2
541+ let lpAssetAmountTotal = $t02037320449._1
542542 let rewardToMainTreasuryAmount = (rewardAmountTotal - blockProcessingReward)
543543 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
544544 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)]
545545 if ((actions == actions))
546546 then $Tuple2(nil, unit)
547547 else throw("Strict value is not equal to itself.")
548548 }
549549 else throw("Strict value is not equal to itself.")
550550 }
551551 else throw("Strict value is not equal to itself.")
552552 }
553553
554554
555555 @Verifier(tx)
556556 func verify () = {
557557 let publicKey = match getManagerPublicKeyOrUnit() {
558558 case pub: ByteVector =>
559559 pub
560560 case _ =>
561561 tx.senderPublicKey
562562 }
563563 sigVerify(tx.bodyBytes, tx.proofs[0], publicKey)
564564 }
565565

github/deemru/w8io/026f985 
81.86 ms