tx · D5oToKQmyU1hsQR7F4c6ykY7GdHFuNjP9KS93M3pkZw7 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK: -0.05000000 Waves 2023.03.06 19:25 [2478469] smart account 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK > SELF 0.00000000 Waves
{ "type": 13, "id": "D5oToKQmyU1hsQR7F4c6ykY7GdHFuNjP9KS93M3pkZw7", "fee": 5000000, "feeAssetId": null, "timestamp": 1678119942198, "version": 2, "chainId": 84, "sender": "3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK", "senderPublicKey": "FFdBua5rzzMkZebvsvmN7sAdU7XhFK8QNJ3hiwwxAYRA", "proofs": [ "5WKSNKikFFbunUYaD1nV64hiZeHZNf4pdPBD5FNRtWwJRLDmcMmDi5noQyTgEvn4vuyHNuXbPu3sVDEjSwWt5koT", "Bi72iUGLbY1RUmSiEDei9jxs1qVKhK75cvcFkoMAstjiuWs4XeAvySXTmSGkHsjKQFzCLWUbHjpE5dYuvUGWvJW" ], "script": "base64:BgJiCAISAwoBCBIDCgEIEgMKAQgSBAoCCAESBQoDAggBEgUKAwgBARIECgIICBIECgIICBIECgIIARIFCgMCCAESAwoBCBIECgIIAhIDCgEIEgMKARgSAwoBGBIECgIICBIAEgBgAAdrQWN0aXZlAgZhY3RpdmUAC2tBY3RpdmVHbG9iAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAPa0RlcHJlY2F0ZWRQb29sAgtkZXByZWNhdGVkXwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAaa1Jld2FyZFBvb2xGcmFjdGlvbkN1cnJlbnQCHV9jdXJyZW50X3Bvb2xfZnJhY3Rpb25fcmV3YXJkABtrUmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld2FyZAATa0hlaWdodFBvb2xGcmFjdGlvbgIaX3Bvb2xfcmV3YXJkX3VwZGF0ZV9oZWlnaH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NXT1AFA25pbAFpAQhzaHV0ZG93bgAJAQt2YWx1ZU9yRWxzZQIJAQtpc0FkbWluQ2FsbAEFAWkDCQEBIQEFBmFjdGl2ZQkAAgEJAKwCAgIiREFwcCBpcyBhbHJlYWR5IHN1c3BlbmRlZC4gQ2F1c2U6IAkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQZrQ2F1c2UCGnRoZSBjYXVzZSB3YXNuJ3Qgc3BlY2lmaWVkCQEHc3VzcGVuZAECD1BhdXNlZCBieSBhZG1pbgFpAQhhY3RpdmF0ZQAJAQt2YWx1ZU9yRWxzZQIJAQtpc0FkbWluQ2FsbAEFAWkDBQZhY3RpdmUJAAIBAhZEQXBwIGlzIGFscmVhZHkgYWN0aXZlCQDMCAIJAQxCb29sZWFuRW50cnkCBQdrQWN0aXZlBgkAzAgCCQELRGVsZXRlRW50cnkBBQZrQ2F1c2UFA25pbAECdHgBBnZlcmlmeQAEByRtYXRjaDAFAnR4BBJhZG1pblB1YktleTFTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTEAAQAABBJhZG1pblB1YktleTJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQxhZG1pblB1YktleTIAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAJJpW9z", "height": 2478469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: a3rQrdX8a5KMy3oKXfT45zDMywFtHtu9mHVbi8zkBA8 Next: APS9CBryVDiQcjrQYu2gCksDfbCLLVSrVsiuDioDZtij Diff:
Old | New | Differences | |
---|---|---|---|
99 | 99 | ||
100 | 100 | let defPoolBoostCoef = 500 | |
101 | 101 | ||
102 | - | let startEmissionH = | |
102 | + | let startEmissionH = 2976848 | |
103 | 103 | ||
104 | 104 | let swopYearEmission = 100000000000000 | |
105 | 105 | ||
142 | 142 | func getRewardsPerBlockInfo () = { | |
143 | 143 | let emissionPeriods = ((height - startEmissionH) / blocksPerYear) | |
144 | 144 | func calcEmission (acc,i) = { | |
145 | - | let $ | |
146 | - | let curEmission = $ | |
147 | - | let prevEmission = $ | |
145 | + | let $t047464783 = acc | |
146 | + | let curEmission = $t047464783._1 | |
147 | + | let prevEmission = $t047464783._2 | |
148 | 148 | if ((emissionPeriods > i)) | |
149 | 149 | then $Tuple2(fraction(curEmission, 75, 100), curEmission) | |
150 | 150 | else $Tuple2(curEmission, prevEmission) | |
151 | 151 | } | |
152 | 152 | ||
153 | - | let $ | |
153 | + | let $t049415107 = { | |
154 | 154 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
155 | 155 | let $s = size($l) | |
156 | 156 | let $acc0 = $Tuple2(swopYearEmission, swopYearEmission) | |
164 | 164 | ||
165 | 165 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
166 | 166 | } | |
167 | - | let curEmission = $ | |
168 | - | let prevEmission = $ | |
167 | + | let curEmission = $t049415107._1 | |
168 | + | let prevEmission = $t049415107._2 | |
169 | 169 | $Tuple3((curEmission / blocksPerYear), (prevEmission / blocksPerYear), (startEmissionH + (blocksPerYear * emissionPeriods))) | |
170 | 170 | } | |
171 | 171 | ||
210 | 210 | ||
211 | 211 | ||
212 | 212 | func rewardInfo (pool) = { | |
213 | - | let $ | |
214 | - | let totalRewardPerBlockCurrent = $ | |
215 | - | let totalRewardPerBlockPrevious = $ | |
216 | - | let lastEmissionUpdateHeight = $ | |
213 | + | let $t069227037 = getRewardsPerBlockInfo() | |
214 | + | let totalRewardPerBlockCurrent = $t069227037._1 | |
215 | + | let totalRewardPerBlockPrevious = $t069227037._2 | |
216 | + | let lastEmissionUpdateHeight = $t069227037._3 | |
217 | 217 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + kRewardPoolFractionCurrent) + " at address ") + toString(govAddress))) | |
218 | 218 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, kRewardUpdateHeight), ((("No data on the key: " + kRewardUpdateHeight) + " at address ") + toString(govAddress))) | |
219 | 219 | let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + kHeightPoolFraction)), rewardUpdateHeight) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue,toHeight) = { | |
254 | - | let $ | |
254 | + | let $t01005111236 = if (if (if ((rewardUpdateHeight > toHeight)) | |
255 | 255 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
256 | 256 | else false) | |
257 | 257 | then true | |
280 | 280 | let rwd = (currentRewardPerBlock * (toHeight - rewardUpdateHeight)) | |
281 | 281 | $Tuple3(rwd, fBfrUp, bBfrUp) | |
282 | 282 | } | |
283 | - | let reward = $ | |
284 | - | let farmIntrBefore = $ | |
285 | - | let boostIntrBefore = $ | |
283 | + | let reward = $t01005111236._1 | |
284 | + | let farmIntrBefore = $t01005111236._2 | |
285 | + | let boostIntrBefore = $t01005111236._3 | |
286 | 286 | let newFarmInterest = (farmIntrBefore + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
287 | 287 | let newBoostInterest = (boostIntrBefore + (if ((poolVoted > 0)) | |
288 | 288 | then fraction(calcBoostRwd(pool, reward), scaleValue8, poolVoted) | |
298 | 298 | let shareToken = getTotalShareToken(pool) | |
299 | 299 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareToken) | |
300 | 300 | let stratBFarmInterest = valueOrElse(getInteger(this, (pool + kStratBFarmInterest)), 0) | |
301 | - | let $ | |
302 | - | let lastInterestHeight = $ | |
303 | - | let farmInterest = $ | |
304 | - | let boostInterest = $ | |
305 | - | let $ | |
306 | - | let currentRewardPerBlock = $ | |
307 | - | let rewardUpdateHeight = $ | |
308 | - | let previousRewardPerBlock = $ | |
309 | - | let poolRewardUpdateHeight = $ | |
310 | - | let emissionUpdateHeight = $ | |
311 | - | let prevCurrentRewardPerBlock = $ | |
312 | - | let prevPreviousRewardPerBlock = $ | |
301 | + | let $t01207412155 = getLastInterestInfo(pool) | |
302 | + | let lastInterestHeight = $t01207412155._1 | |
303 | + | let farmInterest = $t01207412155._2 | |
304 | + | let boostInterest = $t01207412155._3 | |
305 | + | let $t01216012417 = rewardInfo(pool) | |
306 | + | let currentRewardPerBlock = $t01216012417._1 | |
307 | + | let rewardUpdateHeight = $t01216012417._2 | |
308 | + | let previousRewardPerBlock = $t01216012417._3 | |
309 | + | let poolRewardUpdateHeight = $t01216012417._4 | |
310 | + | let emissionUpdateHeight = $t01216012417._5 | |
311 | + | let prevCurrentRewardPerBlock = $t01216012417._6 | |
312 | + | let prevPreviousRewardPerBlock = $t01216012417._7 | |
313 | 313 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
314 | 314 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), if (if ((stratBFarmInterest > uFarmInterest)) | |
315 | 315 | then (uPoolVoted > 0) | |
326 | 326 | $Tuple4(farmInterest, boostInterest, 0, toTreasury) | |
327 | 327 | } | |
328 | 328 | else { | |
329 | - | let $ | |
329 | + | let $t01337514512 = if ((emissionUpdateHeight > lastInterestHeight)) | |
330 | 330 | then { | |
331 | - | let $ | |
332 | - | let prevNewFarmInterest = $ | |
333 | - | let prevNewBoostInterest = $ | |
331 | + | let $t01378814347 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, prevCurrentRewardPerBlock, totalShareVirtual, prevPreviousRewardPerBlock, scaleValue, emissionUpdateHeight) | |
332 | + | let prevNewFarmInterest = $t01378814347._1 | |
333 | + | let prevNewBoostInterest = $t01378814347._2 | |
334 | 334 | $Tuple3(prevNewFarmInterest, prevNewBoostInterest, emissionUpdateHeight) | |
335 | 335 | } | |
336 | 336 | else $Tuple3(farmInterest, boostInterest, lastInterestHeight) | |
337 | - | let prevFarmInterest = $ | |
338 | - | let prevBoostInterest = $ | |
339 | - | let LIHeight = $ | |
340 | - | let $ | |
341 | - | let newFarmInterest = $ | |
342 | - | let newBoostInterest = $ | |
337 | + | let prevFarmInterest = $t01337514512._1 | |
338 | + | let prevBoostInterest = $t01337514512._2 | |
339 | + | let LIHeight = $t01337514512._3 | |
340 | + | let $t01452114944 = calcInterest(pool, LIHeight, rewardUpdateHeight, poolRewardUpdateHeight, prevFarmInterest, prevBoostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue, height) | |
341 | + | let newFarmInterest = $t01452114944._1 | |
342 | + | let newBoostInterest = $t01452114944._2 | |
343 | 343 | let farmRwd = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
344 | 344 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
345 | 345 | let boostRwdMax = fraction(fraction(uShareTokensVirt, (newFarmInterest - max([uFarmInterest, stratBFarmInterest])), scaleValue), poolBoostCoef, lockBoostCoefScale) | |
355 | 355 | ||
356 | 356 | func availableClaimCalcAllByUser (pools,user) = { | |
357 | 357 | func calcAvailable (acc,pool) = { | |
358 | - | let $ | |
359 | - | let newPools = $ | |
360 | - | let amounts = $ | |
361 | - | let $ | |
362 | - | let fi = $ | |
363 | - | let bi = $ | |
364 | - | let claimAmount = $ | |
365 | - | let tt = $ | |
358 | + | let $t01581315842 = acc | |
359 | + | let newPools = $t01581315842._1 | |
360 | + | let amounts = $t01581315842._2 | |
361 | + | let $t01585115904 = claimCalc(pool, user) | |
362 | + | let fi = $t01585115904._1 | |
363 | + | let bi = $t01585115904._2 | |
364 | + | let claimAmount = $t01585115904._3 | |
365 | + | let tt = $t01585115904._4 | |
366 | 366 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
367 | 367 | $Tuple2((newPools :+ pool), (amounts :+ availableFund)) | |
368 | 368 | } | |
391 | 391 | if ((lockType > 0)) | |
392 | 392 | then throw("You can't lock shareTokens till first harvest end.") | |
393 | 393 | else if ((userVoteAmount == 0)) | |
394 | - | then | |
394 | + | then throw("You can't lock shareTokens. You didn't vote for pool in first week.") | |
395 | 395 | else if ((pmtAmount >= FHShareTokenUserLimit)) | |
396 | 396 | then (pmtAmount - FHShareTokenUserLimit) | |
397 | 397 | else 0 | |
450 | 450 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
451 | 451 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
452 | 452 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
453 | - | let $ | |
454 | - | let lockPeriod = $ | |
455 | - | let lockCoef = $ | |
453 | + | let $t01902819080 = getLockParams(lockType) | |
454 | + | let lockPeriod = $t01902819080._1 | |
455 | + | let lockCoef = $t01902819080._2 | |
456 | 456 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
457 | 457 | if ((i.payments[0].assetId != shareAssetId)) | |
458 | 458 | then throw("Wrong sharetoken in payment") | |
464 | 464 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
465 | 465 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
466 | 466 | then { | |
467 | - | let $ | |
467 | + | let $t01950721441 = if ((lockType == 0)) | |
468 | 468 | then { | |
469 | 469 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
470 | 470 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(caller, shareTokensChangeOnFH, i.payments[0].assetId)], ((totalShare + i.payments[0].amount) - shareTokensChangeOnFH)) | |
485 | 485 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
486 | 486 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))], (totalShare + i.payments[0].amount)) | |
487 | 487 | } | |
488 | - | let lockEntries = $ | |
489 | - | let totalShareNew = $ | |
488 | + | let lockEntries = $t01950721441._1 | |
489 | + | let totalShareNew = $t01950721441._2 | |
490 | 490 | if ((accountBalance(shareAssetId) > totalShareNew)) | |
491 | 491 | then throw("Balance of share-token is lower than totalAmount") | |
492 | 492 | else { | |
493 | - | let $ | |
494 | - | let farmInterest = $ | |
495 | - | let boostInterest = $ | |
496 | - | let claimAmount = $ | |
497 | - | let toTreasure = $ | |
493 | + | let $t02156621648 = claimCalc(pool, user) | |
494 | + | let farmInterest = $t02156621648._1 | |
495 | + | let boostInterest = $t02156621648._2 | |
496 | + | let claimAmount = $t02156621648._3 | |
497 | + | let toTreasure = $t02156621648._4 | |
498 | 498 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
499 | 499 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
500 | 500 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, totalUserShareTokens], nil) | |
517 | 517 | then { | |
518 | 518 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
519 | 519 | let user = toString(caller) | |
520 | - | let $ | |
521 | - | let farmInterest = $ | |
522 | - | let boostInterest = $ | |
523 | - | let claimAmount = $ | |
524 | - | let toTreasure = $ | |
520 | + | let $t02294523027 = claimCalc(pool, user) | |
521 | + | let farmInterest = $t02294523027._1 | |
522 | + | let boostInterest = $t02294523027._2 | |
523 | + | let claimAmount = $t02294523027._3 | |
524 | + | let toTreasure = $t02294523027._4 | |
525 | 525 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
526 | 526 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
527 | 527 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
553 | 553 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
554 | 554 | let user = toString(caller) | |
555 | 555 | let shareTokenLocked = getTotalShareToken(pool) | |
556 | - | let $ | |
557 | - | let farmInterest = $ | |
558 | - | let boostInterest = $ | |
559 | - | let claimAmount = $ | |
560 | - | let toTreasure = $ | |
556 | + | let $t02553825620 = claimCalc(pool, user) | |
557 | + | let farmInterest = $t02553825620._1 | |
558 | + | let boostInterest = $t02553825620._2 | |
559 | + | let claimAmount = $t02553825620._3 | |
560 | + | let toTreasure = $t02553825620._4 | |
561 | 561 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
562 | 562 | if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
563 | 563 | then throw("Balance of share-token is lower than totalAmount") | |
576 | 576 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
577 | 577 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
578 | 578 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
579 | - | let $ | |
580 | - | let farmInterest = $ | |
581 | - | let boostInterest = $ | |
582 | - | let claimAmount = $ | |
583 | - | let toTreasure = $ | |
579 | + | let $t02702327105 = claimCalc(pool, user) | |
580 | + | let farmInterest = $t02702327105._1 | |
581 | + | let boostInterest = $t02702327105._2 | |
582 | + | let claimAmount = $t02702327105._3 | |
583 | + | let toTreasure = $t02702327105._4 | |
584 | 584 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
585 | 585 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
586 | 586 | } | |
608 | 608 | then throw("Only Governance can call this function") | |
609 | 609 | else { | |
610 | 610 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
611 | - | let $ | |
612 | - | let farmInterest = $ | |
613 | - | let boostInterest = $ | |
614 | - | let boostLPinterest = $ | |
611 | + | let $t02927129345 = claimCalc(pool, user) | |
612 | + | let farmInterest = $t02927129345._1 | |
613 | + | let boostInterest = $t02927129345._2 | |
614 | + | let boostLPinterest = $t02927129345._3 | |
615 | 615 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
616 | 616 | }) | |
617 | 617 | ||
638 | 638 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
639 | 639 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
640 | 640 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
641 | - | let $ | |
642 | - | let lockPeriod = $ | |
643 | - | let lockCoef = $ | |
641 | + | let $t03097431026 = getLockParams(lockType) | |
642 | + | let lockPeriod = $t03097431026._1 | |
643 | + | let lockCoef = $t03097431026._2 | |
644 | 644 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
645 | 645 | if ((getHeightFirstHarvest(pool) > height)) | |
646 | 646 | then throw("You can't lock shareTokens till first harvest end.") | |
671 | 671 | let userStakedAmountNew = (userStakedAmount - lockAmount) | |
672 | 672 | let userLockedHeigtNew = (height + lockPeriod) | |
673 | 673 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmountNew) | |
674 | - | let $ | |
675 | - | let farmInterest = $ | |
676 | - | let boostInterest = $ | |
677 | - | let claimAmount = $ | |
678 | - | let toTreasure = $ | |
674 | + | let $t03237232454 = claimCalc(pool, user) | |
675 | + | let farmInterest = $t03237232454._1 | |
676 | + | let boostInterest = $t03237232454._2 | |
677 | + | let claimAmount = $t03237232454._3 | |
678 | + | let toTreasure = $t03237232454._4 | |
679 | 679 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
680 | 680 | [IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew)), IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
681 | 681 | } | |
828 | 828 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
829 | 829 | then throw("Only voiting can call this function") | |
830 | 830 | else { | |
831 | - | let $ | |
832 | - | let farmInterest = $ | |
833 | - | let boostInterest = $ | |
834 | - | let claimAmount = $ | |
835 | - | let toTreasure = $ | |
831 | + | let $t03720337285 = claimCalc(pool, user) | |
832 | + | let farmInterest = $t03720337285._1 | |
833 | + | let boostInterest = $t03720337285._2 | |
834 | + | let claimAmount = $t03720337285._3 | |
835 | + | let toTreasure = $t03720337285._4 | |
836 | 836 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
837 | 837 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
838 | 838 | }) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kActive = "active" | |
5 | 5 | ||
6 | 6 | let kActiveGlob = "active_all_contracts" | |
7 | 7 | ||
8 | 8 | let kDeprecatedPool = "deprecated_" | |
9 | 9 | ||
10 | 10 | let kCause = "shutdown_cause" | |
11 | 11 | ||
12 | 12 | let kRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
13 | 13 | ||
14 | 14 | let kRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
15 | 15 | ||
16 | 16 | let kHeightPoolFraction = "_pool_reward_update_height" | |
17 | 17 | ||
18 | 18 | let kRewardUpdateHeight = "reward_update_height" | |
19 | 19 | ||
20 | 20 | let kUserShareTokensStaked = "_share_tokens_locked" | |
21 | 21 | ||
22 | 22 | let kUserShareTokensLocked = "_share_tokens_blocked" | |
23 | 23 | ||
24 | 24 | let kUserShareTokensLockedType = "_share_tokens_blocked_type" | |
25 | 25 | ||
26 | 26 | let kUserShareTokensLockedHeight = "_share_tokens_blocked_height" | |
27 | 27 | ||
28 | 28 | let kUserShareTokensVirtual = "_share_tokens_virtual" | |
29 | 29 | ||
30 | 30 | let kShareTotalShareTokens = "_total_share_tokens_locked" | |
31 | 31 | ||
32 | 32 | let kShareTokensVirtual = "_total_share_tokens_virtual" | |
33 | 33 | ||
34 | 34 | let kLockParams = "_lock_params" | |
35 | 35 | ||
36 | 36 | let kLockWavesFee = "lock_waves_fee" | |
37 | 37 | ||
38 | 38 | let kPoolBoostCoef = "_boost_coef" | |
39 | 39 | ||
40 | 40 | let kFarmLastInterest = "_last_interest" | |
41 | 41 | ||
42 | 42 | let kFarmUserLastInterest = "_last_interest" | |
43 | 43 | ||
44 | 44 | let kBoostLastInterest = "_last_interest_b" | |
45 | 45 | ||
46 | 46 | let kBoostUserLastInterest = "_last_interest_u_b" | |
47 | 47 | ||
48 | 48 | let kLastInterestHeight = "_last_interest_height" | |
49 | 49 | ||
50 | 50 | let kSWOPid = "SWOP_id" | |
51 | 51 | ||
52 | 52 | let kAvailableSWOP = "_available_SWOP" | |
53 | 53 | ||
54 | 54 | let kHarvestPoolVote = "_harvest_pool_vote_gSWOP" | |
55 | 55 | ||
56 | 56 | let kPoolVote = "_pool_vote_gSWOP" | |
57 | 57 | ||
58 | 58 | let kUserPoolVote = "_user_vote_gSWOP" | |
59 | 59 | ||
60 | 60 | let kPoolStruc = "_pool_struc" | |
61 | 61 | ||
62 | 62 | let kUserPoolStruc = "_user_pool_struc" | |
63 | 63 | ||
64 | 64 | let kHarvestUserPoolVote = "_harvest_user_pool_vote_gSWOP" | |
65 | 65 | ||
66 | 66 | let kFirstHarvestHeight = "first_harvest_height" | |
67 | 67 | ||
68 | 68 | let kShareLimitFH = "share_limit_on_first_harvest" | |
69 | 69 | ||
70 | 70 | let kStratBFarmInterest = "_strat_b_farm_interest" | |
71 | 71 | ||
72 | 72 | let kCpmmContract = "cpmm_contract" | |
73 | 73 | ||
74 | 74 | let kAdminPubKey1 = "admin_pub_1" | |
75 | 75 | ||
76 | 76 | let kAdminPubKey2 = "admin_pub_2" | |
77 | 77 | ||
78 | 78 | let kAdminPubKey3 = "admin_pub_3" | |
79 | 79 | ||
80 | 80 | let kAdminInvokePubKey = "admin_invoke_pub" | |
81 | 81 | ||
82 | 82 | let kMoneyBoxAddress = "money_box_address" | |
83 | 83 | ||
84 | 84 | let kVotingAddress = "voting_address" | |
85 | 85 | ||
86 | 86 | let kGovAddress = "governance_address" | |
87 | 87 | ||
88 | 88 | let kLPFarmingAddress = "lp_farming" | |
89 | 89 | ||
90 | 90 | let kFarmingTreasureAddr = "farming_treasure" | |
91 | 91 | ||
92 | 92 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
93 | 93 | ||
94 | 94 | let totalVoteShare = 10000000000 | |
95 | 95 | ||
96 | 96 | let scaleValue8 = 100000000 | |
97 | 97 | ||
98 | 98 | let lockBoostCoefScale = 1000 | |
99 | 99 | ||
100 | 100 | let defPoolBoostCoef = 500 | |
101 | 101 | ||
102 | - | let startEmissionH = | |
102 | + | let startEmissionH = 2976848 | |
103 | 103 | ||
104 | 104 | let swopYearEmission = 100000000000000 | |
105 | 105 | ||
106 | 106 | let blocksPerYear = 526330 | |
107 | 107 | ||
108 | 108 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
109 | 109 | case string: String => | |
110 | 110 | fromBase58String(string) | |
111 | 111 | case nothing => | |
112 | 112 | throw((key + "is empty")) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
117 | 117 | ||
118 | 118 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
119 | 119 | ||
120 | 120 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
121 | 121 | ||
122 | 122 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
123 | 123 | ||
124 | 124 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
125 | 125 | ||
126 | 126 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
127 | 127 | ||
128 | 128 | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
129 | 129 | ||
130 | 130 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
131 | 131 | ||
132 | 132 | let farmingTreasureAddr = Address(getBase58FromOracle(kFarmingTreasureAddr)) | |
133 | 133 | ||
134 | 134 | let cpmmContract = Address(getBase58FromOracle(kCpmmContract)) | |
135 | 135 | ||
136 | 136 | let active = getBooleanValue(this, kActive) | |
137 | 137 | ||
138 | 138 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
139 | 139 | ||
140 | 140 | let SWOP = fromBase58String(getStringValue(this, kSWOPid)) | |
141 | 141 | ||
142 | 142 | func getRewardsPerBlockInfo () = { | |
143 | 143 | let emissionPeriods = ((height - startEmissionH) / blocksPerYear) | |
144 | 144 | func calcEmission (acc,i) = { | |
145 | - | let $ | |
146 | - | let curEmission = $ | |
147 | - | let prevEmission = $ | |
145 | + | let $t047464783 = acc | |
146 | + | let curEmission = $t047464783._1 | |
147 | + | let prevEmission = $t047464783._2 | |
148 | 148 | if ((emissionPeriods > i)) | |
149 | 149 | then $Tuple2(fraction(curEmission, 75, 100), curEmission) | |
150 | 150 | else $Tuple2(curEmission, prevEmission) | |
151 | 151 | } | |
152 | 152 | ||
153 | - | let $ | |
153 | + | let $t049415107 = { | |
154 | 154 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
155 | 155 | let $s = size($l) | |
156 | 156 | let $acc0 = $Tuple2(swopYearEmission, swopYearEmission) | |
157 | 157 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
158 | 158 | then $a | |
159 | 159 | else calcEmission($a, $l[$i]) | |
160 | 160 | ||
161 | 161 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
162 | 162 | then $a | |
163 | 163 | else throw("List size exceeds 20") | |
164 | 164 | ||
165 | 165 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
166 | 166 | } | |
167 | - | let curEmission = $ | |
168 | - | let prevEmission = $ | |
167 | + | let curEmission = $t049415107._1 | |
168 | + | let prevEmission = $t049415107._2 | |
169 | 169 | $Tuple3((curEmission / blocksPerYear), (prevEmission / blocksPerYear), (startEmissionH + (blocksPerYear * emissionPeriods))) | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(Address(fromBase58String(pool)), kFirstHarvestHeight), 0) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func getFHShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimitFH), ("No data on the key: " + kShareLimitFH)) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func getTotalShareToken (pool) = valueOrErrorMessage(getInteger(this, (pool + kShareTotalShareTokens)), (("No data on the key: " + pool) + kShareTotalShareTokens)) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func getPoolVoted (pool) = valueOrElse(getInteger(votingAddress, (pool + kPoolVote)), valueOrElse(parseInt(split(valueOrElse(getString(votingAddress, (pool + kPoolStruc)), ""), "_")[0]), 0)) | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func getUserPoolVoted (pool,user) = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kUserPoolVote)), valueOrElse(parseInt(split(valueOrElse(getString(votingAddress, (((user + "_") + pool) + kUserPoolStruc)), ""), "_")[0]), 0)) | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func accountBalance (assetId) = match assetId { | |
192 | 192 | case id: ByteVector => | |
193 | 193 | assetBalance(this, id) | |
194 | 194 | case waves: Unit => | |
195 | 195 | wavesBalance(this).available | |
196 | 196 | case _ => | |
197 | 197 | throw("Match error") | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func calcScaleValue (assetId1,assetId2) = { | |
202 | 202 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
203 | 203 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
204 | 204 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
205 | 205 | pow(10, 0, scaleDigits, 0, 0, DOWN) | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + user) + kAvailableSWOP)), 0) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func rewardInfo (pool) = { | |
213 | - | let $ | |
214 | - | let totalRewardPerBlockCurrent = $ | |
215 | - | let totalRewardPerBlockPrevious = $ | |
216 | - | let lastEmissionUpdateHeight = $ | |
213 | + | let $t069227037 = getRewardsPerBlockInfo() | |
214 | + | let totalRewardPerBlockCurrent = $t069227037._1 | |
215 | + | let totalRewardPerBlockPrevious = $t069227037._2 | |
216 | + | let lastEmissionUpdateHeight = $t069227037._3 | |
217 | 217 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + kRewardPoolFractionCurrent) + " at address ") + toString(govAddress))) | |
218 | 218 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, kRewardUpdateHeight), ((("No data on the key: " + kRewardUpdateHeight) + " at address ") + toString(govAddress))) | |
219 | 219 | let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + kHeightPoolFraction)), rewardUpdateHeight) | |
220 | 220 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + kRewardPoolFractionPrevious) + " at address ") + toString(govAddress))) | |
221 | 221 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
222 | 222 | let rewardPoolPrevious = fraction(totalRewardPerBlockCurrent, rewardPoolFractionPrevious, totalVoteShare) | |
223 | 223 | let rewardPoolPrevCurrent = fraction(totalRewardPerBlockPrevious, rewardPoolFractionCurrent, totalVoteShare) | |
224 | 224 | let rewardPoolPrevPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
225 | 225 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
226 | 226 | then true | |
227 | 227 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
228 | 228 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
229 | 229 | else $Tuple7(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight, lastEmissionUpdateHeight, rewardPoolPrevCurrent, rewardPoolPrevPrevious) | |
230 | 230 | } | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func getLastInterestInfo (pool) = { | |
234 | 234 | let farmInterest = valueOrErrorMessage(getInteger(this, (pool + kFarmLastInterest)), (("No data on the key: " + pool) + kFarmLastInterest)) | |
235 | 235 | let boostInterest = valueOrElse(getInteger(this, (pool + kBoostLastInterest)), 0) | |
236 | 236 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + kLastInterestHeight)), height) | |
237 | 237 | $Tuple3(lastInterestHeight, farmInterest, boostInterest) | |
238 | 238 | } | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func calcFarmRwd (pool,curTotalReward) = { | |
242 | 242 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
243 | 243 | fraction(curTotalReward, lockBoostCoefScale, (poolBoostCoef + lockBoostCoefScale)) | |
244 | 244 | } | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func calcBoostRwd (pool,curTotalReward) = { | |
248 | 248 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
249 | 249 | fraction(curTotalReward, poolBoostCoef, (poolBoostCoef + lockBoostCoefScale)) | |
250 | 250 | } | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue,toHeight) = { | |
254 | - | let $ | |
254 | + | let $t01005111236 = if (if (if ((rewardUpdateHeight > toHeight)) | |
255 | 255 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
256 | 256 | else false) | |
257 | 257 | then true | |
258 | 258 | else if ((toHeight > rewardUpdateHeight)) | |
259 | 259 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
260 | 260 | else false) | |
261 | 261 | then { | |
262 | 262 | let r = (previousRewardPerBlock * (toHeight - lastInterestHeight)) | |
263 | 263 | $Tuple3(r, farmInterest, boostInterest) | |
264 | 264 | } | |
265 | 265 | else if (if (if ((toHeight > rewardUpdateHeight)) | |
266 | 266 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
267 | 267 | else false) | |
268 | 268 | then (lastInterestHeight > rewardUpdateHeight) | |
269 | 269 | else false) | |
270 | 270 | then { | |
271 | 271 | let r = (currentRewardPerBlock * (toHeight - lastInterestHeight)) | |
272 | 272 | $Tuple3(r, farmInterest, boostInterest) | |
273 | 273 | } | |
274 | 274 | else { | |
275 | 275 | let rwdBfrUpd = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
276 | 276 | let fBfrUp = (farmInterest + fraction(calcFarmRwd(pool, rwdBfrUpd), scaleValue, shareTokenLocked)) | |
277 | 277 | let bBfrUp = (boostInterest + (if ((poolVoted > 0)) | |
278 | 278 | then fraction(calcBoostRwd(pool, rwdBfrUpd), scaleValue8, poolVoted) | |
279 | 279 | else 0)) | |
280 | 280 | let rwd = (currentRewardPerBlock * (toHeight - rewardUpdateHeight)) | |
281 | 281 | $Tuple3(rwd, fBfrUp, bBfrUp) | |
282 | 282 | } | |
283 | - | let reward = $ | |
284 | - | let farmIntrBefore = $ | |
285 | - | let boostIntrBefore = $ | |
283 | + | let reward = $t01005111236._1 | |
284 | + | let farmIntrBefore = $t01005111236._2 | |
285 | + | let boostIntrBefore = $t01005111236._3 | |
286 | 286 | let newFarmInterest = (farmIntrBefore + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
287 | 287 | let newBoostInterest = (boostIntrBefore + (if ((poolVoted > 0)) | |
288 | 288 | then fraction(calcBoostRwd(pool, reward), scaleValue8, poolVoted) | |
289 | 289 | else 0)) | |
290 | 290 | $Tuple2(newFarmInterest, newBoostInterest) | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func claimCalc (pool,user) = { | |
295 | 295 | let scaleValue = calcScaleValue(SWOP, getShareAssetId(pool)) | |
296 | 296 | let poolVoted = getPoolVoted(pool) | |
297 | 297 | let uPoolVoted = getUserPoolVoted(pool, user) | |
298 | 298 | let shareToken = getTotalShareToken(pool) | |
299 | 299 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareToken) | |
300 | 300 | let stratBFarmInterest = valueOrElse(getInteger(this, (pool + kStratBFarmInterest)), 0) | |
301 | - | let $ | |
302 | - | let lastInterestHeight = $ | |
303 | - | let farmInterest = $ | |
304 | - | let boostInterest = $ | |
305 | - | let $ | |
306 | - | let currentRewardPerBlock = $ | |
307 | - | let rewardUpdateHeight = $ | |
308 | - | let previousRewardPerBlock = $ | |
309 | - | let poolRewardUpdateHeight = $ | |
310 | - | let emissionUpdateHeight = $ | |
311 | - | let prevCurrentRewardPerBlock = $ | |
312 | - | let prevPreviousRewardPerBlock = $ | |
301 | + | let $t01207412155 = getLastInterestInfo(pool) | |
302 | + | let lastInterestHeight = $t01207412155._1 | |
303 | + | let farmInterest = $t01207412155._2 | |
304 | + | let boostInterest = $t01207412155._3 | |
305 | + | let $t01216012417 = rewardInfo(pool) | |
306 | + | let currentRewardPerBlock = $t01216012417._1 | |
307 | + | let rewardUpdateHeight = $t01216012417._2 | |
308 | + | let previousRewardPerBlock = $t01216012417._3 | |
309 | + | let poolRewardUpdateHeight = $t01216012417._4 | |
310 | + | let emissionUpdateHeight = $t01216012417._5 | |
311 | + | let prevCurrentRewardPerBlock = $t01216012417._6 | |
312 | + | let prevPreviousRewardPerBlock = $t01216012417._7 | |
313 | 313 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
314 | 314 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), if (if ((stratBFarmInterest > uFarmInterest)) | |
315 | 315 | then (uPoolVoted > 0) | |
316 | 316 | else false) | |
317 | 317 | then 0 | |
318 | 318 | else boostInterest) | |
319 | 319 | let uShareTokensStaked = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
320 | 320 | let uShareTokensVirt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), uShareTokensStaked) | |
321 | 321 | if ((totalShareVirtual == 0)) | |
322 | 322 | then { | |
323 | 323 | let toTreasury = if ((emissionUpdateHeight > lastInterestHeight)) | |
324 | 324 | then ((prevCurrentRewardPerBlock * (emissionUpdateHeight - lastInterestHeight)) + (currentRewardPerBlock * (height - emissionUpdateHeight))) | |
325 | 325 | else (currentRewardPerBlock * (height - lastInterestHeight)) | |
326 | 326 | $Tuple4(farmInterest, boostInterest, 0, toTreasury) | |
327 | 327 | } | |
328 | 328 | else { | |
329 | - | let $ | |
329 | + | let $t01337514512 = if ((emissionUpdateHeight > lastInterestHeight)) | |
330 | 330 | then { | |
331 | - | let $ | |
332 | - | let prevNewFarmInterest = $ | |
333 | - | let prevNewBoostInterest = $ | |
331 | + | let $t01378814347 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, prevCurrentRewardPerBlock, totalShareVirtual, prevPreviousRewardPerBlock, scaleValue, emissionUpdateHeight) | |
332 | + | let prevNewFarmInterest = $t01378814347._1 | |
333 | + | let prevNewBoostInterest = $t01378814347._2 | |
334 | 334 | $Tuple3(prevNewFarmInterest, prevNewBoostInterest, emissionUpdateHeight) | |
335 | 335 | } | |
336 | 336 | else $Tuple3(farmInterest, boostInterest, lastInterestHeight) | |
337 | - | let prevFarmInterest = $ | |
338 | - | let prevBoostInterest = $ | |
339 | - | let LIHeight = $ | |
340 | - | let $ | |
341 | - | let newFarmInterest = $ | |
342 | - | let newBoostInterest = $ | |
337 | + | let prevFarmInterest = $t01337514512._1 | |
338 | + | let prevBoostInterest = $t01337514512._2 | |
339 | + | let LIHeight = $t01337514512._3 | |
340 | + | let $t01452114944 = calcInterest(pool, LIHeight, rewardUpdateHeight, poolRewardUpdateHeight, prevFarmInterest, prevBoostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue, height) | |
341 | + | let newFarmInterest = $t01452114944._1 | |
342 | + | let newBoostInterest = $t01452114944._2 | |
343 | 343 | let farmRwd = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
344 | 344 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
345 | 345 | let boostRwdMax = fraction(fraction(uShareTokensVirt, (newFarmInterest - max([uFarmInterest, stratBFarmInterest])), scaleValue), poolBoostCoef, lockBoostCoefScale) | |
346 | 346 | let curBoostRwd = fraction((newBoostInterest - uBoostInterest), uPoolVoted, scaleValue8) | |
347 | 347 | let boostRwd = min([boostRwdMax, curBoostRwd]) | |
348 | 348 | let toTreasury = (boostRwdMax - boostRwd) | |
349 | 349 | if ((0 > toTreasury)) | |
350 | 350 | then throw("toTreasury < 0") | |
351 | 351 | else $Tuple4(newFarmInterest, newBoostInterest, (farmRwd + boostRwd), toTreasury) | |
352 | 352 | } | |
353 | 353 | } | |
354 | 354 | ||
355 | 355 | ||
356 | 356 | func availableClaimCalcAllByUser (pools,user) = { | |
357 | 357 | func calcAvailable (acc,pool) = { | |
358 | - | let $ | |
359 | - | let newPools = $ | |
360 | - | let amounts = $ | |
361 | - | let $ | |
362 | - | let fi = $ | |
363 | - | let bi = $ | |
364 | - | let claimAmount = $ | |
365 | - | let tt = $ | |
358 | + | let $t01581315842 = acc | |
359 | + | let newPools = $t01581315842._1 | |
360 | + | let amounts = $t01581315842._2 | |
361 | + | let $t01585115904 = claimCalc(pool, user) | |
362 | + | let fi = $t01585115904._1 | |
363 | + | let bi = $t01585115904._2 | |
364 | + | let claimAmount = $t01585115904._3 | |
365 | + | let tt = $t01585115904._4 | |
366 | 366 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
367 | 367 | $Tuple2((newPools :+ pool), (amounts :+ availableFund)) | |
368 | 368 | } | |
369 | 369 | ||
370 | 370 | let $l = pools | |
371 | 371 | let $s = size($l) | |
372 | 372 | let $acc0 = $Tuple2(nil, nil) | |
373 | 373 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
374 | 374 | then $a | |
375 | 375 | else calcAvailable($a, $l[$i]) | |
376 | 376 | ||
377 | 377 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
378 | 378 | then $a | |
379 | 379 | else throw("List size exceeds 60") | |
380 | 380 | ||
381 | 381 | $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($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), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
382 | 382 | } | |
383 | 383 | ||
384 | 384 | ||
385 | 385 | func canLockInFirstHarvest (pool,user,userShareTokensStaked,pmtAmount,lockType) = if ((getHeightFirstHarvest(pool) > height)) | |
386 | 386 | then { | |
387 | 387 | let totalVoteAmount = valueOrElse(getInteger(votingAddress, (pool + kHarvestPoolVote)), 0) | |
388 | 388 | let userVoteAmount = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kHarvestUserPoolVote)), 0) | |
389 | 389 | let FHShareTokenLimit = getFHShareLimitToken(addressFromStringValue(pool)) | |
390 | 390 | let FHShareTokenUserLimit = (fraction(FHShareTokenLimit, userVoteAmount, totalVoteAmount) - userShareTokensStaked) | |
391 | 391 | if ((lockType > 0)) | |
392 | 392 | then throw("You can't lock shareTokens till first harvest end.") | |
393 | 393 | else if ((userVoteAmount == 0)) | |
394 | - | then | |
394 | + | then throw("You can't lock shareTokens. You didn't vote for pool in first week.") | |
395 | 395 | else if ((pmtAmount >= FHShareTokenUserLimit)) | |
396 | 396 | then (pmtAmount - FHShareTokenUserLimit) | |
397 | 397 | else 0 | |
398 | 398 | } | |
399 | 399 | else 0 | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | func getLockParams (type) = { | |
403 | 403 | let lockParams = split(valueOrErrorMessage(getString(this, (toString(type) + kLockParams)), ("There are no key for lock type" + toString(type))), "_") | |
404 | 404 | $Tuple2(parseIntValue(lockParams[0]), parseIntValue(lockParams[1])) | |
405 | 405 | } | |
406 | 406 | ||
407 | 407 | ||
408 | 408 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
409 | 409 | ||
410 | 410 | ||
411 | 411 | func isActive () = if (if (active) | |
412 | 412 | then activeGlob | |
413 | 413 | else false) | |
414 | 414 | then unit | |
415 | 415 | else throw("DApp is inactive at this moment") | |
416 | 416 | ||
417 | 417 | ||
418 | 418 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
419 | 419 | then unit | |
420 | 420 | else throw("Only admin can call this function") | |
421 | 421 | ||
422 | 422 | ||
423 | 423 | func isPoolCall (i,pool) = if (if ((toString(i.caller) == pool)) | |
424 | 424 | then true | |
425 | 425 | else (i.caller == cpmmContract)) | |
426 | 426 | then unit | |
427 | 427 | else throw("Only pool can call this function") | |
428 | 428 | ||
429 | 429 | ||
430 | 430 | func getDeprecatedPool (pool) = valueOrElse(getBoolean(oracle, (kDeprecatedPool + pool)), false) | |
431 | 431 | ||
432 | 432 | ||
433 | 433 | func isDeprecatedPool (pool) = if (!(getDeprecatedPool(pool))) | |
434 | 434 | then unit | |
435 | 435 | else throw("Pool is deprecated. Only unlock action allowed.") | |
436 | 436 | ||
437 | 437 | ||
438 | 438 | func isSelfCall (i) = if ((i.caller == this)) | |
439 | 439 | then unit | |
440 | 440 | else throw("Only contract itself can call this function") | |
441 | 441 | ||
442 | 442 | ||
443 | 443 | func calcLockShareTokens (i,caller,pool,lockType) = { | |
444 | 444 | let shareAssetId = getShareAssetId(pool) | |
445 | 445 | let user = toString(caller) | |
446 | 446 | let totalShare = getTotalShareToken(pool) | |
447 | 447 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShare) | |
448 | 448 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
449 | 449 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
450 | 450 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
451 | 451 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
452 | 452 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
453 | - | let $ | |
454 | - | let lockPeriod = $ | |
455 | - | let lockCoef = $ | |
453 | + | let $t01902819080 = getLockParams(lockType) | |
454 | + | let lockPeriod = $t01902819080._1 | |
455 | + | let lockCoef = $t01902819080._2 | |
456 | 456 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
457 | 457 | if ((i.payments[0].assetId != shareAssetId)) | |
458 | 458 | then throw("Wrong sharetoken in payment") | |
459 | 459 | else if ((0 >= i.payments[0].amount)) | |
460 | 460 | then throw("Payment amount must be greater than 0") | |
461 | 461 | else if ((0 > lockType)) | |
462 | 462 | then throw("lockType must be >= 0") | |
463 | 463 | else { | |
464 | 464 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
465 | 465 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
466 | 466 | then { | |
467 | - | let $ | |
467 | + | let $t01950721441 = if ((lockType == 0)) | |
468 | 468 | then { | |
469 | 469 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
470 | 470 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(caller, shareTokensChangeOnFH, i.payments[0].assetId)], ((totalShare + i.payments[0].amount) - shareTokensChangeOnFH)) | |
471 | 471 | } | |
472 | 472 | else if (if ((userLockedHeigt == 0)) | |
473 | 473 | then if (if ((2 > size(i.payments))) | |
474 | 474 | then true | |
475 | 475 | else (i.payments[1].assetId != unit)) | |
476 | 476 | then true | |
477 | 477 | else (lockWavesFee > i.payments[1].amount) | |
478 | 478 | else false) | |
479 | 479 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
480 | 480 | else if ((userLockedHeigt > (height + lockPeriod))) | |
481 | 481 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
482 | 482 | else { | |
483 | 483 | let userLockedAmountNew = (userLockedAmount + i.payments[0].amount) | |
484 | 484 | let userLockedHeigtNew = (height + lockPeriod) | |
485 | 485 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
486 | 486 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))], (totalShare + i.payments[0].amount)) | |
487 | 487 | } | |
488 | - | let lockEntries = $ | |
489 | - | let totalShareNew = $ | |
488 | + | let lockEntries = $t01950721441._1 | |
489 | + | let totalShareNew = $t01950721441._2 | |
490 | 490 | if ((accountBalance(shareAssetId) > totalShareNew)) | |
491 | 491 | then throw("Balance of share-token is lower than totalAmount") | |
492 | 492 | else { | |
493 | - | let $ | |
494 | - | let farmInterest = $ | |
495 | - | let boostInterest = $ | |
496 | - | let claimAmount = $ | |
497 | - | let toTreasure = $ | |
493 | + | let $t02156621648 = claimCalc(pool, user) | |
494 | + | let farmInterest = $t02156621648._1 | |
495 | + | let boostInterest = $t02156621648._2 | |
496 | + | let claimAmount = $t02156621648._3 | |
497 | + | let toTreasure = $t02156621648._4 | |
498 | 498 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
499 | 499 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
500 | 500 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, totalUserShareTokens], nil) | |
501 | 501 | else 0 | |
502 | 502 | if ((uplp == uplp)) | |
503 | 503 | then ([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((pool + kShareTotalShareTokens), totalShareNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] ++ lockEntries) | |
504 | 504 | else throw("Strict value is not equal to itself.") | |
505 | 505 | } | |
506 | 506 | } | |
507 | 507 | else throw("Strict value is not equal to itself.") | |
508 | 508 | } | |
509 | 509 | } | |
510 | 510 | ||
511 | 511 | ||
512 | 512 | func calcWithdrawShareTokens (i,caller,pool,shareTokensWithdrawAmount) = { | |
513 | 513 | let inv = if (getDeprecatedPool(pool)) | |
514 | 514 | then invoke(this, "unlockUserLockDeprecated", [pool, toString(caller)], nil) | |
515 | 515 | else 0 | |
516 | 516 | if ((inv == inv)) | |
517 | 517 | then { | |
518 | 518 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
519 | 519 | let user = toString(caller) | |
520 | - | let $ | |
521 | - | let farmInterest = $ | |
522 | - | let boostInterest = $ | |
523 | - | let claimAmount = $ | |
524 | - | let toTreasure = $ | |
520 | + | let $t02294523027 = claimCalc(pool, user) | |
521 | + | let farmInterest = $t02294523027._1 | |
522 | + | let boostInterest = $t02294523027._2 | |
523 | + | let claimAmount = $t02294523027._3 | |
524 | + | let toTreasure = $t02294523027._4 | |
525 | 525 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
526 | 526 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
527 | 527 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
528 | 528 | let userStakedAmountNew = (userStakedAmount - shareTokensWithdrawAmount) | |
529 | 529 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
530 | 530 | let totalShareAmount = getTotalShareToken(pool) | |
531 | 531 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShareAmount) | |
532 | 532 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
533 | 533 | let totalShareVirtualNew = (totalShareVirtual - shareTokensWithdrawAmount) | |
534 | 534 | let userAmountVirtualNew = (userAmountVirtual - shareTokensWithdrawAmount) | |
535 | 535 | if ((shareTokensWithdrawAmount > userStakedAmount)) | |
536 | 536 | then throw("Withdraw amount more then user locked amount") | |
537 | 537 | else if ((accountBalance(shareTokensId) > totalShareAmount)) | |
538 | 538 | then throw("Balance of share-token is lower than totalAmount") | |
539 | 539 | else { | |
540 | 540 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
541 | 541 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, (userStakedAmount + userLockedAmount)], nil) | |
542 | 542 | else 0 | |
543 | 543 | if ((uplp == uplp)) | |
544 | 544 | then [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTotalShareTokens), totalShareAmountNew), IntegerEntry((pool + kShareTokensVirtual), totalShareVirtualNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
545 | 545 | else throw("Strict value is not equal to itself.") | |
546 | 546 | } | |
547 | 547 | } | |
548 | 548 | else throw("Strict value is not equal to itself.") | |
549 | 549 | } | |
550 | 550 | ||
551 | 551 | ||
552 | 552 | func calcClaim (i,pool,caller) = { | |
553 | 553 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
554 | 554 | let user = toString(caller) | |
555 | 555 | let shareTokenLocked = getTotalShareToken(pool) | |
556 | - | let $ | |
557 | - | let farmInterest = $ | |
558 | - | let boostInterest = $ | |
559 | - | let claimAmount = $ | |
560 | - | let toTreasure = $ | |
556 | + | let $t02553825620 = claimCalc(pool, user) | |
557 | + | let farmInterest = $t02553825620._1 | |
558 | + | let boostInterest = $t02553825620._2 | |
559 | + | let claimAmount = $t02553825620._3 | |
560 | + | let toTreasure = $t02553825620._4 | |
561 | 561 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
562 | 562 | if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
563 | 563 | then throw("Balance of share-token is lower than totalAmount") | |
564 | 564 | else { | |
565 | 565 | let uTrans = if ((i.caller != this)) | |
566 | 566 | then [ScriptTransfer(i.caller, availableFund, SWOP)] | |
567 | 567 | else nil | |
568 | 568 | $Tuple2(([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), 0), Reissue(SWOP, (toTreasure + availableFund), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] ++ uTrans), availableFund) | |
569 | 569 | } | |
570 | 570 | } | |
571 | 571 | ||
572 | 572 | ||
573 | 573 | func unlockUserLockCalc (i,pool,user) = { | |
574 | 574 | let totalShareVirtual = getIntegerValue(this, (pool + kShareTokensVirtual)) | |
575 | 575 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
576 | 576 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
577 | 577 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
578 | 578 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
579 | - | let $ | |
580 | - | let farmInterest = $ | |
581 | - | let boostInterest = $ | |
582 | - | let claimAmount = $ | |
583 | - | let toTreasure = $ | |
579 | + | let $t02702327105 = claimCalc(pool, user) | |
580 | + | let farmInterest = $t02702327105._1 | |
581 | + | let boostInterest = $t02702327105._2 | |
582 | + | let claimAmount = $t02702327105._3 | |
583 | + | let toTreasure = $t02702327105._4 | |
584 | 584 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
585 | 585 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
586 | 586 | } | |
587 | 587 | ||
588 | 588 | ||
589 | 589 | @Callable(i) | |
590 | 590 | func init (earlyLP) = if (isDefined(getString(this, kSWOPid))) | |
591 | 591 | then throw("SWOP already initialized") | |
592 | 592 | else { | |
593 | 593 | let initAmount = 100000000000000 | |
594 | 594 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
595 | 595 | let SWOPid = calculateAssetId(SWOPissue) | |
596 | 596 | [BooleanEntry(kActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(kSWOPid, toBase58String(SWOPid))] | |
597 | 597 | } | |
598 | 598 | ||
599 | 599 | ||
600 | 600 | ||
601 | 601 | @Callable(i) | |
602 | 602 | func initPoolShareFarming (pool) = valueOrElse(isAdminCall(i), [IntegerEntry((pool + kShareTotalShareTokens), 0), IntegerEntry((pool + kFarmLastInterest), 0), IntegerEntry((pool + kBoostLastInterest), 0), IntegerEntry((pool + kLastInterestHeight), height)]) | |
603 | 603 | ||
604 | 604 | ||
605 | 605 | ||
606 | 606 | @Callable(i) | |
607 | 607 | func updatePoolInterest (pool) = valueOrElse(isActive(), if ((i.caller != govAddress)) | |
608 | 608 | then throw("Only Governance can call this function") | |
609 | 609 | else { | |
610 | 610 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
611 | - | let $ | |
612 | - | let farmInterest = $ | |
613 | - | let boostInterest = $ | |
614 | - | let boostLPinterest = $ | |
611 | + | let $t02927129345 = claimCalc(pool, user) | |
612 | + | let farmInterest = $t02927129345._1 | |
613 | + | let boostInterest = $t02927129345._2 | |
614 | + | let boostLPinterest = $t02927129345._3 | |
615 | 615 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
616 | 616 | }) | |
617 | 617 | ||
618 | 618 | ||
619 | 619 | ||
620 | 620 | @Callable(i) | |
621 | 621 | func lockShareTokens (pool,lockType) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), calcLockShareTokens(i, i.caller, pool, lockType))) | |
622 | 622 | ||
623 | 623 | ||
624 | 624 | ||
625 | 625 | @Callable(i) | |
626 | 626 | func lockShareTokensFromPool (callerBytes,pool,lockType) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), valueOrElse(isPoolCall(i, pool), calcLockShareTokens(i, Address(callerBytes), pool, lockType)))) | |
627 | 627 | ||
628 | 628 | ||
629 | 629 | ||
630 | 630 | @Callable(i) | |
631 | 631 | func lockStakedShareTokens (pool,lockType,lockAmount) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), { | |
632 | 632 | let shareAssetId = getShareAssetId(pool) | |
633 | 633 | let user = toString(i.caller) | |
634 | 634 | let totalShare = getTotalShareToken(pool) | |
635 | 635 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShare) | |
636 | 636 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
637 | 637 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
638 | 638 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
639 | 639 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
640 | 640 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
641 | - | let $ | |
642 | - | let lockPeriod = $ | |
643 | - | let lockCoef = $ | |
641 | + | let $t03097431026 = getLockParams(lockType) | |
642 | + | let lockPeriod = $t03097431026._1 | |
643 | + | let lockCoef = $t03097431026._2 | |
644 | 644 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
645 | 645 | if ((getHeightFirstHarvest(pool) > height)) | |
646 | 646 | then throw("You can't lock shareTokens till first harvest end.") | |
647 | 647 | else if ((0 >= lockType)) | |
648 | 648 | then throw("lockType must be > 0") | |
649 | 649 | else if ((lockAmount > userStakedAmount)) | |
650 | 650 | then throw(("You can't lock more than " + toString(userStakedAmount))) | |
651 | 651 | else if ((accountBalance(shareAssetId) > totalShare)) | |
652 | 652 | then throw("Balance of share-token is lower than totalAmount") | |
653 | 653 | else if (if ((userLockedHeigt == 0)) | |
654 | 654 | then if (if ((1 > size(i.payments))) | |
655 | 655 | then true | |
656 | 656 | else (i.payments[0].assetId != unit)) | |
657 | 657 | then true | |
658 | 658 | else (lockWavesFee > i.payments[0].amount) | |
659 | 659 | else false) | |
660 | 660 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
661 | 661 | else if (if ((userLockedHeigt == 0)) | |
662 | 662 | then (0 >= lockAmount) | |
663 | 663 | else false) | |
664 | 664 | then throw("lockAmount must be greater than 0") | |
665 | 665 | else if ((0 > lockAmount)) | |
666 | 666 | then throw("lockAmount must be positive") | |
667 | 667 | else if ((userLockedHeigt > (height + lockPeriod))) | |
668 | 668 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
669 | 669 | else { | |
670 | 670 | let userLockedAmountNew = (userLockedAmount + lockAmount) | |
671 | 671 | let userStakedAmountNew = (userStakedAmount - lockAmount) | |
672 | 672 | let userLockedHeigtNew = (height + lockPeriod) | |
673 | 673 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmountNew) | |
674 | - | let $ | |
675 | - | let farmInterest = $ | |
676 | - | let boostInterest = $ | |
677 | - | let claimAmount = $ | |
678 | - | let toTreasure = $ | |
674 | + | let $t03237232454 = claimCalc(pool, user) | |
675 | + | let farmInterest = $t03237232454._1 | |
676 | + | let boostInterest = $t03237232454._2 | |
677 | + | let claimAmount = $t03237232454._3 | |
678 | + | let toTreasure = $t03237232454._4 | |
679 | 679 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
680 | 680 | [IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew)), IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
681 | 681 | } | |
682 | 682 | })) | |
683 | 683 | ||
684 | 684 | ||
685 | 685 | ||
686 | 686 | @Callable(i) | |
687 | 687 | func unlockUserLock (pool,user) = valueOrElse(isActive(), { | |
688 | 688 | let userLockedHeigt = valueOrErrorMessage(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), (((("There is no pool " + pool) + " or user ") + user) + "with lock")) | |
689 | 689 | if ((userLockedHeigt > height)) | |
690 | 690 | then throw(("You can't unlock sharetokens till " + toString(userLockedHeigt))) | |
691 | 691 | else (unlockUserLockCalc(i, pool, user) ++ [ScriptTransfer(i.caller, getIntegerValue(this, kLockWavesFee), unit)]) | |
692 | 692 | }) | |
693 | 693 | ||
694 | 694 | ||
695 | 695 | ||
696 | 696 | @Callable(i) | |
697 | 697 | func unlockUserLockDeprecated (pool,user) = valueOrElse(isActive(), valueOrElse(isSelfCall(i), if (!(getDeprecatedPool(pool))) | |
698 | 698 | then throw("Pool must be deprecated") | |
699 | 699 | else if (isDefined(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)))) | |
700 | 700 | then (unlockUserLockCalc(i, pool, user) ++ [ScriptTransfer(moneyBoxAddress, getIntegerValue(this, kLockWavesFee), unit)]) | |
701 | 701 | else nil)) | |
702 | 702 | ||
703 | 703 | ||
704 | 704 | ||
705 | 705 | @Callable(i) | |
706 | 706 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), calcWithdrawShareTokens(i, i.caller, pool, shareTokensWithdrawAmount)) | |
707 | 707 | ||
708 | 708 | ||
709 | 709 | ||
710 | 710 | @Callable(i) | |
711 | 711 | func withdrawShareTokensFromPool (callerBytes,pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), valueOrElse(isPoolCall(i, pool), calcWithdrawShareTokens(i, Address(callerBytes), pool, shareTokensWithdrawAmount))) | |
712 | 712 | ||
713 | 713 | ||
714 | 714 | ||
715 | 715 | @Callable(i) | |
716 | 716 | func claim (pool) = valueOrElse(isActive(), { | |
717 | 717 | let r = calcClaim(i, pool, i.caller) | |
718 | 718 | if ((r._2 == 0)) | |
719 | 719 | then throw("You have 0 available SWOP") | |
720 | 720 | else r | |
721 | 721 | }) | |
722 | 722 | ||
723 | 723 | ||
724 | 724 | ||
725 | 725 | @Callable(i) | |
726 | 726 | func claimInternal (pool,caller) = valueOrElse(isActive(), valueOrElse(isSelfCall(i), calcClaim(i, pool, Address(caller)))) | |
727 | 727 | ||
728 | 728 | ||
729 | 729 | ||
730 | 730 | @Callable(i) | |
731 | 731 | func claimAndStake (pool) = valueOrElse(isActive(), { | |
732 | 732 | let claimAmount = { | |
733 | 733 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
734 | 734 | if ($isInstanceOf(@, "Int")) | |
735 | 735 | then @ | |
736 | 736 | else throw(($getType(@) + " couldn't be cast to Int")) | |
737 | 737 | } | |
738 | 738 | if ((claimAmount == claimAmount)) | |
739 | 739 | then if ((claimAmount == 0)) | |
740 | 740 | then throw("You have 0 available SWOP") | |
741 | 741 | else { | |
742 | 742 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimAmount)]) | |
743 | 743 | if ((stakeToGov == stakeToGov)) | |
744 | 744 | then nil | |
745 | 745 | else throw("Strict value is not equal to itself.") | |
746 | 746 | } | |
747 | 747 | else throw("Strict value is not equal to itself.") | |
748 | 748 | }) | |
749 | 749 | ||
750 | 750 | ||
751 | 751 | ||
752 | 752 | @Callable(i) | |
753 | 753 | func claimAll (pools) = valueOrElse(isActive(), { | |
754 | 754 | func claimInv (claimTotal,pool) = { | |
755 | 755 | let claimAmount = { | |
756 | 756 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
757 | 757 | if ($isInstanceOf(@, "Int")) | |
758 | 758 | then @ | |
759 | 759 | else throw(($getType(@) + " couldn't be cast to Int")) | |
760 | 760 | } | |
761 | 761 | if ((claimAmount == claimAmount)) | |
762 | 762 | then (claimTotal + claimAmount) | |
763 | 763 | else throw("Strict value is not equal to itself.") | |
764 | 764 | } | |
765 | 765 | ||
766 | 766 | let claimTotal = { | |
767 | 767 | let $l = pools | |
768 | 768 | let $s = size($l) | |
769 | 769 | let $acc0 = 0 | |
770 | 770 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
771 | 771 | then $a | |
772 | 772 | else claimInv($a, $l[$i]) | |
773 | 773 | ||
774 | 774 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
775 | 775 | then $a | |
776 | 776 | else throw("List size exceeds 60") | |
777 | 777 | ||
778 | 778 | $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($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), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
779 | 779 | } | |
780 | 780 | if ((claimTotal == 0)) | |
781 | 781 | then throw("You have 0 available SWOP") | |
782 | 782 | else [ScriptTransfer(i.caller, claimTotal, SWOP)] | |
783 | 783 | }) | |
784 | 784 | ||
785 | 785 | ||
786 | 786 | ||
787 | 787 | @Callable(i) | |
788 | 788 | func claimAllAndStake (pools) = valueOrElse(isActive(), { | |
789 | 789 | func claimInv (claimTotal,pool) = { | |
790 | 790 | let claimAmount = { | |
791 | 791 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
792 | 792 | if ($isInstanceOf(@, "Int")) | |
793 | 793 | then @ | |
794 | 794 | else throw(($getType(@) + " couldn't be cast to Int")) | |
795 | 795 | } | |
796 | 796 | if ((claimAmount == claimAmount)) | |
797 | 797 | then (claimTotal + claimAmount) | |
798 | 798 | else throw("Strict value is not equal to itself.") | |
799 | 799 | } | |
800 | 800 | ||
801 | 801 | let claimTotal = { | |
802 | 802 | let $l = pools | |
803 | 803 | let $s = size($l) | |
804 | 804 | let $acc0 = 0 | |
805 | 805 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
806 | 806 | then $a | |
807 | 807 | else claimInv($a, $l[$i]) | |
808 | 808 | ||
809 | 809 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
810 | 810 | then $a | |
811 | 811 | else throw("List size exceeds 60") | |
812 | 812 | ||
813 | 813 | $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($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), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
814 | 814 | } | |
815 | 815 | if ((claimTotal == 0)) | |
816 | 816 | then throw("You have 0 available SWOP") | |
817 | 817 | else { | |
818 | 818 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimTotal)]) | |
819 | 819 | if ((stakeToGov == stakeToGov)) | |
820 | 820 | then nil | |
821 | 821 | else throw("Strict value is not equal to itself.") | |
822 | 822 | } | |
823 | 823 | }) | |
824 | 824 | ||
825 | 825 | ||
826 | 826 | ||
827 | 827 | @Callable(i) | |
828 | 828 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
829 | 829 | then throw("Only voiting can call this function") | |
830 | 830 | else { | |
831 | - | let $ | |
832 | - | let farmInterest = $ | |
833 | - | let boostInterest = $ | |
834 | - | let claimAmount = $ | |
835 | - | let toTreasure = $ | |
831 | + | let $t03720337285 = claimCalc(pool, user) | |
832 | + | let farmInterest = $t03720337285._1 | |
833 | + | let boostInterest = $t03720337285._2 | |
834 | + | let claimAmount = $t03720337285._3 | |
835 | + | let toTreasure = $t03720337285._4 | |
836 | 836 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
837 | 837 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
838 | 838 | }) | |
839 | 839 | ||
840 | 840 | ||
841 | 841 | ||
842 | 842 | @Callable(i) | |
843 | 843 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
844 | 844 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
845 | 845 | else suspend("Paused by admin")) | |
846 | 846 | ||
847 | 847 | ||
848 | 848 | ||
849 | 849 | @Callable(i) | |
850 | 850 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
851 | 851 | then throw("DApp is already active") | |
852 | 852 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
853 | 853 | ||
854 | 854 | ||
855 | 855 | @Verifier(tx) | |
856 | 856 | func verify () = match tx { | |
857 | 857 | case _ => | |
858 | 858 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
859 | 859 | then 1 | |
860 | 860 | else 0 | |
861 | 861 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
862 | 862 | then 1 | |
863 | 863 | else 0 | |
864 | 864 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
865 | 865 | then 1 | |
866 | 866 | else 0 | |
867 | 867 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
868 | 868 | } | |
869 | 869 |
github/deemru/w8io/169f3d6 154.86 ms ◑