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