tx · D97jizeEhZxPwBSwduiLFhDvKB5FZPNXe86phef7QfcF 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.42000000 Waves 2023.07.24 12:15 [2679749] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "D97jizeEhZxPwBSwduiLFhDvKB5FZPNXe86phef7QfcF", "fee": 42000000, "feeAssetId": null, "timestamp": 1690190148821, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "5wJUrhxPxQ29qSDHBbzDAfrDVB3HEGmhEmF1QobiTByexKs1jNfTFyFoG4dTTQhcGniEaH7ruM66BzMCXbTjc4N8" ], "script": "base64:BgKmAQgCEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg0KCwgIAQQRGBgRAQEYEgkKBwgIAQQIARgSDQoLCAgBBBgYGBgYARgSCwoJCAgBAQEBAQEEEgASABIAEgASABIAEgASABIDCgEIEgMKAQh3AAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUAB1NDQUxFMTYJALYCAQCAgIT+pt7hEQAKRkVFX1NDQUxFNgDAhD0AFGtTRlBvb2xBQXNz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Rwb29sCQELdmFsdWVPckVsc2UCCQELaXNBZG1pbkNhbGwBBQFpAwkBASEBCQEJaXNEZWZpbmVkAQkAnQgCBQR0aGlzCQCsAgIFBWtQb29sBQRwb29sCQACAQIMVW5rbm93biBwb29sAwkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzCQCsAgIFBHBvb2wFC2tQb29sQWN0aXZlBgkAAgECE1Bvb2wgYWxyZWFkeSBhY3RpdmUJAMwIAgkBDEJvb2xlYW5FbnRyeQIJAKwCAgUEcG9vbAULa1Bvb2xBY3RpdmUGBQNuaWwBaQEMc2h1dGRvd25Qb29sAQRwb29sCQELdmFsdWVPckVsc2UCCQELaXNBZG1pbkNhbGwBBQFpAwkBASEBCQEJaXNEZWZpbmVkAQkAnQgCBQR0aGlzCQCsAgIFBWtQb29sBQRwb29sCQACAQIMVW5rbm93biBwb29sAwkBASEBCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMJAKwCAgUEcG9vbAULa1Bvb2xBY3RpdmUGCQACAQIVUG9vbCBhbHJlYWR5IHNodXRkb3duCQDMCAIJAQxCb29sZWFuRW50cnkCCQCsAgIFBHBvb2wFC2tQb29sQWN0aXZlBwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQVSvXk=", "height": 2679749, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GcqP6R7ct1uNxW47L3RMfT3kn1oXUYdE3xHmE2KZ9EUy Next: FxVCrpoJFb2gwrAJBhMAeUvSjuGMv8pTNvFKARVw2ixj Diff:
Old | New | Differences | |
---|---|---|---|
572 | 572 | ||
573 | 573 | ||
574 | 574 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
575 | - | let $ | |
575 | + | let $t01716917633 = if ((pType == SF_POOL)) | |
576 | 576 | then { | |
577 | 577 | let inv = { | |
578 | 578 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
579 | - | if ($isInstanceOf(@, " | |
579 | + | if ($isInstanceOf(@, "List[Any]")) | |
580 | 580 | then @ | |
581 | - | else throw(($getType(@) + " couldn't be cast to | |
581 | + | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
582 | 582 | } | |
583 | 583 | if ((inv == inv)) | |
584 | - | then $Tuple2(inv._1, inv._2) | |
584 | + | then $Tuple2({ | |
585 | + | let @ = inv[0] | |
586 | + | if ($isInstanceOf(@, "Int")) | |
587 | + | then @ | |
588 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
589 | + | }, { | |
590 | + | let @ = inv[1] | |
591 | + | if ($isInstanceOf(@, "Int")) | |
592 | + | then @ | |
593 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
594 | + | }) | |
585 | 595 | else throw("Strict value is not equal to itself.") | |
586 | 596 | } | |
587 | 597 | else if ((pType == WX_POOL)) | |
597 | 607 | else throw("Strict value is not equal to itself.") | |
598 | 608 | } | |
599 | 609 | else unknownPoolType() | |
600 | - | let amountA = $ | |
601 | - | let amountB = $ | |
610 | + | let amountA = $t01716917633._1 | |
611 | + | let amountB = $t01716917633._2 | |
602 | 612 | $Tuple2(amountA, amountB) | |
603 | 613 | } | |
604 | 614 | ||
641 | 651 | if ((lpBalanceBefore == lpBalanceBefore)) | |
642 | 652 | then { | |
643 | 653 | let poolAddr = addressFromStringValue(pool) | |
644 | - | let $ | |
654 | + | let $t01859819014 = if (if ((pmtA > 0)) | |
645 | 655 | then (pmtB > 0) | |
646 | 656 | else false) | |
647 | 657 | then { | |
648 | - | let $ | |
649 | - | let pmtInA = $ | |
650 | - | let pmtInB = $ | |
651 | - | let change = $ | |
652 | - | let changeId = $ | |
658 | + | let $t01866418780 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
659 | + | let pmtInA = $t01866418780._1 | |
660 | + | let pmtInB = $t01866418780._2 | |
661 | + | let change = $t01866418780._3 | |
662 | + | let changeId = $t01866418780._4 | |
653 | 663 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
654 | 664 | if ((inv == inv)) | |
655 | 665 | then $Tuple2(change, changeId) | |
660 | 670 | else if ((pmtB > 0)) | |
661 | 671 | then $Tuple2(pmtB, bId) | |
662 | 672 | else throw("pmts must be > 0") | |
663 | - | let change = $ | |
664 | - | let changeId = $ | |
673 | + | let change = $t01859819014._1 | |
674 | + | let changeId = $t01859819014._2 | |
665 | 675 | let inv = if ((change > 0)) | |
666 | 676 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
667 | 677 | else nil | |
689 | 699 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
690 | 700 | let totalAmount = getPoolTotalShare(pool) | |
691 | 701 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
692 | - | let $ | |
702 | + | let $t01987220110 = if (withLoan) | |
693 | 703 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
694 | 704 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
695 | - | let curPoolInterest = $ | |
696 | - | let totalStakedWithLoan = $ | |
705 | + | let curPoolInterest = $t01987220110._1 | |
706 | + | let totalStakedWithLoan = $t01987220110._2 | |
697 | 707 | [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))] | |
698 | 708 | } | |
699 | 709 | ||
739 | 749 | ||
740 | 750 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
741 | 751 | let poolAddr = Address(fromBase58String(pool)) | |
742 | - | let $ | |
743 | - | let AId = $ | |
744 | - | let BId = $ | |
745 | - | let balA = $ | |
746 | - | let balB = $ | |
747 | - | let shareId = $ | |
752 | + | let $t02246122527 = getPoolData(poolAddr, pType) | |
753 | + | let AId = $t02246122527._1 | |
754 | + | let BId = $t02246122527._2 | |
755 | + | let balA = $t02246122527._3 | |
756 | + | let balB = $t02246122527._4 | |
757 | + | let shareId = $t02246122527._5 | |
748 | 758 | if (if ((tokenId != AId)) | |
749 | 759 | then (tokenId != BId) | |
750 | 760 | else false) | |
751 | 761 | then throw("Wrong asset") | |
752 | 762 | else { | |
753 | - | let $ | |
763 | + | let $t02261222692 = if ((tokenId == AId)) | |
754 | 764 | then $Tuple2(tokenAmount, 0) | |
755 | 765 | else $Tuple2(0, tokenAmount) | |
756 | - | let pmtA = $ | |
757 | - | let pmtB = $ | |
758 | - | let $ | |
759 | - | let stakedAmount = $ | |
760 | - | let nf = $ | |
766 | + | let pmtA = $t02261222692._1 | |
767 | + | let pmtB = $t02261222692._2 | |
768 | + | let $t02269522799 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
769 | + | let stakedAmount = $t02269522799._1 | |
770 | + | let nf = $t02269522799._2 | |
761 | 771 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
762 | 772 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
763 | 773 | let totalShareAmount = getPoolTotalShare(pool) | |
784 | 794 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset,stopLossFee) = { | |
785 | 795 | let poolAddr = Address(fromBase58String(pool)) | |
786 | 796 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
787 | - | let $ | |
788 | - | let assetIdA = $ | |
789 | - | let assetIdB = $ | |
790 | - | let balA = $ | |
791 | - | let balB = $ | |
792 | - | let shareId = $ | |
797 | + | let $t02458924665 = getPoolData(poolAddr, pType) | |
798 | + | let assetIdA = $t02458924665._1 | |
799 | + | let assetIdB = $t02458924665._2 | |
800 | + | let balA = $t02458924665._3 | |
801 | + | let balB = $t02458924665._4 | |
802 | + | let shareId = $t02458924665._5 | |
793 | 803 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
794 | 804 | if ((cBalABefore == cBalABefore)) | |
795 | 805 | then { | |
815 | 825 | then { | |
816 | 826 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
817 | 827 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
818 | - | let $ | |
819 | - | let tokensAmountA = $ | |
820 | - | let tokensAmountB = $ | |
821 | - | let $ | |
828 | + | let $t02535825447 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
829 | + | let tokensAmountA = $t02535825447._1 | |
830 | + | let tokensAmountB = $t02535825447._2 | |
831 | + | let $t02545026304 = if ((debt > 0)) | |
822 | 832 | then { | |
823 | 833 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
824 | 834 | then (debt > tokensAmountA) | |
843 | 853 | else throw("Strict value is not equal to itself.") | |
844 | 854 | } | |
845 | 855 | else $Tuple2(tokensAmountA, tokensAmountB) | |
846 | - | let toUserA = $ | |
847 | - | let toUserB = $ | |
856 | + | let toUserA = $t02545026304._1 | |
857 | + | let toUserB = $t02545026304._2 | |
848 | 858 | $Tuple5(toUserA, assetIdA, toUserB, assetIdB, shareId) | |
849 | 859 | } | |
850 | 860 | else throw("Strict value is not equal to itself.") | |
872 | 882 | let poolTotalShare = getPoolTotalShare(pool) | |
873 | 883 | let userAddr = Address(fromBase58String(user)) | |
874 | 884 | let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "") | |
875 | - | let $ | |
885 | + | let $t02750227736 = if ((borrowAmount > 0)) | |
876 | 886 | then $Tuple2({ | |
877 | 887 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil) | |
878 | 888 | if ($isInstanceOf(@, "Int")) | |
880 | 890 | else throw(($getType(@) + " couldn't be cast to Int")) | |
881 | 891 | }, STOPLOSS_LOAN) | |
882 | 892 | else $Tuple2(0, STOPLOSS_FEE_NO_LOAN) | |
883 | - | let debt = $ | |
884 | - | let feeType = $ | |
893 | + | let debt = $t02750227736._1 | |
894 | + | let feeType = $t02750227736._2 | |
885 | 895 | let stopLossFee = if (stopLoss) | |
886 | 896 | then fraction(userCanWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6) | |
887 | 897 | else 0 | |
888 | - | let $ | |
889 | - | if (($ | |
898 | + | let $t02785328009 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee) | |
899 | + | if (($t02785328009 == $t02785328009)) | |
890 | 900 | then { | |
891 | - | let shareId = $ | |
892 | - | let assetIdB = $ | |
893 | - | let toUserAmountB = $ | |
894 | - | let assetIdA = $ | |
895 | - | let toUserAmountA = $ | |
901 | + | let shareId = $t02785328009._5 | |
902 | + | let assetIdB = $t02785328009._4 | |
903 | + | let toUserAmountB = $t02785328009._3 | |
904 | + | let assetIdA = $t02785328009._2 | |
905 | + | let toUserAmountA = $t02785328009._1 | |
896 | 906 | let closeDbtInv = if ((debt > 0)) | |
897 | 907 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
898 | 908 | else 0 | |
899 | 909 | if ((closeDbtInv == closeDbtInv)) | |
900 | - | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil)) | |
910 | + | then { | |
911 | + | let entries = ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil)) | |
912 | + | $Tuple2(entries, [toUserAmountA, toUserAmountB]) | |
913 | + | } | |
901 | 914 | else throw("Strict value is not equal to itself.") | |
902 | 915 | } | |
903 | 916 | else throw("Strict value is not equal to itself.") | |
931 | 944 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
932 | 945 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
933 | 946 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
934 | - | let $ | |
947 | + | let $t03007230169 = if ((borrowId == aId)) | |
935 | 948 | then $Tuple2(dPriceA, decPrA) | |
936 | 949 | else $Tuple2(dPriceB, decPrB) | |
937 | - | let borrowPrice = $ | |
938 | - | let borrowDecPr = $ | |
950 | + | let borrowPrice = $t03007230169._1 | |
951 | + | let borrowDecPr = $t03007230169._2 | |
939 | 952 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
940 | 953 | } | |
941 | 954 | ||
964 | 977 | ||
965 | 978 | ||
966 | 979 | func claimAndCheckAmntEx (pool,pType,claim,amountToExchange,change) = { | |
967 | - | let $ | |
980 | + | let $t03118331470 = if (claim) | |
968 | 981 | then claimFarmed(pType, pool) | |
969 | 982 | else { | |
970 | 983 | let claimedAsset = if ((pType == SF_POOL)) | |
974 | 987 | else unknownPoolType() | |
975 | 988 | $Tuple2(amountToExchange, claimedAsset) | |
976 | 989 | } | |
977 | - | let claimAmount = $t03110031387._1 | |
978 | - | let claimAsset = $t03110031387._2 | |
979 | - | if ((amountToExchange > (claimAmount + change))) | |
990 | + | let claimAmount = $t03118331470._1 | |
991 | + | let claimAsset = $t03118331470._2 | |
992 | + | let bal = accountBalance(claimAsset) | |
993 | + | if (if ((amountToExchange > (claimAmount + change))) | |
994 | + | then true | |
995 | + | else (amountToExchange > bal)) | |
980 | 996 | then throw("To big amount to exchange") | |
981 | 997 | else $Tuple2(claimAmount, claimAsset) | |
982 | 998 | } | |
1001 | 1017 | ||
1002 | 1018 | ||
1003 | 1019 | @Callable(i) | |
1004 | - | func | |
1020 | + | func getUserPositionREADONLY (user,pools,posNum) = { | |
1005 | 1021 | func userPos (a,pool) = { | |
1006 | - | let $t03228332317 = a | |
1007 | - | let totalPos = $t03228332317._1 | |
1008 | - | let posDebt = $t03228332317._2 | |
1009 | - | let index = $t03228332317._3 | |
1022 | + | let $t03243632480 = a | |
1023 | + | let wAmountsA = $t03243632480._1 | |
1024 | + | let wAmountsB = $t03243632480._2 | |
1025 | + | let debts = $t03243632480._3 | |
1026 | + | let index = $t03243632480._4 | |
1010 | 1027 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1011 | - | let $ | |
1012 | - | let AId = $ | |
1013 | - | let BId = $ | |
1014 | - | let balA = $ | |
1015 | - | let balB = $ | |
1016 | - | let shareId = $ | |
1028 | + | let $t03257232662 = getPoolData(Address(fromBase58String(pool)), pType) | |
1029 | + | let AId = $t03257232662._1 | |
1030 | + | let BId = $t03257232662._2 | |
1031 | + | let balA = $t03257232662._3 | |
1032 | + | let balB = $t03257232662._4 | |
1033 | + | let shareId = $t03257232662._5 | |
1017 | 1034 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1018 | 1035 | if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition))))) | |
1019 | - | then $Tuple3(( | |
1036 | + | then $Tuple3((wAmountsA :+ 0), (wAmountsB :+ 0), (index + 1)) | |
1020 | 1037 | else { | |
1021 | 1038 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1022 | - | let sharePrices = getSharePrice(shareId) | |
1023 | - | let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
1024 | - | let shareD = fraction(userCanWithdraw, sharePrices, decPrShare) | |
1025 | - | if ((borrowAmount == 0)) | |
1026 | - | then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1)) | |
1027 | - | else { | |
1039 | + | let $t03302333143 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1040 | + | let wAmountA = $t03302333143._1 | |
1041 | + | let wAmountB = $t03302333143._2 | |
1042 | + | if ((borrowAmount > 0)) | |
1043 | + | then { | |
1028 | 1044 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1029 | 1045 | let debt = { | |
1030 | 1046 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil) | |
1032 | 1048 | then @ | |
1033 | 1049 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1034 | 1050 | } | |
1035 | - | let borrowAssetPrice = getIntegerValue(priceOracleAddr, (borrowAsset + kPriceInOracle)) | |
1036 | - | let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN) | |
1037 | - | let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId) | |
1038 | - | $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1)) | |
1051 | + | if ((debt == debt)) | |
1052 | + | then $Tuple4((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (index + 1)) | |
1053 | + | else throw("Strict value is not equal to itself.") | |
1039 | 1054 | } | |
1055 | + | else $Tuple3((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1)) | |
1040 | 1056 | } | |
1041 | 1057 | } | |
1042 | 1058 | ||
1043 | - | let $ | |
1059 | + | let $t03356033637 = { | |
1044 | 1060 | let $l = pools | |
1045 | 1061 | let $s = size($l) | |
1046 | - | let $acc0 = $ | |
1062 | + | let $acc0 = $Tuple4(nil, nil, nil, 0) | |
1047 | 1063 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1048 | 1064 | then $a | |
1049 | 1065 | else userPos($a, $l[$i]) | |
1054 | 1070 | ||
1055 | 1071 | $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) | |
1056 | 1072 | } | |
1057 | - | let pos = $t03366333718._1 | |
1058 | - | let debt = $t03366333718._2 | |
1059 | - | $Tuple2(nil, $Tuple2(pos, debt)) | |
1073 | + | let wAmountsA = $t03356033637._1 | |
1074 | + | let wAmountsB = $t03356033637._2 | |
1075 | + | let debts = $t03356033637._3 | |
1076 | + | $Tuple2(nil, $Tuple3(wAmountsA, wAmountsB, debts)) | |
1060 | 1077 | } | |
1061 | 1078 | ||
1062 | 1079 | ||
1072 | 1089 | then throw("You can't borrow in this pool") | |
1073 | 1090 | else { | |
1074 | 1091 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1075 | - | let $ | |
1076 | - | let AId = $ | |
1077 | - | let BId = $ | |
1078 | - | let balA = $ | |
1079 | - | let balB = $ | |
1080 | - | let shareId = $ | |
1092 | + | let $t03412634216 = getPoolData(Address(fromBase58String(pool)), pType) | |
1093 | + | let AId = $t03412634216._1 | |
1094 | + | let BId = $t03412634216._2 | |
1095 | + | let balA = $t03412634216._3 | |
1096 | + | let balB = $t03412634216._4 | |
1097 | + | let shareId = $t03412634216._5 | |
1081 | 1098 | if (if ((borrowId != AId)) | |
1082 | 1099 | then (borrowId != BId) | |
1083 | 1100 | else false) | |
1084 | 1101 | then throw("Wrong borrow asset") | |
1085 | 1102 | else { | |
1086 | - | let $ | |
1087 | - | let pmtA = $ | |
1088 | - | let pmtB = $ | |
1103 | + | let $t03429734356 = parseReplenishPmts(i.payments, AId, BId) | |
1104 | + | let pmtA = $t03429734356._1 | |
1105 | + | let pmtB = $t03429734356._2 | |
1089 | 1106 | let user = toString(i.caller) | |
1090 | 1107 | let newPosNum = getNewUserPositionNumber(user) | |
1091 | 1108 | if ((leverage > 100)) | |
1105 | 1122 | if ((inv == inv)) | |
1106 | 1123 | then { | |
1107 | 1124 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1108 | - | let $ | |
1109 | - | if (($ | |
1125 | + | let $t03534535439 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1126 | + | if (($t03534535439 == $t03534535439)) | |
1110 | 1127 | then { | |
1111 | - | let newBalB = $ | |
1112 | - | let newBalA = $ | |
1128 | + | let newBalB = $t03534535439._2 | |
1129 | + | let newBalA = $t03534535439._1 | |
1113 | 1130 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1114 | - | let $ | |
1115 | - | let wAmountA = $ | |
1116 | - | let wAmountB = $ | |
1131 | + | let $t03550935624 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1132 | + | let wAmountA = $t03550935624._1 | |
1133 | + | let wAmountB = $t03550935624._2 | |
1117 | 1134 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1118 | 1135 | } | |
1119 | 1136 | else throw("Strict value is not equal to itself.") | |
1123 | 1140 | else throw("Strict value is not equal to itself.") | |
1124 | 1141 | } | |
1125 | 1142 | else { | |
1126 | - | let $ | |
1127 | - | if (($ | |
1143 | + | let $t03567735792 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1144 | + | if (($t03567735792 == $t03567735792)) | |
1128 | 1145 | then { | |
1129 | - | let axlyFee = $ | |
1130 | - | let userStaked = $ | |
1131 | - | let $ | |
1132 | - | if (($ | |
1146 | + | let axlyFee = $t03567735792._2 | |
1147 | + | let userStaked = $t03567735792._1 | |
1148 | + | let $t03579835892 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1149 | + | if (($t03579835892 == $t03579835892)) | |
1133 | 1150 | then { | |
1134 | - | let newBalB = $ | |
1135 | - | let newBalA = $ | |
1151 | + | let newBalB = $t03579835892._2 | |
1152 | + | let newBalA = $t03579835892._1 | |
1136 | 1153 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1137 | - | let $ | |
1138 | - | let wAmountA = $ | |
1139 | - | let wAmountB = $ | |
1154 | + | let $t03596236077 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1155 | + | let wAmountA = $t03596236077._1 | |
1156 | + | let wAmountB = $t03596236077._2 | |
1140 | 1157 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1141 | 1158 | } | |
1142 | 1159 | else throw("Strict value is not equal to itself.") | |
1193 | 1210 | ||
1194 | 1211 | @Callable(i) | |
1195 | 1212 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1196 | - | let $ | |
1197 | - | let user = $ | |
1198 | - | let pool = $ | |
1199 | - | let pmtA = $ | |
1200 | - | let AId = $ | |
1201 | - | let pmtB = $ | |
1202 | - | let BId = $ | |
1203 | - | let balA = $ | |
1204 | - | let balB = $ | |
1205 | - | let shareId = $ | |
1206 | - | let bwAsset = $ | |
1207 | - | let bwAmount = $ | |
1213 | + | let $t03884638950 = parseRequest(requestId) | |
1214 | + | let user = $t03884638950._1 | |
1215 | + | let pool = $t03884638950._2 | |
1216 | + | let pmtA = $t03884638950._3 | |
1217 | + | let AId = $t03884638950._4 | |
1218 | + | let pmtB = $t03884638950._5 | |
1219 | + | let BId = $t03884638950._6 | |
1220 | + | let balA = $t03884638950._7 | |
1221 | + | let balB = $t03884638950._8 | |
1222 | + | let shareId = $t03884638950._9 | |
1223 | + | let bwAsset = $t03884638950._10 | |
1224 | + | let bwAmount = $t03884638950._11 | |
1208 | 1225 | if ((size(i.payments) != 1)) | |
1209 | 1226 | then throw("Wrong payment size") | |
1210 | 1227 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1212 | 1229 | else (i.payments[0].amount != bwAmount)) | |
1213 | 1230 | then throw("Wrong payment") | |
1214 | 1231 | else { | |
1215 | - | let $ | |
1232 | + | let $t03914039240 = if ((AId == bwAsset)) | |
1216 | 1233 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1217 | 1234 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1218 | - | let pmtAllA = $ | |
1219 | - | let pmtAllB = $ | |
1235 | + | let pmtAllA = $t03914039240._1 | |
1236 | + | let pmtAllB = $t03914039240._2 | |
1220 | 1237 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1221 | - | let $ | |
1222 | - | let userStaked = $ | |
1223 | - | let axlyFee = $ | |
1238 | + | let $t03932239437 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1239 | + | let userStaked = $t03932239437._1 | |
1240 | + | let axlyFee = $t03932239437._2 | |
1224 | 1241 | let posNum = getNewUserPositionNumber(user) | |
1225 | 1242 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1226 | 1243 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1227 | - | let $ | |
1228 | - | let wAmountA = $ | |
1229 | - | let wAmountB = $ | |
1244 | + | let $t03979739912 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1245 | + | let wAmountA = $t03979739912._1 | |
1246 | + | let wAmountB = $t03979739912._2 | |
1230 | 1247 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1231 | 1248 | } | |
1232 | 1249 | })) | |
1237 | 1254 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1238 | 1255 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1239 | 1256 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1240 | - | let $ | |
1241 | - | let AId = $ | |
1242 | - | let BId = $ | |
1243 | - | let balA = $ | |
1244 | - | let balB = $ | |
1245 | - | let shareId = $ | |
1257 | + | let $t04043340523 = getPoolData(Address(fromBase58String(pool)), pType) | |
1258 | + | let AId = $t04043340523._1 | |
1259 | + | let BId = $t04043340523._2 | |
1260 | + | let balA = $t04043340523._3 | |
1261 | + | let balB = $t04043340523._4 | |
1262 | + | let shareId = $t04043340523._5 | |
1246 | 1263 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1247 | 1264 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1248 | 1265 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1263 | 1280 | then throw("Token price greater stop loss price") | |
1264 | 1281 | else if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))))) | |
1265 | 1282 | then throw("No entry") | |
1266 | - | else (withdrawToUser(user, pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))) | |
1283 | + | else { | |
1284 | + | let res = withdrawToUser(user, pool, toString(posId), true) | |
1285 | + | $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2) | |
1286 | + | } | |
1267 | 1287 | })) | |
1268 | 1288 | ||
1269 | 1289 | ||
1272 | 1292 | func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), { | |
1273 | 1293 | let pType = getStringValue(this, (kPool + pool)) | |
1274 | 1294 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1275 | - | let $ | |
1276 | - | let claimedAmount = $ | |
1277 | - | let claimedAsset = $ | |
1295 | + | let $t04266142762 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change) | |
1296 | + | let claimedAmount = $t04266142762._1 | |
1297 | + | let claimedAsset = $t04266142762._2 | |
1278 | 1298 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1279 | 1299 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1280 | 1300 | let changeEntry = if ((newChange >= 0)) | |
1289 | 1309 | func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), { | |
1290 | 1310 | let pType = getStringValue(this, (kPool + pool)) | |
1291 | 1311 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1292 | - | let $ | |
1293 | - | let claimedAmount = $ | |
1294 | - | let claimedAsset = $ | |
1312 | + | let $t04353743638 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change) | |
1313 | + | let claimedAmount = $t04353743638._1 | |
1314 | + | let claimedAsset = $t04353743638._2 | |
1295 | 1315 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1296 | 1316 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1297 | 1317 | let changeEntry = if ((newChange >= 0)) | |
1306 | 1326 | func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), { | |
1307 | 1327 | let pType = getStringValue(this, (kPool + pool)) | |
1308 | 1328 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1309 | - | let $ | |
1310 | - | let claimedAmount = $ | |
1311 | - | let claimedAsset = $ | |
1329 | + | let $t04448044581 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change) | |
1330 | + | let claimedAmount = $t04448044581._1 | |
1331 | + | let claimedAsset = $t04448044581._2 | |
1312 | 1332 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1313 | 1333 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1314 | 1334 | let changeEntry = if ((newChange >= 0)) | |
1325 | 1345 | else false) | |
1326 | 1346 | then throw("Wrong type") | |
1327 | 1347 | else { | |
1328 | - | let $ | |
1329 | - | let aId = $ | |
1330 | - | let bId = $ | |
1331 | - | let aBal = $ | |
1332 | - | let bBal = $ | |
1333 | - | let shareId = $ | |
1348 | + | let $t04531245406 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1349 | + | let aId = $t04531245406._1 | |
1350 | + | let bId = $t04531245406._2 | |
1351 | + | let aBal = $t04531245406._3 | |
1352 | + | let bBal = $t04531245406._4 | |
1353 | + | let shareId = $t04531245406._5 | |
1334 | 1354 | if ((0 > inFeeNoLoan)) | |
1335 | 1355 | then throw("inFeeNoLoan must be greater than 0") | |
1336 | 1356 | else if ((0 > inFeeLoan)) | |
1365 | 1385 | @Callable(i) | |
1366 | 1386 | func activateForUsers () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActiveUsers), true)) | |
1367 | 1387 | then throw("dApp already active for users") | |
1368 | - | else [BooleanEntry( | |
1388 | + | else [BooleanEntry(kActiveUsers, true)]) | |
1369 | 1389 | ||
1370 | 1390 | ||
1371 | 1391 | ||
1372 | 1392 | @Callable(i) | |
1373 | 1393 | func shutdownForUsers () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActiveUsers), true))) | |
1374 | 1394 | then throw("dApp already shutdown for users") | |
1375 | - | else [BooleanEntry( | |
1395 | + | else [BooleanEntry(kActiveUsers, false)]) | |
1376 | 1396 | ||
1377 | 1397 | ||
1378 | 1398 | ||
1379 | 1399 | @Callable(i) | |
1380 | 1400 | func activateSF () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true)) | |
1381 | 1401 | then throw("SWOPFI already active") | |
1382 | - | else [BooleanEntry( | |
1402 | + | else [BooleanEntry((SF_POOL + kActiveSFWX), true)]) | |
1383 | 1403 | ||
1384 | 1404 | ||
1385 | 1405 | ||
1386 | 1406 | @Callable(i) | |
1387 | 1407 | func shutdownSF () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true))) | |
1388 | 1408 | then throw("SWOPFI already shutdown") | |
1389 | - | else [BooleanEntry( | |
1409 | + | else [BooleanEntry((SF_POOL + kActiveSFWX), false)]) | |
1390 | 1410 | ||
1391 | 1411 | ||
1392 | 1412 | ||
1393 | 1413 | @Callable(i) | |
1394 | 1414 | func activateWX () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true)) | |
1395 | 1415 | then throw("WX already active") | |
1396 | - | else [BooleanEntry( | |
1416 | + | else [BooleanEntry((WX_POOL + kActiveSFWX), true)]) | |
1397 | 1417 | ||
1398 | 1418 | ||
1399 | 1419 | ||
1400 | 1420 | @Callable(i) | |
1401 | 1421 | func shutdownWX () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true))) | |
1402 | 1422 | then throw("WX already shutdown") | |
1403 | - | else [BooleanEntry( | |
1423 | + | else [BooleanEntry((WX_POOL + kActiveSFWX), false)]) | |
1404 | 1424 | ||
1405 | 1425 | ||
1406 | 1426 | ||
1409 | 1429 | then throw("Unknown pool") | |
1410 | 1430 | else if (valueOrElse(getBoolean(this, (pool + kPoolActive)), true)) | |
1411 | 1431 | then throw("Pool already active") | |
1412 | - | else [BooleanEntry( | |
1432 | + | else [BooleanEntry((pool + kPoolActive), true)]) | |
1413 | 1433 | ||
1414 | 1434 | ||
1415 | 1435 | ||
1418 | 1438 | then throw("Unknown pool") | |
1419 | 1439 | else if (!(valueOrElse(getBoolean(this, (pool + kPoolActive)), true))) | |
1420 | 1440 | then throw("Pool already shutdown") | |
1421 | - | else [BooleanEntry( | |
1441 | + | else [BooleanEntry((pool + kPoolActive), false)]) | |
1422 | 1442 | ||
1423 | 1443 | ||
1424 | 1444 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SF_POOL = "SF" | |
5 | 5 | ||
6 | 6 | let WX_POOL = "WX" | |
7 | 7 | ||
8 | 8 | let CAP_FEE_NO_LOAN = "capNoLoan" | |
9 | 9 | ||
10 | 10 | let CAP_FEE_LOAN = "capLoan" | |
11 | 11 | ||
12 | 12 | let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan" | |
13 | 13 | ||
14 | 14 | let STOPLOSS_LOAN = "stopLossLoan" | |
15 | 15 | ||
16 | 16 | let LOAN_FEE = "loan" | |
17 | 17 | ||
18 | 18 | let NO_LOAN_FEE = "noLoan" | |
19 | 19 | ||
20 | 20 | let NO_FEE = "noFee" | |
21 | 21 | ||
22 | 22 | let SCALE8 = 100000000 | |
23 | 23 | ||
24 | 24 | let SCALE10 = 10000000000 | |
25 | 25 | ||
26 | 26 | let SCALE16 = toBigInt(10000000000000000) | |
27 | 27 | ||
28 | 28 | let FEE_SCALE6 = 1000000 | |
29 | 29 | ||
30 | 30 | let kSFPoolAAssetBalance = "A_asset_balance" | |
31 | 31 | ||
32 | 32 | let kSFPoolBAssetBalance = "B_asset_balance" | |
33 | 33 | ||
34 | 34 | let kSFPoolAAssetId = "A_asset_id" | |
35 | 35 | ||
36 | 36 | let kSFPoolBAssetId = "B_asset_id" | |
37 | 37 | ||
38 | 38 | let kSFPoolShareId = "share_asset_id" | |
39 | 39 | ||
40 | 40 | let kSFPoolShareSupply = "share_asset_supply" | |
41 | 41 | ||
42 | 42 | let kSFPoolFee = "commission" | |
43 | 43 | ||
44 | 44 | let kUserPosition = "_userPosition" | |
45 | 45 | ||
46 | 46 | let kUserPositionPool = "_userPositionPool" | |
47 | 47 | ||
48 | 48 | let kUserBorrowAmount = "_userPositionBorrowAmount" | |
49 | 49 | ||
50 | 50 | let kUserBorrowAssetId = "_userPositionBorrowAssetId" | |
51 | 51 | ||
52 | 52 | let kUserPositionNum = "_userPositionNumber" | |
53 | 53 | ||
54 | 54 | let kUserPositionInterest = "_userPositionInterest" | |
55 | 55 | ||
56 | 56 | let kPoolTotal = "_poolTotal" | |
57 | 57 | ||
58 | 58 | let kPoolTotalLoan = "_poolTotalLoan" | |
59 | 59 | ||
60 | 60 | let kPoolInterestLoan = "_poolInterestLoan" | |
61 | 61 | ||
62 | 62 | let kPoolInterestNoLoan = "_poolInterestNoLoan" | |
63 | 63 | ||
64 | 64 | let kPoolCanBorrow = "_poolCanBorrow" | |
65 | 65 | ||
66 | 66 | let kAxlyInFeeWithoutLoan = "_axlyFeeNoLoan" | |
67 | 67 | ||
68 | 68 | let kAxlyInFeeWithLoan = "_axlyFeeWithLoan" | |
69 | 69 | ||
70 | 70 | let kAxlyNoLoanCapFee = "_axlyFeeCapWithLoan" | |
71 | 71 | ||
72 | 72 | let kAxlyWithLoanCapFee = "_axlyFeeCapNoLoan" | |
73 | 73 | ||
74 | 74 | let kAxlyStopLossNoLoanFee = "_axlyFeeStoplossWithLoan" | |
75 | 75 | ||
76 | 76 | let kAxlyStopLossLoanFee = "_axlyFeeStoplossNoLoan" | |
77 | 77 | ||
78 | 78 | let kRequestId = "_request_id" | |
79 | 79 | ||
80 | 80 | let kRequestIter = "requests_iter" | |
81 | 81 | ||
82 | 82 | let kPool = "pool_" | |
83 | 83 | ||
84 | 84 | let kSharePool = "_poolShareId" | |
85 | 85 | ||
86 | 86 | let kPoolCapChange = "_poolCapChange" | |
87 | 87 | ||
88 | 88 | let kTokenLastPrice = "last_price" | |
89 | 89 | ||
90 | 90 | let kPriceInOracle = "_twap5B" | |
91 | 91 | ||
92 | 92 | let kActive = "active" | |
93 | 93 | ||
94 | 94 | let kActiveUsers = "activeUsers" | |
95 | 95 | ||
96 | 96 | let kActiveSFWX = "_active" | |
97 | 97 | ||
98 | 98 | let kPoolActive = "_activePool" | |
99 | 99 | ||
100 | 100 | let kUserStopLoss = "_stopLoss" | |
101 | 101 | ||
102 | 102 | let kMoneyBox = "axly_money_box" | |
103 | 103 | ||
104 | 104 | let kSFFarmingAddr = "swopfi_farming_addr" | |
105 | 105 | ||
106 | 106 | let kLendService = "lend_service_addr" | |
107 | 107 | ||
108 | 108 | let kAdminCallPK = "admin_call_pub_key" | |
109 | 109 | ||
110 | 110 | let kPriceOracle = "price_oracle" | |
111 | 111 | ||
112 | 112 | let kExContract = "exchange_contract" | |
113 | 113 | ||
114 | 114 | let kWxSwapContract = "wx_swap_contract" | |
115 | 115 | ||
116 | 116 | let kSwopId = "swop_id" | |
117 | 117 | ||
118 | 118 | let kWxId = "wx_id" | |
119 | 119 | ||
120 | 120 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
121 | 121 | ||
122 | 122 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
123 | 123 | ||
124 | 124 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
125 | 125 | ||
126 | 126 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
127 | 127 | ||
128 | 128 | let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id")) | |
129 | 129 | ||
130 | 130 | let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id")) | |
131 | 131 | ||
132 | 132 | func unknownPoolType () = throw("Wrong pool type") | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr"))) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func isAdminCall (i) = if ((i.caller == getAdminCallAddr())) | |
142 | 142 | then unit | |
143 | 143 | else throw("Only admin can call this function") | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func isSelfCall (i) = if ((i.caller == this)) | |
147 | 147 | then unit | |
148 | 148 | else throw("Only contract itself can call this function") | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func isLandCall (i) = if ((i.caller == getLendSrvAddr())) | |
152 | 152 | then unit | |
153 | 153 | else throw("Only land contract can call this function") | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func isActive () = if ((valueOrElse(getBoolean(this, kActive), true) == true)) | |
157 | 157 | then unit | |
158 | 158 | else throw("DApp is inactive at this moment") | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func isActiveForUsers () = if (if (valueOrElse(getBoolean(this, kActive), true)) | |
162 | 162 | then (valueOrElse(getBoolean(this, kActiveUsers), true) == true) | |
163 | 163 | else false) | |
164 | 164 | then unit | |
165 | 165 | else throw("DApp is inactive for users at this moment") | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func isPoolActive (pool,type) = { | |
169 | 169 | let WXSFActive = valueOrElse(getBoolean(this, (type + kActiveSFWX)), true) | |
170 | 170 | let poolActive = valueOrElse(getBoolean(this, (pool + kPoolActive)), true) | |
171 | 171 | if (if (WXSFActive) | |
172 | 172 | then poolActive | |
173 | 173 | else false) | |
174 | 174 | then true | |
175 | 175 | else false | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func accountBalance (assetId) = match assetId { | |
180 | 180 | case id: ByteVector => | |
181 | 181 | assetBalance(this, id) | |
182 | 182 | case waves: Unit => | |
183 | 183 | wavesBalance(this).available | |
184 | 184 | case _ => | |
185 | 185 | throw("Match error") | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getSFPoolBalances (poolAddr) = $Tuple2(valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance")) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func getWXPoolBalances (poolAddr,aId,bId) = $Tuple2({ | |
193 | 193 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
194 | 194 | if ($isInstanceOf(@, "Int")) | |
195 | 195 | then @ | |
196 | 196 | else throw(($getType(@) + " couldn't be cast to Int")) | |
197 | 197 | }, { | |
198 | 198 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
199 | 199 | if ($isInstanceOf(@, "Int")) | |
200 | 200 | then @ | |
201 | 201 | else throw(($getType(@) + " couldn't be cast to Int")) | |
202 | 202 | }) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func getPoolBalances (poolAddr,type,aId,bId) = if ((type == SF_POOL)) | |
206 | 206 | then getSFPoolBalances(poolAddr) | |
207 | 207 | else if ((type == WX_POOL)) | |
208 | 208 | then getWXPoolBalances(poolAddr, aId, bId) | |
209 | 209 | else unknownPoolType() | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func getSFPoolData (poolAddr) = { | |
213 | 213 | let $t070647113 = getSFPoolBalances(poolAddr) | |
214 | 214 | if (($t070647113 == $t070647113)) | |
215 | 215 | then { | |
216 | 216 | let balB = $t070647113._2 | |
217 | 217 | let balA = $t070647113._1 | |
218 | 218 | $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), balA, balB, valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id")) | |
219 | 219 | } | |
220 | 220 | else throw("Strict value is not equal to itself.") | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func getWXPoolData (poolAddr) = { | |
225 | 225 | let cfg = { | |
226 | 226 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
227 | 227 | if ($isInstanceOf(@, "List[Any]")) | |
228 | 228 | then @ | |
229 | 229 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
230 | 230 | } | |
231 | 231 | if ((cfg == cfg)) | |
232 | 232 | then { | |
233 | 233 | let aId = valueOrErrorMessage({ | |
234 | 234 | let @ = cfg[4] | |
235 | 235 | if ($isInstanceOf(@, "String")) | |
236 | 236 | then @ | |
237 | 237 | else unit | |
238 | 238 | }, "Can't get pool A asset id") | |
239 | 239 | let bId = valueOrErrorMessage({ | |
240 | 240 | let @ = cfg[5] | |
241 | 241 | if ($isInstanceOf(@, "String")) | |
242 | 242 | then @ | |
243 | 243 | else unit | |
244 | 244 | }, "Can't get pool B asset id") | |
245 | 245 | let shareId = valueOrErrorMessage({ | |
246 | 246 | let @ = cfg[3] | |
247 | 247 | if ($isInstanceOf(@, "String")) | |
248 | 248 | then @ | |
249 | 249 | else unit | |
250 | 250 | }, "Can't get pool LP asset id") | |
251 | 251 | let $t078107869 = getWXPoolBalances(poolAddr, aId, bId) | |
252 | 252 | if (($t078107869 == $t078107869)) | |
253 | 253 | then { | |
254 | 254 | let balB = $t078107869._2 | |
255 | 255 | let balA = $t078107869._1 | |
256 | 256 | $Tuple5(aId, bId, balA, balB, shareId) | |
257 | 257 | } | |
258 | 258 | else throw("Strict value is not equal to itself.") | |
259 | 259 | } | |
260 | 260 | else throw("Strict value is not equal to itself.") | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
265 | 265 | then getSFPoolData(poolAddr) | |
266 | 266 | else if ((type == WX_POOL)) | |
267 | 267 | then getWXPoolData(poolAddr) | |
268 | 268 | else unknownPoolType() | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
272 | 272 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
273 | 273 | else if ((type == WX_POOL)) | |
274 | 274 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
275 | 275 | else unknownPoolType() | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
285 | 285 | ||
286 | 286 | ||
287 | 287 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
288 | 288 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
289 | 289 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
290 | 290 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
291 | 291 | else if ((feeType == LOAN_FEE)) | |
292 | 292 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
293 | 293 | else if ((feeType == NO_LOAN_FEE)) | |
294 | 294 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
295 | 295 | else if ((feeType == NO_FEE)) | |
296 | 296 | then 0 | |
297 | 297 | else throw("Wrong fee type") | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func getWXFarmingAddr (poolAddr) = { | |
304 | 304 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
305 | 305 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
306 | 306 | Address(fromBase58String(factroyCfg[1])) | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | func assetIdToStr (assetId) = match assetId { | |
311 | 311 | case id: ByteVector => | |
312 | 312 | toBase58String(id) | |
313 | 313 | case waves: Unit => | |
314 | 314 | "WAVES" | |
315 | 315 | case _ => | |
316 | 316 | throw("Not Asset id") | |
317 | 317 | } | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
321 | 321 | then unit | |
322 | 322 | else fromBase58String(assetId) | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
326 | 326 | then 8 | |
327 | 327 | else match assetInfo(fromBase58String(assetId)) { | |
328 | 328 | case asset: Asset => | |
329 | 329 | asset.decimals | |
330 | 330 | case _ => | |
331 | 331 | throw("Can't find asset") | |
332 | 332 | } | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
336 | 336 | ||
337 | 337 | ||
338 | 338 | func getAssetsPrice (assetIds) = { | |
339 | 339 | func getPrices (a,assetId) = { | |
340 | 340 | let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
341 | 341 | (a :+ assetPrice) | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | let $l = assetIds | |
345 | 345 | let $s = size($l) | |
346 | 346 | let $acc0 = nil | |
347 | 347 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
348 | 348 | then $a | |
349 | 349 | else getPrices($a, $l[$i]) | |
350 | 350 | ||
351 | 351 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
352 | 352 | then $a | |
353 | 353 | else throw("List size exceeds 50") | |
354 | 354 | ||
355 | 355 | $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($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) | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func getSharePrice (shareId) = { | |
360 | 360 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
361 | 361 | let poolAddr = Address(fromBase58String(pool)) | |
362 | 362 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
363 | 363 | let $t01084710912 = getPoolData(poolAddr, pType) | |
364 | 364 | let aId = $t01084710912._1 | |
365 | 365 | let bId = $t01084710912._2 | |
366 | 366 | let aBalance = $t01084710912._3 | |
367 | 367 | let bBalance = $t01084710912._4 | |
368 | 368 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
369 | 369 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
370 | 370 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
371 | 371 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
372 | 372 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
373 | 373 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
374 | 374 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
375 | 375 | fraction(sum, sharePrecision, shareSupply) | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | 379 | func getSharePrices (shareIds) = { | |
380 | 380 | func getPrices (a,shareId) = (a :+ getSharePrice(shareId)) | |
381 | 381 | ||
382 | 382 | let $l = shareIds | |
383 | 383 | let $s = size($l) | |
384 | 384 | let $acc0 = nil | |
385 | 385 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
386 | 386 | then $a | |
387 | 387 | else getPrices($a, $l[$i]) | |
388 | 388 | ||
389 | 389 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
390 | 390 | then $a | |
391 | 391 | else throw("List size exceeds 20") | |
392 | 392 | ||
393 | 393 | $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) | |
394 | 394 | } | |
395 | 395 | ||
396 | 396 | ||
397 | 397 | func getCursEntries (aId,bId,shareId,wAmounts) = { | |
398 | 398 | let assetsPrices = getAssetsPrice([aId, bId]) | |
399 | 399 | let sharePrice = getSharePrice(shareId) | |
400 | 400 | let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts) | |
401 | 401 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
402 | 402 | } | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL)) | |
406 | 406 | then { | |
407 | 407 | let repl = { | |
408 | 408 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil) | |
409 | 409 | if ($isInstanceOf(@, "List[Any]")) | |
410 | 410 | then @ | |
411 | 411 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
412 | 412 | } | |
413 | 413 | if ((repl == repl)) | |
414 | 414 | then $Tuple5({ | |
415 | 415 | let @ = repl[3] | |
416 | 416 | if ($isInstanceOf(@, "Int")) | |
417 | 417 | then @ | |
418 | 418 | else throw(($getType(@) + " couldn't be cast to Int")) | |
419 | 419 | }, { | |
420 | 420 | let @ = repl[4] | |
421 | 421 | if ($isInstanceOf(@, "Int")) | |
422 | 422 | then @ | |
423 | 423 | else throw(($getType(@) + " couldn't be cast to Int")) | |
424 | 424 | }, { | |
425 | 425 | let @ = repl[1] | |
426 | 426 | if ($isInstanceOf(@, "Int")) | |
427 | 427 | then @ | |
428 | 428 | else throw(($getType(@) + " couldn't be cast to Int")) | |
429 | 429 | }, assetIdToStr(repl[2]), { | |
430 | 430 | let @ = repl[0] | |
431 | 431 | if ($isInstanceOf(@, "Int")) | |
432 | 432 | then @ | |
433 | 433 | else throw(($getType(@) + " couldn't be cast to Int")) | |
434 | 434 | }) | |
435 | 435 | else throw("Strict value is not equal to itself.") | |
436 | 436 | } | |
437 | 437 | else if ((pType == WX_POOL)) | |
438 | 438 | then { | |
439 | 439 | let $t01245712707 = $Tuple2(split({ | |
440 | 440 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
441 | 441 | if ($isInstanceOf(@, "String")) | |
442 | 442 | then @ | |
443 | 443 | else throw(($getType(@) + " couldn't be cast to String")) | |
444 | 444 | }, "__"), split({ | |
445 | 445 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
446 | 446 | if ($isInstanceOf(@, "String")) | |
447 | 447 | then @ | |
448 | 448 | else throw(($getType(@) + " couldn't be cast to String")) | |
449 | 449 | }, "__")) | |
450 | 450 | if (($t01245712707 == $t01245712707)) | |
451 | 451 | then { | |
452 | 452 | let evalPutInB = $t01245712707._2 | |
453 | 453 | let evalPutInA = $t01245712707._1 | |
454 | 454 | let lpInA = parseIntValue(evalPutInA[1]) | |
455 | 455 | let lpInB = parseIntValue(evalPutInB[1]) | |
456 | 456 | if ((lpInB > lpInA)) | |
457 | 457 | then { | |
458 | 458 | let pmt = parseIntValue(evalPutInA[8]) | |
459 | 459 | $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB) | |
460 | 460 | } | |
461 | 461 | else { | |
462 | 462 | let pmt = parseIntValue(evalPutInB[7]) | |
463 | 463 | $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA) | |
464 | 464 | } | |
465 | 465 | } | |
466 | 466 | else throw("Strict value is not equal to itself.") | |
467 | 467 | } | |
468 | 468 | else unknownPoolType() | |
469 | 469 | ||
470 | 470 | ||
471 | 471 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
472 | 472 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
473 | 473 | if ((pType == SF_POOL)) | |
474 | 474 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
475 | 475 | else if ((pType == WX_POOL)) | |
476 | 476 | then invoke(poolAddr, "put", [1000000, false], payments) | |
477 | 477 | else unknownPoolType() | |
478 | 478 | } | |
479 | 479 | ||
480 | 480 | ||
481 | 481 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
482 | 482 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
483 | 483 | if ((pType == SF_POOL)) | |
484 | 484 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
485 | 485 | else if ((pType == WX_POOL)) | |
486 | 486 | then invoke(poolAddr, "putOneTkn", [0, false], payments) | |
487 | 487 | else unknownPoolType() | |
488 | 488 | } | |
489 | 489 | ||
490 | 490 | ||
491 | 491 | func stakeLP (pool,pType,shareId,amount) = { | |
492 | 492 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
493 | 493 | if ((pType == SF_POOL)) | |
494 | 494 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
495 | 495 | else if ((pType == WX_POOL)) | |
496 | 496 | then invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
497 | 497 | else unknownPoolType() | |
498 | 498 | } | |
499 | 499 | ||
500 | 500 | ||
501 | 501 | func unstakeLP (pool,pType,shareId,amount) = { | |
502 | 502 | let $t01436614716 = if ((pType == SF_POOL)) | |
503 | 503 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
504 | 504 | else if ((pType == WX_POOL)) | |
505 | 505 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
506 | 506 | else unknownPoolType() | |
507 | 507 | let farmAddr = $t01436614716._1 | |
508 | 508 | let fName = $t01436614716._2 | |
509 | 509 | let params = $t01436614716._3 | |
510 | 510 | let inv = invoke(farmAddr, fName, params, nil) | |
511 | 511 | if ((inv == inv)) | |
512 | 512 | then amount | |
513 | 513 | else throw("Strict value is not equal to itself.") | |
514 | 514 | } | |
515 | 515 | ||
516 | 516 | ||
517 | 517 | func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
518 | 518 | let poolAddr = Address(fromBase58String(pool)) | |
519 | 519 | let feeScale6 = 1000000 | |
520 | 520 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
521 | 521 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
522 | 522 | let $t01513815444 = if ((assetTokenToGet == assetIdA)) | |
523 | 523 | then { | |
524 | 524 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
525 | 525 | $Tuple2(amountToPay, assetIdB) | |
526 | 526 | } | |
527 | 527 | else { | |
528 | 528 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
529 | 529 | $Tuple2(amountToPay, assetIdA) | |
530 | 530 | } | |
531 | 531 | let amountToPay = $t01513815444._1 | |
532 | 532 | let assetToPay = $t01513815444._2 | |
533 | 533 | $Tuple2(assetToPay, amountToPay) | |
534 | 534 | } | |
535 | 535 | ||
536 | 536 | ||
537 | 537 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
538 | 538 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
539 | 539 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
540 | 540 | let feeScale = toBigInt(100000000) | |
541 | 541 | let $t01578316091 = if ((assetTokenToGet == assetIdA)) | |
542 | 542 | then { | |
543 | 543 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
544 | 544 | $Tuple2(amountToPay, assetIdB) | |
545 | 545 | } | |
546 | 546 | else { | |
547 | 547 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
548 | 548 | $Tuple2(amountToPay, assetIdA) | |
549 | 549 | } | |
550 | 550 | let amountToPay = $t01578316091._1 | |
551 | 551 | let assetToPay = $t01578316091._2 | |
552 | 552 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
553 | 553 | $Tuple2(assetToPay, amountToPayWithFee) | |
554 | 554 | } | |
555 | 555 | ||
556 | 556 | ||
557 | 557 | func exchangeDirectly (pType,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((pType == SF_POOL)) | |
558 | 558 | then { | |
559 | 559 | let $t01643816560 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
560 | 560 | let assetToPay = $t01643816560._1 | |
561 | 561 | let amountToPay = $t01643816560._2 | |
562 | 562 | invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
563 | 563 | } | |
564 | 564 | else if ((pType == WX_POOL)) | |
565 | 565 | then { | |
566 | 566 | let $t01676016882 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
567 | 567 | let assetToPay = $t01676016882._1 | |
568 | 568 | let amountToPay = $t01676016882._2 | |
569 | 569 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
570 | 570 | } | |
571 | 571 | else unknownPoolType() | |
572 | 572 | ||
573 | 573 | ||
574 | 574 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
575 | - | let $ | |
575 | + | let $t01716917633 = if ((pType == SF_POOL)) | |
576 | 576 | then { | |
577 | 577 | let inv = { | |
578 | 578 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
579 | - | if ($isInstanceOf(@, " | |
579 | + | if ($isInstanceOf(@, "List[Any]")) | |
580 | 580 | then @ | |
581 | - | else throw(($getType(@) + " couldn't be cast to | |
581 | + | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
582 | 582 | } | |
583 | 583 | if ((inv == inv)) | |
584 | - | then $Tuple2(inv._1, inv._2) | |
584 | + | then $Tuple2({ | |
585 | + | let @ = inv[0] | |
586 | + | if ($isInstanceOf(@, "Int")) | |
587 | + | then @ | |
588 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
589 | + | }, { | |
590 | + | let @ = inv[1] | |
591 | + | if ($isInstanceOf(@, "Int")) | |
592 | + | then @ | |
593 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
594 | + | }) | |
585 | 595 | else throw("Strict value is not equal to itself.") | |
586 | 596 | } | |
587 | 597 | else if ((pType == WX_POOL)) | |
588 | 598 | then { | |
589 | 599 | let inv = split({ | |
590 | 600 | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil) | |
591 | 601 | if ($isInstanceOf(@, "String")) | |
592 | 602 | then @ | |
593 | 603 | else throw(($getType(@) + " couldn't be cast to String")) | |
594 | 604 | }, "__") | |
595 | 605 | if ((inv == inv)) | |
596 | 606 | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
597 | 607 | else throw("Strict value is not equal to itself.") | |
598 | 608 | } | |
599 | 609 | else unknownPoolType() | |
600 | - | let amountA = $ | |
601 | - | let amountB = $ | |
610 | + | let amountA = $t01716917633._1 | |
611 | + | let amountB = $t01716917633._2 | |
602 | 612 | $Tuple2(amountA, amountB) | |
603 | 613 | } | |
604 | 614 | ||
605 | 615 | ||
606 | 616 | func claimFarmed (pType,pool) = if ((pType == SF_POOL)) | |
607 | 617 | then { | |
608 | 618 | let balBefore = accountBalance(SWOPID) | |
609 | 619 | if ((balBefore == balBefore)) | |
610 | 620 | then { | |
611 | 621 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
612 | 622 | if ((inv == inv)) | |
613 | 623 | then { | |
614 | 624 | let balAfter = accountBalance(SWOPID) | |
615 | 625 | $Tuple2((balAfter - balBefore), SWOPID) | |
616 | 626 | } | |
617 | 627 | else throw("Strict value is not equal to itself.") | |
618 | 628 | } | |
619 | 629 | else throw("Strict value is not equal to itself.") | |
620 | 630 | } | |
621 | 631 | else if ((pType == WX_POOL)) | |
622 | 632 | then { | |
623 | 633 | let balBefore = accountBalance(WXID) | |
624 | 634 | if ((balBefore == balBefore)) | |
625 | 635 | then { | |
626 | 636 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
627 | 637 | if ((inv == inv)) | |
628 | 638 | then { | |
629 | 639 | let balAfter = accountBalance(WXID) | |
630 | 640 | $Tuple2((balAfter - balBefore), WXID) | |
631 | 641 | } | |
632 | 642 | else throw("Strict value is not equal to itself.") | |
633 | 643 | } | |
634 | 644 | else throw("Strict value is not equal to itself.") | |
635 | 645 | } | |
636 | 646 | else unknownPoolType() | |
637 | 647 | ||
638 | 648 | ||
639 | 649 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
640 | 650 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
641 | 651 | if ((lpBalanceBefore == lpBalanceBefore)) | |
642 | 652 | then { | |
643 | 653 | let poolAddr = addressFromStringValue(pool) | |
644 | - | let $ | |
654 | + | let $t01859819014 = if (if ((pmtA > 0)) | |
645 | 655 | then (pmtB > 0) | |
646 | 656 | else false) | |
647 | 657 | then { | |
648 | - | let $ | |
649 | - | let pmtInA = $ | |
650 | - | let pmtInB = $ | |
651 | - | let change = $ | |
652 | - | let changeId = $ | |
658 | + | let $t01866418780 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
659 | + | let pmtInA = $t01866418780._1 | |
660 | + | let pmtInB = $t01866418780._2 | |
661 | + | let change = $t01866418780._3 | |
662 | + | let changeId = $t01866418780._4 | |
653 | 663 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
654 | 664 | if ((inv == inv)) | |
655 | 665 | then $Tuple2(change, changeId) | |
656 | 666 | else throw("Strict value is not equal to itself.") | |
657 | 667 | } | |
658 | 668 | else if ((pmtA > 0)) | |
659 | 669 | then $Tuple2(pmtA, aId) | |
660 | 670 | else if ((pmtB > 0)) | |
661 | 671 | then $Tuple2(pmtB, bId) | |
662 | 672 | else throw("pmts must be > 0") | |
663 | - | let change = $ | |
664 | - | let changeId = $ | |
673 | + | let change = $t01859819014._1 | |
674 | + | let changeId = $t01859819014._2 | |
665 | 675 | let inv = if ((change > 0)) | |
666 | 676 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
667 | 677 | else nil | |
668 | 678 | if ((inv == inv)) | |
669 | 679 | then { | |
670 | 680 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
671 | 681 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
672 | 682 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
673 | 683 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
674 | 684 | if ((0 >= userShareForStake)) | |
675 | 685 | then throw("amount of staked sharetokens must be > 0") | |
676 | 686 | else { | |
677 | 687 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
678 | 688 | if ((invLP == invLP)) | |
679 | 689 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
680 | 690 | else throw("Strict value is not equal to itself.") | |
681 | 691 | } | |
682 | 692 | } | |
683 | 693 | else throw("Strict value is not equal to itself.") | |
684 | 694 | } | |
685 | 695 | else throw("Strict value is not equal to itself.") | |
686 | 696 | } | |
687 | 697 | ||
688 | 698 | ||
689 | 699 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
690 | 700 | let totalAmount = getPoolTotalShare(pool) | |
691 | 701 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
692 | - | let $ | |
702 | + | let $t01987220110 = if (withLoan) | |
693 | 703 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
694 | 704 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
695 | - | let curPoolInterest = $ | |
696 | - | let totalStakedWithLoan = $ | |
705 | + | let curPoolInterest = $t01987220110._1 | |
706 | + | let totalStakedWithLoan = $t01987220110._2 | |
697 | 707 | [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))] | |
698 | 708 | } | |
699 | 709 | ||
700 | 710 | ||
701 | 711 | func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
702 | 712 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
703 | 713 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
704 | 714 | then { | |
705 | 715 | let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
706 | 716 | if ((inv == inv)) | |
707 | 717 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
708 | 718 | else throw("Strict value is not equal to itself.") | |
709 | 719 | } | |
710 | 720 | else throw("Strict value is not equal to itself.") | |
711 | 721 | } | |
712 | 722 | ||
713 | 723 | ||
714 | 724 | func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = { | |
715 | 725 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
716 | 726 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
717 | 727 | then { | |
718 | 728 | let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
719 | 729 | if ((inv == inv)) | |
720 | 730 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
721 | 731 | else throw("Strict value is not equal to itself.") | |
722 | 732 | } | |
723 | 733 | else throw("Strict value is not equal to itself.") | |
724 | 734 | } | |
725 | 735 | ||
726 | 736 | ||
727 | 737 | func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
728 | 738 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
729 | 739 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
730 | 740 | then { | |
731 | 741 | let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
732 | 742 | if ((inv == inv)) | |
733 | 743 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
734 | 744 | else throw("Strict value is not equal to itself.") | |
735 | 745 | } | |
736 | 746 | else throw("Strict value is not equal to itself.") | |
737 | 747 | } | |
738 | 748 | ||
739 | 749 | ||
740 | 750 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
741 | 751 | let poolAddr = Address(fromBase58String(pool)) | |
742 | - | let $ | |
743 | - | let AId = $ | |
744 | - | let BId = $ | |
745 | - | let balA = $ | |
746 | - | let balB = $ | |
747 | - | let shareId = $ | |
752 | + | let $t02246122527 = getPoolData(poolAddr, pType) | |
753 | + | let AId = $t02246122527._1 | |
754 | + | let BId = $t02246122527._2 | |
755 | + | let balA = $t02246122527._3 | |
756 | + | let balB = $t02246122527._4 | |
757 | + | let shareId = $t02246122527._5 | |
748 | 758 | if (if ((tokenId != AId)) | |
749 | 759 | then (tokenId != BId) | |
750 | 760 | else false) | |
751 | 761 | then throw("Wrong asset") | |
752 | 762 | else { | |
753 | - | let $ | |
763 | + | let $t02261222692 = if ((tokenId == AId)) | |
754 | 764 | then $Tuple2(tokenAmount, 0) | |
755 | 765 | else $Tuple2(0, tokenAmount) | |
756 | - | let pmtA = $ | |
757 | - | let pmtB = $ | |
758 | - | let $ | |
759 | - | let stakedAmount = $ | |
760 | - | let nf = $ | |
766 | + | let pmtA = $t02261222692._1 | |
767 | + | let pmtB = $t02261222692._2 | |
768 | + | let $t02269522799 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
769 | + | let stakedAmount = $t02269522799._1 | |
770 | + | let nf = $t02269522799._2 | |
761 | 771 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
762 | 772 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
763 | 773 | let totalShareAmount = getPoolTotalShare(pool) | |
764 | 774 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
765 | 775 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
766 | 776 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
767 | 777 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
768 | 778 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
769 | 779 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
770 | 780 | else 0 | |
771 | 781 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
772 | 782 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
773 | 783 | else 0 | |
774 | 784 | let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
775 | 785 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
776 | 786 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
777 | 787 | if ((axlyFee == axlyFee)) | |
778 | 788 | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId, nil)) | |
779 | 789 | else throw("Strict value is not equal to itself.") | |
780 | 790 | } | |
781 | 791 | } | |
782 | 792 | ||
783 | 793 | ||
784 | 794 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset,stopLossFee) = { | |
785 | 795 | let poolAddr = Address(fromBase58String(pool)) | |
786 | 796 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
787 | - | let $ | |
788 | - | let assetIdA = $ | |
789 | - | let assetIdB = $ | |
790 | - | let balA = $ | |
791 | - | let balB = $ | |
792 | - | let shareId = $ | |
797 | + | let $t02458924665 = getPoolData(poolAddr, pType) | |
798 | + | let assetIdA = $t02458924665._1 | |
799 | + | let assetIdB = $t02458924665._2 | |
800 | + | let balA = $t02458924665._3 | |
801 | + | let balB = $t02458924665._4 | |
802 | + | let shareId = $t02458924665._5 | |
793 | 803 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
794 | 804 | if ((cBalABefore == cBalABefore)) | |
795 | 805 | then { | |
796 | 806 | let cBalBBefore = accountBalance(assetIdFromStr(assetIdB)) | |
797 | 807 | if ((cBalBBefore == cBalBBefore)) | |
798 | 808 | then { | |
799 | 809 | let inv = if ((pType == SF_POOL)) | |
800 | 810 | then { | |
801 | 811 | let inv = unstakeLP(pool, pType, shareId, stopLossFee) | |
802 | 812 | if ((inv == inv)) | |
803 | 813 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
804 | 814 | else throw("Strict value is not equal to itself.") | |
805 | 815 | } | |
806 | 816 | else if ((pType == WX_POOL)) | |
807 | 817 | then { | |
808 | 818 | let inv = unstakeLP(pool, pType, shareId, (userCanWithdraw + stopLossFee)) | |
809 | 819 | if ((inv == inv)) | |
810 | 820 | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
811 | 821 | else throw("Strict value is not equal to itself.") | |
812 | 822 | } | |
813 | 823 | else unknownPoolType() | |
814 | 824 | if ((inv == inv)) | |
815 | 825 | then { | |
816 | 826 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
817 | 827 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
818 | - | let $ | |
819 | - | let tokensAmountA = $ | |
820 | - | let tokensAmountB = $ | |
821 | - | let $ | |
828 | + | let $t02535825447 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
829 | + | let tokensAmountA = $t02535825447._1 | |
830 | + | let tokensAmountB = $t02535825447._2 | |
831 | + | let $t02545026304 = if ((debt > 0)) | |
822 | 832 | then { | |
823 | 833 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
824 | 834 | then (debt > tokensAmountA) | |
825 | 835 | else false) | |
826 | 836 | then (debt - tokensAmountA) | |
827 | 837 | else if (if ((borrowAsset == assetIdB)) | |
828 | 838 | then (debt > tokensAmountB) | |
829 | 839 | else false) | |
830 | 840 | then (debt - tokensAmountB) | |
831 | 841 | else 0 | |
832 | 842 | let exInv = if ((amountToGetEx > 0)) | |
833 | 843 | then exchangeDirectly(pType, pool, assetIdA, assetIdB, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset) | |
834 | 844 | else nil | |
835 | 845 | if ((exInv == exInv)) | |
836 | 846 | then { | |
837 | 847 | let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA)) | |
838 | 848 | let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB)) | |
839 | 849 | if ((borrowAsset == assetIdA)) | |
840 | 850 | then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore)) | |
841 | 851 | else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt)) | |
842 | 852 | } | |
843 | 853 | else throw("Strict value is not equal to itself.") | |
844 | 854 | } | |
845 | 855 | else $Tuple2(tokensAmountA, tokensAmountB) | |
846 | - | let toUserA = $ | |
847 | - | let toUserB = $ | |
856 | + | let toUserA = $t02545026304._1 | |
857 | + | let toUserB = $t02545026304._2 | |
848 | 858 | $Tuple5(toUserA, assetIdA, toUserB, assetIdB, shareId) | |
849 | 859 | } | |
850 | 860 | else throw("Strict value is not equal to itself.") | |
851 | 861 | } | |
852 | 862 | else throw("Strict value is not equal to itself.") | |
853 | 863 | } | |
854 | 864 | else throw("Strict value is not equal to itself.") | |
855 | 865 | } | |
856 | 866 | ||
857 | 867 | ||
858 | 868 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
859 | 869 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
860 | 870 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
861 | 871 | let poolInterest = if (borrowed) | |
862 | 872 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
863 | 873 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
864 | 874 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
865 | 875 | } | |
866 | 876 | ||
867 | 877 | ||
868 | 878 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
869 | 879 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
870 | 880 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) | |
871 | 881 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
872 | 882 | let poolTotalShare = getPoolTotalShare(pool) | |
873 | 883 | let userAddr = Address(fromBase58String(user)) | |
874 | 884 | let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "") | |
875 | - | let $ | |
885 | + | let $t02750227736 = if ((borrowAmount > 0)) | |
876 | 886 | then $Tuple2({ | |
877 | 887 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil) | |
878 | 888 | if ($isInstanceOf(@, "Int")) | |
879 | 889 | then @ | |
880 | 890 | else throw(($getType(@) + " couldn't be cast to Int")) | |
881 | 891 | }, STOPLOSS_LOAN) | |
882 | 892 | else $Tuple2(0, STOPLOSS_FEE_NO_LOAN) | |
883 | - | let debt = $ | |
884 | - | let feeType = $ | |
893 | + | let debt = $t02750227736._1 | |
894 | + | let feeType = $t02750227736._2 | |
885 | 895 | let stopLossFee = if (stopLoss) | |
886 | 896 | then fraction(userCanWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6) | |
887 | 897 | else 0 | |
888 | - | let $ | |
889 | - | if (($ | |
898 | + | let $t02785328009 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee) | |
899 | + | if (($t02785328009 == $t02785328009)) | |
890 | 900 | then { | |
891 | - | let shareId = $ | |
892 | - | let assetIdB = $ | |
893 | - | let toUserAmountB = $ | |
894 | - | let assetIdA = $ | |
895 | - | let toUserAmountA = $ | |
901 | + | let shareId = $t02785328009._5 | |
902 | + | let assetIdB = $t02785328009._4 | |
903 | + | let toUserAmountB = $t02785328009._3 | |
904 | + | let assetIdA = $t02785328009._2 | |
905 | + | let toUserAmountA = $t02785328009._1 | |
896 | 906 | let closeDbtInv = if ((debt > 0)) | |
897 | 907 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
898 | 908 | else 0 | |
899 | 909 | if ((closeDbtInv == closeDbtInv)) | |
900 | - | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil)) | |
910 | + | then { | |
911 | + | let entries = ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil)) | |
912 | + | $Tuple2(entries, [toUserAmountA, toUserAmountB]) | |
913 | + | } | |
901 | 914 | else throw("Strict value is not equal to itself.") | |
902 | 915 | } | |
903 | 916 | else throw("Strict value is not equal to itself.") | |
904 | 917 | } | |
905 | 918 | ||
906 | 919 | ||
907 | 920 | func parseRequest (requestId) = { | |
908 | 921 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
909 | 922 | let user = request[0] | |
910 | 923 | let pool = request[1] | |
911 | 924 | let pmtA = parseIntValue(request[2]) | |
912 | 925 | let AId = request[3] | |
913 | 926 | let pmtB = parseIntValue(request[4]) | |
914 | 927 | let BId = request[5] | |
915 | 928 | let balA = parseIntValue(request[6]) | |
916 | 929 | let balB = parseIntValue(request[7]) | |
917 | 930 | let shareId = request[8] | |
918 | 931 | let bwAsset = request[9] | |
919 | 932 | let bwAmount = parseIntValue(request[10]) | |
920 | 933 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
921 | 934 | } | |
922 | 935 | ||
923 | 936 | ||
924 | 937 | func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = if (if ((borrowId != aId)) | |
925 | 938 | then (borrowId != bId) | |
926 | 939 | else false) | |
927 | 940 | then throw("Wrong borrow asset") | |
928 | 941 | else { | |
929 | 942 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
930 | 943 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
931 | 944 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
932 | 945 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
933 | 946 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
934 | - | let $ | |
947 | + | let $t03007230169 = if ((borrowId == aId)) | |
935 | 948 | then $Tuple2(dPriceA, decPrA) | |
936 | 949 | else $Tuple2(dPriceB, decPrB) | |
937 | - | let borrowPrice = $ | |
938 | - | let borrowDecPr = $ | |
950 | + | let borrowPrice = $t03007230169._1 | |
951 | + | let borrowDecPr = $t03007230169._2 | |
939 | 952 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
940 | 953 | } | |
941 | 954 | ||
942 | 955 | ||
943 | 956 | func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2)) | |
944 | 957 | then if ((assetIdToStr(pmts[0].assetId) != AId)) | |
945 | 958 | then throw("Wrong payment asset A") | |
946 | 959 | else if ((assetIdToStr(pmts[1].assetId) != BId)) | |
947 | 960 | then throw("Wrong payment asset B") | |
948 | 961 | else $Tuple2(pmts[0].amount, pmts[1].amount) | |
949 | 962 | else if ((size(pmts) == 1)) | |
950 | 963 | then if ((assetIdToStr(pmts[0].assetId) == AId)) | |
951 | 964 | then $Tuple2(pmts[0].amount, 0) | |
952 | 965 | else if ((assetIdToStr(pmts[0].assetId) == BId)) | |
953 | 966 | then $Tuple2(0, pmts[0].amount) | |
954 | 967 | else throw("Wrong payment") | |
955 | 968 | else throw("One or two payments expected") | |
956 | 969 | ||
957 | 970 | ||
958 | 971 | func calcPriceImpact (balA,balB,newBalA,newBalB) = { | |
959 | 972 | let pri = ((SCALE8 - fraction(fraction(balB, SCALE8, balA), SCALE8, fraction(newBalB, SCALE8, newBalA))) * 100) | |
960 | 973 | if ((0 > pri)) | |
961 | 974 | then (pri * -1) | |
962 | 975 | else pri | |
963 | 976 | } | |
964 | 977 | ||
965 | 978 | ||
966 | 979 | func claimAndCheckAmntEx (pool,pType,claim,amountToExchange,change) = { | |
967 | - | let $ | |
980 | + | let $t03118331470 = if (claim) | |
968 | 981 | then claimFarmed(pType, pool) | |
969 | 982 | else { | |
970 | 983 | let claimedAsset = if ((pType == SF_POOL)) | |
971 | 984 | then SWOPID | |
972 | 985 | else if ((pType == WX_POOL)) | |
973 | 986 | then WXID | |
974 | 987 | else unknownPoolType() | |
975 | 988 | $Tuple2(amountToExchange, claimedAsset) | |
976 | 989 | } | |
977 | - | let claimAmount = $t03110031387._1 | |
978 | - | let claimAsset = $t03110031387._2 | |
979 | - | if ((amountToExchange > (claimAmount + change))) | |
990 | + | let claimAmount = $t03118331470._1 | |
991 | + | let claimAsset = $t03118331470._2 | |
992 | + | let bal = accountBalance(claimAsset) | |
993 | + | if (if ((amountToExchange > (claimAmount + change))) | |
994 | + | then true | |
995 | + | else (amountToExchange > bal)) | |
980 | 996 | then throw("To big amount to exchange") | |
981 | 997 | else $Tuple2(claimAmount, claimAsset) | |
982 | 998 | } | |
983 | 999 | ||
984 | 1000 | ||
985 | 1001 | @Callable(i) | |
986 | 1002 | func getShareAssetPriceREADONLY (shareId) = { | |
987 | 1003 | let sharePrices = getSharePrice(shareId) | |
988 | 1004 | $Tuple2(nil, sharePrices) | |
989 | 1005 | } | |
990 | 1006 | ||
991 | 1007 | ||
992 | 1008 | ||
993 | 1009 | @Callable(i) | |
994 | 1010 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
995 | 1011 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
996 | 1012 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
997 | 1013 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
998 | 1014 | $Tuple2(nil, userCanWithdraw) | |
999 | 1015 | } | |
1000 | 1016 | ||
1001 | 1017 | ||
1002 | 1018 | ||
1003 | 1019 | @Callable(i) | |
1004 | - | func | |
1020 | + | func getUserPositionREADONLY (user,pools,posNum) = { | |
1005 | 1021 | func userPos (a,pool) = { | |
1006 | - | let $t03228332317 = a | |
1007 | - | let totalPos = $t03228332317._1 | |
1008 | - | let posDebt = $t03228332317._2 | |
1009 | - | let index = $t03228332317._3 | |
1022 | + | let $t03243632480 = a | |
1023 | + | let wAmountsA = $t03243632480._1 | |
1024 | + | let wAmountsB = $t03243632480._2 | |
1025 | + | let debts = $t03243632480._3 | |
1026 | + | let index = $t03243632480._4 | |
1010 | 1027 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1011 | - | let $ | |
1012 | - | let AId = $ | |
1013 | - | let BId = $ | |
1014 | - | let balA = $ | |
1015 | - | let balB = $ | |
1016 | - | let shareId = $ | |
1028 | + | let $t03257232662 = getPoolData(Address(fromBase58String(pool)), pType) | |
1029 | + | let AId = $t03257232662._1 | |
1030 | + | let BId = $t03257232662._2 | |
1031 | + | let balA = $t03257232662._3 | |
1032 | + | let balB = $t03257232662._4 | |
1033 | + | let shareId = $t03257232662._5 | |
1017 | 1034 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1018 | 1035 | if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition))))) | |
1019 | - | then $Tuple3(( | |
1036 | + | then $Tuple3((wAmountsA :+ 0), (wAmountsB :+ 0), (index + 1)) | |
1020 | 1037 | else { | |
1021 | 1038 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1022 | - | let sharePrices = getSharePrice(shareId) | |
1023 | - | let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
1024 | - | let shareD = fraction(userCanWithdraw, sharePrices, decPrShare) | |
1025 | - | if ((borrowAmount == 0)) | |
1026 | - | then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1)) | |
1027 | - | else { | |
1039 | + | let $t03302333143 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1040 | + | let wAmountA = $t03302333143._1 | |
1041 | + | let wAmountB = $t03302333143._2 | |
1042 | + | if ((borrowAmount > 0)) | |
1043 | + | then { | |
1028 | 1044 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1029 | 1045 | let debt = { | |
1030 | 1046 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil) | |
1031 | 1047 | if ($isInstanceOf(@, "Int")) | |
1032 | 1048 | then @ | |
1033 | 1049 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1034 | 1050 | } | |
1035 | - | let borrowAssetPrice = getIntegerValue(priceOracleAddr, (borrowAsset + kPriceInOracle)) | |
1036 | - | let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN) | |
1037 | - | let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId) | |
1038 | - | $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1)) | |
1051 | + | if ((debt == debt)) | |
1052 | + | then $Tuple4((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (index + 1)) | |
1053 | + | else throw("Strict value is not equal to itself.") | |
1039 | 1054 | } | |
1055 | + | else $Tuple3((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1)) | |
1040 | 1056 | } | |
1041 | 1057 | } | |
1042 | 1058 | ||
1043 | - | let $ | |
1059 | + | let $t03356033637 = { | |
1044 | 1060 | let $l = pools | |
1045 | 1061 | let $s = size($l) | |
1046 | - | let $acc0 = $ | |
1062 | + | let $acc0 = $Tuple4(nil, nil, nil, 0) | |
1047 | 1063 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1048 | 1064 | then $a | |
1049 | 1065 | else userPos($a, $l[$i]) | |
1050 | 1066 | ||
1051 | 1067 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1052 | 1068 | then $a | |
1053 | 1069 | else throw("List size exceeds 20") | |
1054 | 1070 | ||
1055 | 1071 | $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) | |
1056 | 1072 | } | |
1057 | - | let pos = $t03366333718._1 | |
1058 | - | let debt = $t03366333718._2 | |
1059 | - | $Tuple2(nil, $Tuple2(pos, debt)) | |
1073 | + | let wAmountsA = $t03356033637._1 | |
1074 | + | let wAmountsB = $t03356033637._2 | |
1075 | + | let debts = $t03356033637._3 | |
1076 | + | $Tuple2(nil, $Tuple3(wAmountsA, wAmountsB, debts)) | |
1060 | 1077 | } | |
1061 | 1078 | ||
1062 | 1079 | ||
1063 | 1080 | ||
1064 | 1081 | @Callable(i) | |
1065 | 1082 | func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), if (if ((100 > leverage)) | |
1066 | 1083 | then true | |
1067 | 1084 | else (leverage > 300)) | |
1068 | 1085 | then throw("Leverage can't be <100 and >300") | |
1069 | 1086 | else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow)))) | |
1070 | 1087 | then (leverage > 100) | |
1071 | 1088 | else false) | |
1072 | 1089 | then throw("You can't borrow in this pool") | |
1073 | 1090 | else { | |
1074 | 1091 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1075 | - | let $ | |
1076 | - | let AId = $ | |
1077 | - | let BId = $ | |
1078 | - | let balA = $ | |
1079 | - | let balB = $ | |
1080 | - | let shareId = $ | |
1092 | + | let $t03412634216 = getPoolData(Address(fromBase58String(pool)), pType) | |
1093 | + | let AId = $t03412634216._1 | |
1094 | + | let BId = $t03412634216._2 | |
1095 | + | let balA = $t03412634216._3 | |
1096 | + | let balB = $t03412634216._4 | |
1097 | + | let shareId = $t03412634216._5 | |
1081 | 1098 | if (if ((borrowId != AId)) | |
1082 | 1099 | then (borrowId != BId) | |
1083 | 1100 | else false) | |
1084 | 1101 | then throw("Wrong borrow asset") | |
1085 | 1102 | else { | |
1086 | - | let $ | |
1087 | - | let pmtA = $ | |
1088 | - | let pmtB = $ | |
1103 | + | let $t03429734356 = parseReplenishPmts(i.payments, AId, BId) | |
1104 | + | let pmtA = $t03429734356._1 | |
1105 | + | let pmtB = $t03429734356._2 | |
1089 | 1106 | let user = toString(i.caller) | |
1090 | 1107 | let newPosNum = getNewUserPositionNumber(user) | |
1091 | 1108 | if ((leverage > 100)) | |
1092 | 1109 | then { | |
1093 | 1110 | let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId) | |
1094 | 1111 | let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",") | |
1095 | 1112 | let newRequestId = { | |
1096 | 1113 | let @ = invoke(this, "createNewRequest", [request], nil) | |
1097 | 1114 | if ($isInstanceOf(@, "Int")) | |
1098 | 1115 | then @ | |
1099 | 1116 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1100 | 1117 | } | |
1101 | 1118 | if ((newRequestId == newRequestId)) | |
1102 | 1119 | then { | |
1103 | 1120 | let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
1104 | 1121 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
1105 | 1122 | if ((inv == inv)) | |
1106 | 1123 | then { | |
1107 | 1124 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1108 | - | let $ | |
1109 | - | if (($ | |
1125 | + | let $t03534535439 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1126 | + | if (($t03534535439 == $t03534535439)) | |
1110 | 1127 | then { | |
1111 | - | let newBalB = $ | |
1112 | - | let newBalA = $ | |
1128 | + | let newBalB = $t03534535439._2 | |
1129 | + | let newBalA = $t03534535439._1 | |
1113 | 1130 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1114 | - | let $ | |
1115 | - | let wAmountA = $ | |
1116 | - | let wAmountB = $ | |
1131 | + | let $t03550935624 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1132 | + | let wAmountA = $t03550935624._1 | |
1133 | + | let wAmountB = $t03550935624._2 | |
1117 | 1134 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1118 | 1135 | } | |
1119 | 1136 | else throw("Strict value is not equal to itself.") | |
1120 | 1137 | } | |
1121 | 1138 | else throw("Strict value is not equal to itself.") | |
1122 | 1139 | } | |
1123 | 1140 | else throw("Strict value is not equal to itself.") | |
1124 | 1141 | } | |
1125 | 1142 | else { | |
1126 | - | let $ | |
1127 | - | if (($ | |
1143 | + | let $t03567735792 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1144 | + | if (($t03567735792 == $t03567735792)) | |
1128 | 1145 | then { | |
1129 | - | let axlyFee = $ | |
1130 | - | let userStaked = $ | |
1131 | - | let $ | |
1132 | - | if (($ | |
1146 | + | let axlyFee = $t03567735792._2 | |
1147 | + | let userStaked = $t03567735792._1 | |
1148 | + | let $t03579835892 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1149 | + | if (($t03579835892 == $t03579835892)) | |
1133 | 1150 | then { | |
1134 | - | let newBalB = $ | |
1135 | - | let newBalA = $ | |
1151 | + | let newBalB = $t03579835892._2 | |
1152 | + | let newBalA = $t03579835892._1 | |
1136 | 1153 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1137 | - | let $ | |
1138 | - | let wAmountA = $ | |
1139 | - | let wAmountB = $ | |
1154 | + | let $t03596236077 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1155 | + | let wAmountA = $t03596236077._1 | |
1156 | + | let wAmountB = $t03596236077._2 | |
1140 | 1157 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1141 | 1158 | } | |
1142 | 1159 | else throw("Strict value is not equal to itself.") | |
1143 | 1160 | } | |
1144 | 1161 | else throw("Strict value is not equal to itself.") | |
1145 | 1162 | } | |
1146 | 1163 | } | |
1147 | 1164 | }) | |
1148 | 1165 | ||
1149 | 1166 | ||
1150 | 1167 | ||
1151 | 1168 | @Callable(i) | |
1152 | 1169 | func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), withdrawToUser(toString(i.caller), pool, toString(posId), false)) | |
1153 | 1170 | ||
1154 | 1171 | ||
1155 | 1172 | ||
1156 | 1173 | @Callable(i) | |
1157 | 1174 | func createUpdateStopLoss (posId,poolId,assetId,price) = valueOrElse(isActiveForUsers(), { | |
1158 | 1175 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1159 | 1176 | if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
1160 | 1177 | then throw("There are no user position") | |
1161 | 1178 | else if ((0 >= price)) | |
1162 | 1179 | then throw("Price must be greater than 0") | |
1163 | 1180 | else if ((price > tokenOraclePrice)) | |
1164 | 1181 | then throw("Price must be less than current token price") | |
1165 | 1182 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
1166 | 1183 | }) | |
1167 | 1184 | ||
1168 | 1185 | ||
1169 | 1186 | ||
1170 | 1187 | @Callable(i) | |
1171 | 1188 | func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
1172 | 1189 | then throw("No entry") | |
1173 | 1190 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]) | |
1174 | 1191 | ||
1175 | 1192 | ||
1176 | 1193 | ||
1177 | 1194 | @Callable(i) | |
1178 | 1195 | func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if ((toString(i.caller) != "3PG42y6FgT8zM3uX5tEDxJF5rqX8AKGJRAR")) | |
1179 | 1196 | then throw("Only admin can call this function") | |
1180 | 1197 | else if (isDefined(getString(kAdminCallPK))) | |
1181 | 1198 | then throw("Already inited") | |
1182 | 1199 | else [StringEntry(kMoneyBox, moneyBoxAddr), StringEntry(kSFFarmingAddr, sfFarmingAddr), StringEntry(kLendService, lendAddr), StringEntry(kPriceOracle, priceOracleAddr), StringEntry(kExContract, keeperExContract), StringEntry(kWxSwapContract, wxSwapContract), StringEntry(kSwopId, swopAssetId), StringEntry(kWxId, wxAssetId), StringEntry(kAdminCallPK, adminPubKey)] | |
1183 | 1200 | ||
1184 | 1201 | ||
1185 | 1202 | ||
1186 | 1203 | @Callable(i) | |
1187 | 1204 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
1188 | 1205 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
1189 | 1206 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
1190 | 1207 | }) | |
1191 | 1208 | ||
1192 | 1209 | ||
1193 | 1210 | ||
1194 | 1211 | @Callable(i) | |
1195 | 1212 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1196 | - | let $ | |
1197 | - | let user = $ | |
1198 | - | let pool = $ | |
1199 | - | let pmtA = $ | |
1200 | - | let AId = $ | |
1201 | - | let pmtB = $ | |
1202 | - | let BId = $ | |
1203 | - | let balA = $ | |
1204 | - | let balB = $ | |
1205 | - | let shareId = $ | |
1206 | - | let bwAsset = $ | |
1207 | - | let bwAmount = $ | |
1213 | + | let $t03884638950 = parseRequest(requestId) | |
1214 | + | let user = $t03884638950._1 | |
1215 | + | let pool = $t03884638950._2 | |
1216 | + | let pmtA = $t03884638950._3 | |
1217 | + | let AId = $t03884638950._4 | |
1218 | + | let pmtB = $t03884638950._5 | |
1219 | + | let BId = $t03884638950._6 | |
1220 | + | let balA = $t03884638950._7 | |
1221 | + | let balB = $t03884638950._8 | |
1222 | + | let shareId = $t03884638950._9 | |
1223 | + | let bwAsset = $t03884638950._10 | |
1224 | + | let bwAmount = $t03884638950._11 | |
1208 | 1225 | if ((size(i.payments) != 1)) | |
1209 | 1226 | then throw("Wrong payment size") | |
1210 | 1227 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1211 | 1228 | then true | |
1212 | 1229 | else (i.payments[0].amount != bwAmount)) | |
1213 | 1230 | then throw("Wrong payment") | |
1214 | 1231 | else { | |
1215 | - | let $ | |
1232 | + | let $t03914039240 = if ((AId == bwAsset)) | |
1216 | 1233 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1217 | 1234 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1218 | - | let pmtAllA = $ | |
1219 | - | let pmtAllB = $ | |
1235 | + | let pmtAllA = $t03914039240._1 | |
1236 | + | let pmtAllB = $t03914039240._2 | |
1220 | 1237 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1221 | - | let $ | |
1222 | - | let userStaked = $ | |
1223 | - | let axlyFee = $ | |
1238 | + | let $t03932239437 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1239 | + | let userStaked = $t03932239437._1 | |
1240 | + | let axlyFee = $t03932239437._2 | |
1224 | 1241 | let posNum = getNewUserPositionNumber(user) | |
1225 | 1242 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1226 | 1243 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1227 | - | let $ | |
1228 | - | let wAmountA = $ | |
1229 | - | let wAmountB = $ | |
1244 | + | let $t03979739912 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1245 | + | let wAmountA = $t03979739912._1 | |
1246 | + | let wAmountB = $t03979739912._2 | |
1230 | 1247 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1231 | 1248 | } | |
1232 | 1249 | })) | |
1233 | 1250 | ||
1234 | 1251 | ||
1235 | 1252 | ||
1236 | 1253 | @Callable(i) | |
1237 | 1254 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1238 | 1255 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1239 | 1256 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1240 | - | let $ | |
1241 | - | let AId = $ | |
1242 | - | let BId = $ | |
1243 | - | let balA = $ | |
1244 | - | let balB = $ | |
1245 | - | let shareId = $ | |
1257 | + | let $t04043340523 = getPoolData(Address(fromBase58String(pool)), pType) | |
1258 | + | let AId = $t04043340523._1 | |
1259 | + | let BId = $t04043340523._2 | |
1260 | + | let balA = $t04043340523._3 | |
1261 | + | let balB = $t04043340523._4 | |
1262 | + | let shareId = $t04043340523._5 | |
1246 | 1263 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1247 | 1264 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1248 | 1265 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1249 | 1266 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1250 | 1267 | if ((liquidateAmount > userCanWithdraw)) | |
1251 | 1268 | then throw("You can't liquidate more than user have") | |
1252 | 1269 | else if ((borrowAmount == 0)) | |
1253 | 1270 | then throw("You can't liquidate position without borrow") | |
1254 | 1271 | else [IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestLoan))), IntegerEntry((pool + kPoolTotalLoan), (getPoolTotalShareWithLoan(pool) - liquidateAmount)), IntegerEntry((pool + kPoolTotal), (getPoolTotalShare(pool) - liquidateAmount)), IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition), (userCanWithdraw - liquidateAmount)), ScriptTransfer(i.caller, amount, fromBase58String(shareId))] | |
1255 | 1272 | })) | |
1256 | 1273 | ||
1257 | 1274 | ||
1258 | 1275 | ||
1259 | 1276 | @Callable(i) | |
1260 | 1277 | func stopLoss (user,posId,pool,assetId) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), { | |
1261 | 1278 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1262 | 1279 | if ((tokenOraclePrice > tokenOraclePrice)) | |
1263 | 1280 | then throw("Token price greater stop loss price") | |
1264 | 1281 | else if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))))) | |
1265 | 1282 | then throw("No entry") | |
1266 | - | else (withdrawToUser(user, pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))) | |
1283 | + | else { | |
1284 | + | let res = withdrawToUser(user, pool, toString(posId), true) | |
1285 | + | $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2) | |
1286 | + | } | |
1267 | 1287 | })) | |
1268 | 1288 | ||
1269 | 1289 | ||
1270 | 1290 | ||
1271 | 1291 | @Callable(i) | |
1272 | 1292 | func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), { | |
1273 | 1293 | let pType = getStringValue(this, (kPool + pool)) | |
1274 | 1294 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1275 | - | let $ | |
1276 | - | let claimedAmount = $ | |
1277 | - | let claimedAsset = $ | |
1295 | + | let $t04266142762 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change) | |
1296 | + | let claimedAmount = $t04266142762._1 | |
1297 | + | let claimedAsset = $t04266142762._2 | |
1278 | 1298 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1279 | 1299 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1280 | 1300 | let changeEntry = if ((newChange >= 0)) | |
1281 | 1301 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1282 | 1302 | else nil | |
1283 | 1303 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1284 | 1304 | })) | |
1285 | 1305 | ||
1286 | 1306 | ||
1287 | 1307 | ||
1288 | 1308 | @Callable(i) | |
1289 | 1309 | func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), { | |
1290 | 1310 | let pType = getStringValue(this, (kPool + pool)) | |
1291 | 1311 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1292 | - | let $ | |
1293 | - | let claimedAmount = $ | |
1294 | - | let claimedAsset = $ | |
1312 | + | let $t04353743638 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change) | |
1313 | + | let claimedAmount = $t04353743638._1 | |
1314 | + | let claimedAsset = $t04353743638._2 | |
1295 | 1315 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1296 | 1316 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1297 | 1317 | let changeEntry = if ((newChange >= 0)) | |
1298 | 1318 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1299 | 1319 | else nil | |
1300 | 1320 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1301 | 1321 | })) | |
1302 | 1322 | ||
1303 | 1323 | ||
1304 | 1324 | ||
1305 | 1325 | @Callable(i) | |
1306 | 1326 | func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), { | |
1307 | 1327 | let pType = getStringValue(this, (kPool + pool)) | |
1308 | 1328 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1309 | - | let $ | |
1310 | - | let claimedAmount = $ | |
1311 | - | let claimedAsset = $ | |
1329 | + | let $t04448044581 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change) | |
1330 | + | let claimedAmount = $t04448044581._1 | |
1331 | + | let claimedAsset = $t04448044581._2 | |
1312 | 1332 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1313 | 1333 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1314 | 1334 | let changeEntry = if ((newChange >= 0)) | |
1315 | 1335 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1316 | 1336 | else nil | |
1317 | 1337 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1318 | 1338 | })) | |
1319 | 1339 | ||
1320 | 1340 | ||
1321 | 1341 | ||
1322 | 1342 | @Callable(i) | |
1323 | 1343 | func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (if ((type != SF_POOL)) | |
1324 | 1344 | then (type != WX_POOL) | |
1325 | 1345 | else false) | |
1326 | 1346 | then throw("Wrong type") | |
1327 | 1347 | else { | |
1328 | - | let $ | |
1329 | - | let aId = $ | |
1330 | - | let bId = $ | |
1331 | - | let aBal = $ | |
1332 | - | let bBal = $ | |
1333 | - | let shareId = $ | |
1348 | + | let $t04531245406 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1349 | + | let aId = $t04531245406._1 | |
1350 | + | let bId = $t04531245406._2 | |
1351 | + | let aBal = $t04531245406._3 | |
1352 | + | let bBal = $t04531245406._4 | |
1353 | + | let shareId = $t04531245406._5 | |
1334 | 1354 | if ((0 > inFeeNoLoan)) | |
1335 | 1355 | then throw("inFeeNoLoan must be greater than 0") | |
1336 | 1356 | else if ((0 > inFeeLoan)) | |
1337 | 1357 | then throw("inFeeLoan must be greater than 0") | |
1338 | 1358 | else if ((0 > capFeeNoLoan)) | |
1339 | 1359 | then throw("capFeeNoLoan must be greater than 0") | |
1340 | 1360 | else if ((0 > capFeeWithLoan)) | |
1341 | 1361 | then throw("capFeeWithLoan must be greater than 0") | |
1342 | 1362 | else if ((0 > stoplossFeeNoLoan)) | |
1343 | 1363 | then throw("stoplossFeeNoLoan must be greater than 0") | |
1344 | 1364 | else if ((0 > stoplossFeeWithLoan)) | |
1345 | 1365 | then throw("stoplossFeeWithLoan must be greater than 0") | |
1346 | 1366 | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)] | |
1347 | 1367 | })) | |
1348 | 1368 | ||
1349 | 1369 | ||
1350 | 1370 | ||
1351 | 1371 | @Callable(i) | |
1352 | 1372 | func activate () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActive), true)) | |
1353 | 1373 | then throw("dApp already active") | |
1354 | 1374 | else [BooleanEntry(kActive, true)]) | |
1355 | 1375 | ||
1356 | 1376 | ||
1357 | 1377 | ||
1358 | 1378 | @Callable(i) | |
1359 | 1379 | func shutdown () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActive), true))) | |
1360 | 1380 | then throw("dApp already shutdown") | |
1361 | 1381 | else [BooleanEntry(kActive, false)]) | |
1362 | 1382 | ||
1363 | 1383 | ||
1364 | 1384 | ||
1365 | 1385 | @Callable(i) | |
1366 | 1386 | func activateForUsers () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActiveUsers), true)) | |
1367 | 1387 | then throw("dApp already active for users") | |
1368 | - | else [BooleanEntry( | |
1388 | + | else [BooleanEntry(kActiveUsers, true)]) | |
1369 | 1389 | ||
1370 | 1390 | ||
1371 | 1391 | ||
1372 | 1392 | @Callable(i) | |
1373 | 1393 | func shutdownForUsers () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActiveUsers), true))) | |
1374 | 1394 | then throw("dApp already shutdown for users") | |
1375 | - | else [BooleanEntry( | |
1395 | + | else [BooleanEntry(kActiveUsers, false)]) | |
1376 | 1396 | ||
1377 | 1397 | ||
1378 | 1398 | ||
1379 | 1399 | @Callable(i) | |
1380 | 1400 | func activateSF () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true)) | |
1381 | 1401 | then throw("SWOPFI already active") | |
1382 | - | else [BooleanEntry( | |
1402 | + | else [BooleanEntry((SF_POOL + kActiveSFWX), true)]) | |
1383 | 1403 | ||
1384 | 1404 | ||
1385 | 1405 | ||
1386 | 1406 | @Callable(i) | |
1387 | 1407 | func shutdownSF () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true))) | |
1388 | 1408 | then throw("SWOPFI already shutdown") | |
1389 | - | else [BooleanEntry( | |
1409 | + | else [BooleanEntry((SF_POOL + kActiveSFWX), false)]) | |
1390 | 1410 | ||
1391 | 1411 | ||
1392 | 1412 | ||
1393 | 1413 | @Callable(i) | |
1394 | 1414 | func activateWX () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true)) | |
1395 | 1415 | then throw("WX already active") | |
1396 | - | else [BooleanEntry( | |
1416 | + | else [BooleanEntry((WX_POOL + kActiveSFWX), true)]) | |
1397 | 1417 | ||
1398 | 1418 | ||
1399 | 1419 | ||
1400 | 1420 | @Callable(i) | |
1401 | 1421 | func shutdownWX () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true))) | |
1402 | 1422 | then throw("WX already shutdown") | |
1403 | - | else [BooleanEntry( | |
1423 | + | else [BooleanEntry((WX_POOL + kActiveSFWX), false)]) | |
1404 | 1424 | ||
1405 | 1425 | ||
1406 | 1426 | ||
1407 | 1427 | @Callable(i) | |
1408 | 1428 | func activatePool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1409 | 1429 | then throw("Unknown pool") | |
1410 | 1430 | else if (valueOrElse(getBoolean(this, (pool + kPoolActive)), true)) | |
1411 | 1431 | then throw("Pool already active") | |
1412 | - | else [BooleanEntry( | |
1432 | + | else [BooleanEntry((pool + kPoolActive), true)]) | |
1413 | 1433 | ||
1414 | 1434 | ||
1415 | 1435 | ||
1416 | 1436 | @Callable(i) | |
1417 | 1437 | func shutdownPool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1418 | 1438 | then throw("Unknown pool") | |
1419 | 1439 | else if (!(valueOrElse(getBoolean(this, (pool + kPoolActive)), true))) | |
1420 | 1440 | then throw("Pool already shutdown") | |
1421 | - | else [BooleanEntry( | |
1441 | + | else [BooleanEntry((pool + kPoolActive), false)]) | |
1422 | 1442 | ||
1423 | 1443 | ||
1424 | 1444 | @Verifier(tx) | |
1425 | 1445 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1426 | 1446 |
github/deemru/w8io/026f985 214.00 ms ◑