tx · 9iyRDGq9AmPAw1V1xH1xFRY8BWWqf1ayj2G8E8o3remX 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.04100000 Waves 2023.06.02 12:52 [2604906] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "9iyRDGq9AmPAw1V1xH1xFRY8BWWqf1ayj2G8E8o3remX", "fee": 4100000, "feeAssetId": null, "timestamp": 1685699575528, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "2BpceNoxicbvH84Q4TZCckpXvYXuhks1dPgSASMyq5rQ5qL4AFXGAW6k3YYXQG113vKFdkxt5K39ueF24SR7jf5S" ], "script": "base64:BgKRAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCAEIEgMKAQgSBAoCCAESBgoEAQgIARIFCgMBCAgSAwoBCBIGCgQIAQgIEgUKAwgIARIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgoKCAgIAQEBAQEBEgYKBAgICAESBAoCCAheAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0ZQb29s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QCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWFi8HE=", "height": 2604906, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 941vrTeUjwWmL1cCBdmzvQU4WwwqG8qJFJ286qfdzUos Next: 2szVvhZHxNDWnGNY8y6Hv96vaFUt1Td7q715sDs8LFzT Diff:
Old | New | Differences | |
---|---|---|---|
677 | 677 | then { | |
678 | 678 | let inv = if ((pType == SF_POOL)) | |
679 | 679 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
680 | - | else if ((pType == WX_POOL)) | |
681 | - | then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil) | |
682 | - | else throw("Wrong position type") | |
680 | + | else { | |
681 | + | let inv = unstakeLP(pool, pType, shareId, userCanWithdraw) | |
682 | + | if ((inv == inv)) | |
683 | + | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
684 | + | else throw("Strict value is not equal to itself.") | |
685 | + | } | |
683 | 686 | if ((inv == inv)) | |
684 | 687 | then { | |
685 | 688 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
686 | 689 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
687 | - | let $ | |
688 | - | let tokensAmountA = $ | |
689 | - | let tokensAmountB = $ | |
690 | - | let $ | |
690 | + | let $t02247022559 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
691 | + | let tokensAmountA = $t02247022559._1 | |
692 | + | let tokensAmountB = $t02247022559._2 | |
693 | + | let $t02256223258 = if ((debt > 0)) | |
691 | 694 | then { | |
692 | 695 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
693 | 696 | then (debt > tokensAmountA) | |
710 | 713 | else throw("Strict value is not equal to itself.") | |
711 | 714 | } | |
712 | 715 | else $Tuple2(tokensAmountA, tokensAmountB) | |
713 | - | let toUserAmountA = $ | |
714 | - | let toUserAmountB = $ | |
716 | + | let toUserAmountA = $t02256223258._1 | |
717 | + | let toUserAmountB = $t02256223258._2 | |
715 | 718 | $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId) | |
716 | 719 | } | |
717 | 720 | else throw("Strict value is not equal to itself.") | |
748 | 751 | else throw(($getType(@) + " couldn't be cast to Int")) | |
749 | 752 | } | |
750 | 753 | else 0 | |
751 | - | let $ | |
752 | - | if (($ | |
754 | + | let $t02477024923 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
755 | + | if (($t02477024923 == $t02477024923)) | |
753 | 756 | then { | |
754 | - | let shareId = $ | |
755 | - | let cBalBAfter = $ | |
756 | - | let cBalAAfter = $ | |
757 | - | let assetIdB = $ | |
758 | - | let toUserAmountB = $ | |
759 | - | let assetIdA = $ | |
760 | - | let toUserAmountA = $ | |
757 | + | let shareId = $t02477024923._7 | |
758 | + | let cBalBAfter = $t02477024923._6 | |
759 | + | let cBalAAfter = $t02477024923._5 | |
760 | + | let assetIdB = $t02477024923._4 | |
761 | + | let toUserAmountB = $t02477024923._3 | |
762 | + | let assetIdA = $t02477024923._2 | |
763 | + | let toUserAmountA = $t02477024923._1 | |
761 | 764 | let closeDbtInv = if ((debt > 0)) | |
762 | 765 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
763 | 766 | else 0 | |
793 | 796 | then throw("Leverage can't be <100 and >300") | |
794 | 797 | else { | |
795 | 798 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
796 | - | let $ | |
797 | - | let AId = $ | |
798 | - | let BId = $ | |
799 | - | let balA = $ | |
800 | - | let balB = $ | |
801 | - | let shareId = $ | |
799 | + | let $t02643526525 = getPoolData(Address(fromBase58String(pool)), pType) | |
800 | + | let AId = $t02643526525._1 | |
801 | + | let BId = $t02643526525._2 | |
802 | + | let balA = $t02643526525._3 | |
803 | + | let balB = $t02643526525._4 | |
804 | + | let shareId = $t02643526525._5 | |
802 | 805 | let borrowAmount = if ((leverage > 100)) | |
803 | 806 | then { | |
804 | 807 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [AId, false], nil) | |
816 | 819 | (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice) | |
817 | 820 | } | |
818 | 821 | else 0 | |
819 | - | let $ | |
822 | + | let $t02709627208 = if ((borrowAssetId == AId)) | |
820 | 823 | then $Tuple2((pmtA + borrowAmount), pmtB) | |
821 | 824 | else $Tuple2(pmtA, (pmtB + borrowAmount)) | |
822 | - | let payInA = $ | |
823 | - | let payInB = $ | |
825 | + | let payInA = $t02709627208._1 | |
826 | + | let payInB = $t02709627208._2 | |
824 | 827 | let lpAmount = calcReplanishLPVirt(pType, pool, pmtA, AId, pmtB, BId, balA, balB) | |
825 | 828 | nil | |
826 | 829 | } | |
852 | 855 | then throw("Leverage can't be <100 and >300") | |
853 | 856 | else { | |
854 | 857 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
855 | - | let $ | |
856 | - | let AId = $ | |
857 | - | let BId = $ | |
858 | - | let balA = $ | |
859 | - | let balB = $ | |
860 | - | let shareId = $ | |
861 | - | let $ | |
858 | + | let $t02873928829 = getPoolData(Address(fromBase58String(pool)), pType) | |
859 | + | let AId = $t02873928829._1 | |
860 | + | let BId = $t02873928829._2 | |
861 | + | let balA = $t02873928829._3 | |
862 | + | let balB = $t02873928829._4 | |
863 | + | let shareId = $t02873928829._5 | |
864 | + | let $t02883229469 = if ((size(i.payments) == 2)) | |
862 | 865 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
863 | 866 | then throw("Wrong payment asset A") | |
864 | 867 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
871 | 874 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
872 | 875 | else throw("Wrong payment") | |
873 | 876 | else throw("One or two payments expected") | |
874 | - | let pmtA = $ | |
875 | - | let pmtAssetA = $ | |
876 | - | let pmtB = $ | |
877 | - | let pmtAssetB = $ | |
877 | + | let pmtA = $t02883229469._1 | |
878 | + | let pmtAssetA = $t02883229469._2 | |
879 | + | let pmtB = $t02883229469._3 | |
880 | + | let pmtAssetB = $t02883229469._4 | |
878 | 881 | let newPosNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
879 | 882 | if ((leverage > 100)) | |
880 | 883 | then { | |
909 | 912 | else throw("Strict value is not equal to itself.") | |
910 | 913 | } | |
911 | 914 | else { | |
912 | - | let $ | |
913 | - | let userStaked = $ | |
914 | - | let axlyFee = $ | |
915 | + | let $t03085230964 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
916 | + | let userStaked = $t03085230964._1 | |
917 | + | let axlyFee = $t03085230964._2 | |
915 | 918 | (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId)) | |
916 | 919 | } | |
917 | 920 | } | |
920 | 923 | ||
921 | 924 | @Callable(i) | |
922 | 925 | func replenishFromLand (requestId) = { | |
923 | - | let $ | |
924 | - | let user = $ | |
925 | - | let pool = $ | |
926 | - | let pmtA = $ | |
927 | - | let AId = $ | |
928 | - | let pmtB = $ | |
929 | - | let BId = $ | |
930 | - | let balA = $ | |
931 | - | let balB = $ | |
932 | - | let shareId = $ | |
933 | - | let bwAsset = $ | |
934 | - | let bwAmount = $ | |
926 | + | let $t03117531279 = parseRequest(requestId) | |
927 | + | let user = $t03117531279._1 | |
928 | + | let pool = $t03117531279._2 | |
929 | + | let pmtA = $t03117531279._3 | |
930 | + | let AId = $t03117531279._4 | |
931 | + | let pmtB = $t03117531279._5 | |
932 | + | let BId = $t03117531279._6 | |
933 | + | let balA = $t03117531279._7 | |
934 | + | let balB = $t03117531279._8 | |
935 | + | let shareId = $t03117531279._9 | |
936 | + | let bwAsset = $t03117531279._10 | |
937 | + | let bwAmount = $t03117531279._11 | |
935 | 938 | if ((size(i.payments) != 1)) | |
936 | 939 | then throw("Wrong payment size") | |
937 | 940 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
939 | 942 | else (i.payments[0].amount != bwAmount)) | |
940 | 943 | then throw("Wrong payment") | |
941 | 944 | else { | |
942 | - | let $ | |
945 | + | let $t03146931593 = if ((AId == bwAsset)) | |
943 | 946 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
944 | 947 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
945 | - | let pmtAllA = $ | |
946 | - | let pmtAllB = $ | |
948 | + | let pmtAllA = $t03146931593._1 | |
949 | + | let pmtAllB = $t03146931593._2 | |
947 | 950 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
948 | - | let $ | |
949 | - | let userStaked = $ | |
950 | - | let axlyFee = $ | |
951 | + | let $t03167531784 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
952 | + | let userStaked = $t03167531784._1 | |
953 | + | let axlyFee = $t03167531784._2 | |
951 | 954 | let posNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
952 | 955 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
953 | 956 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1011 | 1014 | func liquidate (user,posId,liquidateAmount) = { | |
1012 | 1015 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1013 | 1016 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1014 | - | let $ | |
1015 | - | let AId = $ | |
1016 | - | let BId = $ | |
1017 | - | let balA = $ | |
1018 | - | let balB = $ | |
1019 | - | let shareId = $ | |
1017 | + | let $t03456734657 = getPoolData(Address(fromBase58String(pool)), pType) | |
1018 | + | let AId = $t03456734657._1 | |
1019 | + | let BId = $t03456734657._2 | |
1020 | + | let balA = $t03456734657._3 | |
1021 | + | let balB = $t03456734657._4 | |
1022 | + | let shareId = $t03456734657._5 | |
1020 | 1023 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1021 | 1024 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1022 | 1025 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1030 | 1033 | ||
1031 | 1034 | @Callable(i) | |
1032 | 1035 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
1033 | - | let $ | |
1036 | + | let $t03599736191 = if (claim) | |
1034 | 1037 | then claimFarmed(type, pool) | |
1035 | 1038 | else { | |
1036 | 1039 | let claimedAsset = if ((type == SF_POOL)) | |
1038 | 1041 | else WXID | |
1039 | 1042 | $Tuple2(amountToExchange, claimedAsset) | |
1040 | 1043 | } | |
1041 | - | let claimedAmount = $ | |
1042 | - | let claimedAsset = $ | |
1044 | + | let claimedAmount = $t03599736191._1 | |
1045 | + | let claimedAsset = $t03599736191._2 | |
1043 | 1046 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1044 | 1047 | let change = (claimedAmount - amountToExchange) | |
1045 | 1048 | let changeEntry = if ((change > 0)) | |
1052 | 1055 | ||
1053 | 1056 | @Callable(i) | |
1054 | 1057 | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = { | |
1055 | - | let $ | |
1058 | + | let $t03684837042 = if (claim) | |
1056 | 1059 | then claimFarmed(type, pool) | |
1057 | 1060 | else { | |
1058 | 1061 | let claimedAsset = if ((type == SF_POOL)) | |
1060 | 1063 | else WXID | |
1061 | 1064 | $Tuple2(amountToExchange, claimedAsset) | |
1062 | 1065 | } | |
1063 | - | let claimedAmount = $ | |
1064 | - | let claimedAsset = $ | |
1066 | + | let claimedAmount = $t03684837042._1 | |
1067 | + | let claimedAsset = $t03684837042._2 | |
1065 | 1068 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1066 | 1069 | let change = (claimedAmount - amountToExchange) | |
1067 | 1070 | let changeEntry = if ((change > 0)) | |
1074 | 1077 | ||
1075 | 1078 | @Callable(i) | |
1076 | 1079 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
1077 | - | let $ | |
1080 | + | let $t03776537959 = if (claim) | |
1078 | 1081 | then claimFarmed(type, pool) | |
1079 | 1082 | else { | |
1080 | 1083 | let claimedAsset = if ((type == SF_POOL)) | |
1082 | 1085 | else WXID | |
1083 | 1086 | $Tuple2(amountToExchange, claimedAsset) | |
1084 | 1087 | } | |
1085 | - | let claimedAmount = $ | |
1086 | - | let claimedAsset = $ | |
1088 | + | let claimedAmount = $t03776537959._1 | |
1089 | + | let claimedAsset = $t03776537959._2 | |
1087 | 1090 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1088 | 1091 | let change = (claimedAmount - amountToExchange) | |
1089 | 1092 | let changeEntry = if ((change > 0)) | |
1100 | 1103 | else false) | |
1101 | 1104 | then throw("Wrong type") | |
1102 | 1105 | else { | |
1103 | - | let $ | |
1104 | - | let aId = $ | |
1105 | - | let bId = $ | |
1106 | - | let aBal = $ | |
1107 | - | let bBal = $ | |
1108 | - | let shareId = $ | |
1106 | + | let $t03865238746 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1107 | + | let aId = $t03865238746._1 | |
1108 | + | let bId = $t03865238746._2 | |
1109 | + | let aBal = $t03865238746._3 | |
1110 | + | let bBal = $t03865238746._4 | |
1111 | + | let shareId = $t03865238746._5 | |
1109 | 1112 | [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)] | |
1110 | 1113 | } | |
1111 | 1114 | ||
1114 | 1117 | @Callable(i) | |
1115 | 1118 | func capitalizeTest (pool,pType,tokenId,tokenAmount) = { | |
1116 | 1119 | let poolAddr = Address(fromBase58String(pool)) | |
1117 | - | let $ | |
1118 | - | let AId = $ | |
1119 | - | let BId = $ | |
1120 | - | let balA = $ | |
1121 | - | let balB = $ | |
1122 | - | let shareId = $ | |
1123 | - | let $ | |
1120 | + | let $t03954239621 = getPoolData(poolAddr, pType) | |
1121 | + | let AId = $t03954239621._1 | |
1122 | + | let BId = $t03954239621._2 | |
1123 | + | let balA = $t03954239621._3 | |
1124 | + | let balB = $t03954239621._4 | |
1125 | + | let shareId = $t03954239621._5 | |
1126 | + | let $t03962439704 = if ((tokenId == AId)) | |
1124 | 1127 | then $Tuple2(tokenAmount, 0) | |
1125 | 1128 | else $Tuple2(0, tokenAmount) | |
1126 | - | let pmtA = $ | |
1127 | - | let pmtB = $ | |
1128 | - | let $ | |
1129 | - | let stakedAmount = $ | |
1130 | - | let nf = $ | |
1129 | + | let pmtA = $t03962439704._1 | |
1130 | + | let pmtB = $t03962439704._2 | |
1131 | + | let $t03970739811 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1132 | + | let stakedAmount = $t03970739811._1 | |
1133 | + | let nf = $t03970739811._2 | |
1131 | 1134 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
1132 | 1135 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
1133 | 1136 | let totalShareAmount = getPoolTotalShare(pool) |
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 FEE_SCALE6 = 1000000 | |
27 | 27 | ||
28 | 28 | let kSFPoolAAssetBalance = "A_asset_balance" | |
29 | 29 | ||
30 | 30 | let kSFPoolBAssetBalance = "B_asset_balance" | |
31 | 31 | ||
32 | 32 | let kSFPoolAAssetId = "A_asset_id" | |
33 | 33 | ||
34 | 34 | let kSFPoolBAssetId = "B_asset_id" | |
35 | 35 | ||
36 | 36 | let kSFPoolShareId = "share_asset_id" | |
37 | 37 | ||
38 | 38 | let kSFPoolShareSupply = "share_asset_supply" | |
39 | 39 | ||
40 | 40 | let kSFPoolFee = "commission" | |
41 | 41 | ||
42 | 42 | let kUserPosition = "_user_position" | |
43 | 43 | ||
44 | 44 | let kUserPositionPool = "_user_position_pool" | |
45 | 45 | ||
46 | 46 | let kUserBorrowAmount = "_user_position_borrow_amount" | |
47 | 47 | ||
48 | 48 | let kUserBorrowAssetId = "_user_position_borrow_asset_id" | |
49 | 49 | ||
50 | 50 | let kUserPositionNum = "_user_position_number" | |
51 | 51 | ||
52 | 52 | let kUserPositionInterest = "_user_position_interest" | |
53 | 53 | ||
54 | 54 | let kPoolTotal = "_pool_total" | |
55 | 55 | ||
56 | 56 | let kPoolTotalLoan = "_pool_total_loan" | |
57 | 57 | ||
58 | 58 | let kPoolInterestLoan = "_pool_interest_loan" | |
59 | 59 | ||
60 | 60 | let kPoolInterestNoLoan = "_pool_interest_no_loan" | |
61 | 61 | ||
62 | 62 | let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan" | |
63 | 63 | ||
64 | 64 | let kAxlyInFeeWithLoan = "_axly_fee_with_loan" | |
65 | 65 | ||
66 | 66 | let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan" | |
67 | 67 | ||
68 | 68 | let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan" | |
69 | 69 | ||
70 | 70 | let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan" | |
71 | 71 | ||
72 | 72 | let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan" | |
73 | 73 | ||
74 | 74 | let kRequestId = "_request_id" | |
75 | 75 | ||
76 | 76 | let kRequestIter = "requests_iter" | |
77 | 77 | ||
78 | 78 | let kPool = "pool_" | |
79 | 79 | ||
80 | 80 | let kSharePool = "_pool_share_id" | |
81 | 81 | ||
82 | 82 | let kPoolCapChange = "_pool_cap_change" | |
83 | 83 | ||
84 | 84 | let kTokenLastPrice = "_last_price" | |
85 | 85 | ||
86 | 86 | let kUserStopLoss = "_stop_loss" | |
87 | 87 | ||
88 | 88 | let kMoneyBox = "axly_money_box" | |
89 | 89 | ||
90 | 90 | let kSFFarmingAddr = "swopfi_farming_addr" | |
91 | 91 | ||
92 | 92 | let kLendService = "lend_service_addr" | |
93 | 93 | ||
94 | 94 | let kPriceOracle = "price_oracle" | |
95 | 95 | ||
96 | 96 | let kExContract = "exchange_contract" | |
97 | 97 | ||
98 | 98 | let kWxSwapContract = "wx_swap_contract" | |
99 | 99 | ||
100 | 100 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
101 | 101 | ||
102 | 102 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
103 | 103 | ||
104 | 104 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
105 | 105 | ||
106 | 106 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
107 | 107 | ||
108 | 108 | let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp' | |
109 | 109 | ||
110 | 110 | let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' | |
111 | 111 | ||
112 | 112 | func isSelfCall (i) = if ((i.caller == this)) | |
113 | 113 | then unit | |
114 | 114 | else throw("Only contract itself can call this function") | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func accountBalance (assetId) = match assetId { | |
118 | 118 | case id: ByteVector => | |
119 | 119 | assetBalance(this, id) | |
120 | 120 | case waves: Unit => | |
121 | 121 | wavesBalance(this).available | |
122 | 122 | case _ => | |
123 | 123 | throw("Match error") | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getSFPoolData (poolAddr) = $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance"), valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id")) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func getWXPoolData (poolAddr) = { | |
131 | 131 | let cfg = { | |
132 | 132 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
133 | 133 | if ($isInstanceOf(@, "List[Any]")) | |
134 | 134 | then @ | |
135 | 135 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
136 | 136 | } | |
137 | 137 | if ((cfg == cfg)) | |
138 | 138 | then { | |
139 | 139 | let aId = valueOrErrorMessage({ | |
140 | 140 | let @ = cfg[4] | |
141 | 141 | if ($isInstanceOf(@, "String")) | |
142 | 142 | then @ | |
143 | 143 | else unit | |
144 | 144 | }, "Can't get pool A asset id") | |
145 | 145 | let bId = valueOrErrorMessage({ | |
146 | 146 | let @ = cfg[5] | |
147 | 147 | if ($isInstanceOf(@, "String")) | |
148 | 148 | then @ | |
149 | 149 | else unit | |
150 | 150 | }, "Can't get pool B asset id") | |
151 | 151 | let shareId = valueOrErrorMessage({ | |
152 | 152 | let @ = cfg[3] | |
153 | 153 | if ($isInstanceOf(@, "String")) | |
154 | 154 | then @ | |
155 | 155 | else unit | |
156 | 156 | }, "Can't get pool LP asset id") | |
157 | 157 | let balA = { | |
158 | 158 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
159 | 159 | if ($isInstanceOf(@, "Int")) | |
160 | 160 | then @ | |
161 | 161 | else throw(($getType(@) + " couldn't be cast to Int")) | |
162 | 162 | } | |
163 | 163 | if ((balA == balA)) | |
164 | 164 | then { | |
165 | 165 | let balB = { | |
166 | 166 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
167 | 167 | if ($isInstanceOf(@, "Int")) | |
168 | 168 | then @ | |
169 | 169 | else throw(($getType(@) + " couldn't be cast to Int")) | |
170 | 170 | } | |
171 | 171 | if ((balB == balB)) | |
172 | 172 | then $Tuple5(aId, bId, balA, balB, shareId) | |
173 | 173 | else throw("Strict value is not equal to itself.") | |
174 | 174 | } | |
175 | 175 | else throw("Strict value is not equal to itself.") | |
176 | 176 | } | |
177 | 177 | else throw("Strict value is not equal to itself.") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
182 | 182 | then getSFPoolData(poolAddr) | |
183 | 183 | else if ((type == WX_POOL)) | |
184 | 184 | then getWXPoolData(poolAddr) | |
185 | 185 | else throw("Wrong pool type") | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
189 | 189 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
190 | 190 | else if ((type == WX_POOL)) | |
191 | 191 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
192 | 192 | else throw("Wrong pool type") | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
205 | 205 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
206 | 206 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
207 | 207 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
208 | 208 | else if ((feeType == LOAN_FEE)) | |
209 | 209 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
210 | 210 | else if ((feeType == NO_LOAN_FEE)) | |
211 | 211 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
212 | 212 | else if ((feeType == NO_FEE)) | |
213 | 213 | then 0 | |
214 | 214 | else throw("Wrong fee type") | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func getWXFarmingAddr (poolAddr) = { | |
221 | 221 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
222 | 222 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
223 | 223 | Address(fromBase58String(factroyCfg[1])) | |
224 | 224 | } | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func assetIdToStr (assetId) = match assetId { | |
231 | 231 | case id: ByteVector => | |
232 | 232 | toBase58String(id) | |
233 | 233 | case waves: Unit => | |
234 | 234 | "WAVES" | |
235 | 235 | case _ => | |
236 | 236 | throw("Match error") | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
241 | 241 | then unit | |
242 | 242 | else fromBase58String(assetId) | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
246 | 246 | then 8 | |
247 | 247 | else match assetInfo(fromBase58String(assetId)) { | |
248 | 248 | case asset: Asset => | |
249 | 249 | asset.decimals | |
250 | 250 | case _ => | |
251 | 251 | throw("Can't find asset") | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func getAssetsPrice (assetIds) = { | |
259 | 259 | func getPrices (a,assetId) = { | |
260 | 260 | let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil) | |
261 | 261 | if ($isInstanceOf(@, "(Int, Int)")) | |
262 | 262 | then @ | |
263 | 263 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
264 | 264 | (a :+ assetPrice) | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | let $l = assetIds | |
268 | 268 | let $s = size($l) | |
269 | 269 | let $acc0 = nil | |
270 | 270 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
271 | 271 | then $a | |
272 | 272 | else getPrices($a, $l[$i]) | |
273 | 273 | ||
274 | 274 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
275 | 275 | then $a | |
276 | 276 | else throw("List size exceeds 100") | |
277 | 277 | ||
278 | 278 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func getSharePrice (shareIds) = { | |
283 | 283 | func getPrices (a,shareId) = { | |
284 | 284 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
285 | 285 | let poolAddr = Address(fromBase58String(pool)) | |
286 | 286 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
287 | 287 | let $t084298494 = getPoolData(poolAddr, pType) | |
288 | 288 | let aId = $t084298494._1 | |
289 | 289 | let bId = $t084298494._2 | |
290 | 290 | let aBalance = $t084298494._3 | |
291 | 291 | let bBalance = $t084298494._4 | |
292 | 292 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil) | |
293 | 293 | if ($isInstanceOf(@, "(Int, Int)")) | |
294 | 294 | then @ | |
295 | 295 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
296 | 296 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil) | |
297 | 297 | if ($isInstanceOf(@, "(Int, Int)")) | |
298 | 298 | then @ | |
299 | 299 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
300 | 300 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
301 | 301 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
302 | 302 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
303 | 303 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
304 | 304 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
305 | 305 | let sharePrice = fraction(sum, sharePrecision, shareSupply) | |
306 | 306 | (a :+ sharePrice) | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | let $l = shareIds | |
310 | 310 | let $s = size($l) | |
311 | 311 | let $acc0 = nil | |
312 | 312 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
313 | 313 | then $a | |
314 | 314 | else getPrices($a, $l[$i]) | |
315 | 315 | ||
316 | 316 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
317 | 317 | then $a | |
318 | 318 | else throw("List size exceeds 50") | |
319 | 319 | ||
320 | 320 | $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) | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func getCursEntries (aId,bId,shareId) = { | |
325 | 325 | let assetsPrices = getAssetsPrice([aId, bId]) | |
326 | 326 | let sharePrice = getSharePrice([shareId]) | |
327 | 327 | [IntegerEntry((aId + kTokenLastPrice), assetsPrices[0]), IntegerEntry((bId + kTokenLastPrice), assetsPrices[1]), IntegerEntry((shareId + kTokenLastPrice), sharePrice[0])] | |
328 | 328 | } | |
329 | 329 | ||
330 | 330 | ||
331 | 331 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = { | |
332 | 332 | let $t096669971 = if ((pType == SF_POOL)) | |
333 | 333 | then $Tuple2(nil, nil) | |
334 | 334 | else $Tuple2(split({ | |
335 | 335 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
336 | 336 | if ($isInstanceOf(@, "String")) | |
337 | 337 | then @ | |
338 | 338 | else throw(($getType(@) + " couldn't be cast to String")) | |
339 | 339 | }, "__"), split({ | |
340 | 340 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
341 | 341 | if ($isInstanceOf(@, "String")) | |
342 | 342 | then @ | |
343 | 343 | else throw(($getType(@) + " couldn't be cast to String")) | |
344 | 344 | }, "__")) | |
345 | 345 | if (($t096669971 == $t096669971)) | |
346 | 346 | then { | |
347 | 347 | let evalPutInB = $t096669971._2 | |
348 | 348 | let evalPutInA = $t096669971._1 | |
349 | 349 | let $t0998110177 = if ((pType == SF_POOL)) | |
350 | 350 | then $Tuple2(fraction(SCALE8, pmtA, balA), fraction(SCALE8, pmtB, balB)) | |
351 | 351 | else $Tuple2(parseIntValue(evalPutInA[1]), parseIntValue(evalPutInB[1])) | |
352 | 352 | let ratioA = $t0998110177._1 | |
353 | 353 | let ratioB = $t0998110177._2 | |
354 | 354 | let $t01018310646 = if ((ratioB > ratioA)) | |
355 | 355 | then { | |
356 | 356 | let pmt = if ((pType == SF_POOL)) | |
357 | 357 | then fraction(balB, ratioA, SCALE8, CEILING) | |
358 | 358 | else parseIntValue(evalPutInA[8]) | |
359 | 359 | $Tuple4(pmtA, pmt, (pmtB - pmt), bId) | |
360 | 360 | } | |
361 | 361 | else { | |
362 | 362 | let pmt = if ((pType == SF_POOL)) | |
363 | 363 | then fraction(balA, ratioB, SCALE8, CEILING) | |
364 | 364 | else parseIntValue(evalPutInB[8]) | |
365 | 365 | $Tuple4(pmtA, pmtB, (pmtA - pmt), aId) | |
366 | 366 | } | |
367 | 367 | let pmtInA = $t01018310646._1 | |
368 | 368 | let pmtInB = $t01018310646._2 | |
369 | 369 | let change = $t01018310646._3 | |
370 | 370 | let changeAssetId = $t01018310646._4 | |
371 | 371 | $Tuple4(pmtInA, pmtInB, change, changeAssetId) | |
372 | 372 | } | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | ||
376 | 376 | ||
377 | 377 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
378 | 378 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
379 | 379 | if ((pType == SF_POOL)) | |
380 | 380 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
381 | 381 | else invoke(poolAddr, "put", [1000000, false], payments) | |
382 | 382 | } | |
383 | 383 | ||
384 | 384 | ||
385 | 385 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
386 | 386 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
387 | 387 | if ((pType == SF_POOL)) | |
388 | 388 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
389 | 389 | else invoke(poolAddr, "putOneTkn", [0, false], payments) | |
390 | 390 | } | |
391 | 391 | ||
392 | 392 | ||
393 | 393 | func stakeLP (pool,pType,shareId,amount) = { | |
394 | 394 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
395 | 395 | if ((pType == SF_POOL)) | |
396 | 396 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
397 | 397 | else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | func unstakeLP (pool,pType,shareId,amount) = { | |
402 | 402 | let $t01187212229 = if ((pType == SF_POOL)) | |
403 | 403 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
404 | 404 | else if ((pType == WX_POOL)) | |
405 | 405 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
406 | 406 | else throw("Wrong pool type") | |
407 | 407 | let farmAddr = $t01187212229._1 | |
408 | 408 | let fName = $t01187212229._2 | |
409 | 409 | let params = $t01187212229._3 | |
410 | 410 | let inv = invoke(farmAddr, fName, params, nil) | |
411 | 411 | if ((inv == inv)) | |
412 | 412 | then amount | |
413 | 413 | else throw("Strict value is not equal to itself.") | |
414 | 414 | } | |
415 | 415 | ||
416 | 416 | ||
417 | 417 | func calcReplanishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = { | |
418 | 418 | let poolAddr = addressFromStringValue(pool) | |
419 | 419 | if ((pType == SF_POOL)) | |
420 | 420 | then nil | |
421 | 421 | else if ((pType == WX_POOL)) | |
422 | 422 | then { | |
423 | 423 | let $t01255112859 = if (if ((pmtA > 0)) | |
424 | 424 | then (pmtB > 0) | |
425 | 425 | else false) | |
426 | 426 | then { | |
427 | 427 | let $t01262512741 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
428 | 428 | let pmtInA = $t01262512741._1 | |
429 | 429 | let pmtInB = $t01262512741._2 | |
430 | 430 | let change = $t01262512741._3 | |
431 | 431 | let changeId = $t01262512741._4 | |
432 | 432 | $Tuple2(change, changeId) | |
433 | 433 | } | |
434 | 434 | else if ((pmtA > 0)) | |
435 | 435 | then $Tuple2(pmtA, aId) | |
436 | 436 | else $Tuple2(pmtB, bId) | |
437 | 437 | let change = $t01255112859._1 | |
438 | 438 | let changeId = $t01255112859._2 | |
439 | 439 | nil | |
440 | 440 | } | |
441 | 441 | else throw("Wrong pool type") | |
442 | 442 | } | |
443 | 443 | ||
444 | 444 | ||
445 | 445 | func claimFarmed (type,pool) = if ((type == SF_POOL)) | |
446 | 446 | then { | |
447 | 447 | let balBefore = accountBalance(SWOPID) | |
448 | 448 | if ((balBefore == balBefore)) | |
449 | 449 | then { | |
450 | 450 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
451 | 451 | if ((inv == inv)) | |
452 | 452 | then { | |
453 | 453 | let balAfter = accountBalance(SWOPID) | |
454 | 454 | $Tuple2((balAfter - balBefore), SWOPID) | |
455 | 455 | } | |
456 | 456 | else throw("Strict value is not equal to itself.") | |
457 | 457 | } | |
458 | 458 | else throw("Strict value is not equal to itself.") | |
459 | 459 | } | |
460 | 460 | else if ((type == WX_POOL)) | |
461 | 461 | then { | |
462 | 462 | let balBefore = accountBalance(WXID) | |
463 | 463 | if ((balBefore == balBefore)) | |
464 | 464 | then { | |
465 | 465 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
466 | 466 | if ((inv == inv)) | |
467 | 467 | then { | |
468 | 468 | let balAfter = accountBalance(WXID) | |
469 | 469 | $Tuple2((balAfter - balBefore), WXID) | |
470 | 470 | } | |
471 | 471 | else throw("Strict value is not equal to itself.") | |
472 | 472 | } | |
473 | 473 | else throw("Strict value is not equal to itself.") | |
474 | 474 | } | |
475 | 475 | else throw("Wrong pool type") | |
476 | 476 | ||
477 | 477 | ||
478 | 478 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
479 | 479 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
480 | 480 | if ((lpBalanceBefore == lpBalanceBefore)) | |
481 | 481 | then { | |
482 | 482 | let poolAddr = addressFromStringValue(pool) | |
483 | 483 | let $t01386914285 = if (if ((pmtA > 0)) | |
484 | 484 | then (pmtB > 0) | |
485 | 485 | else false) | |
486 | 486 | then { | |
487 | 487 | let $t01393514051 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
488 | 488 | let pmtInA = $t01393514051._1 | |
489 | 489 | let pmtInB = $t01393514051._2 | |
490 | 490 | let change = $t01393514051._3 | |
491 | 491 | let changeId = $t01393514051._4 | |
492 | 492 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
493 | 493 | if ((inv == inv)) | |
494 | 494 | then $Tuple2(change, changeId) | |
495 | 495 | else throw("Strict value is not equal to itself.") | |
496 | 496 | } | |
497 | 497 | else if ((pmtA > 0)) | |
498 | 498 | then $Tuple2(pmtA, aId) | |
499 | 499 | else if ((pmtB > 0)) | |
500 | 500 | then $Tuple2(pmtB, bId) | |
501 | 501 | else throw("pmts must be > 0") | |
502 | 502 | let change = $t01386914285._1 | |
503 | 503 | let changeId = $t01386914285._2 | |
504 | 504 | let inv = if ((change > 0)) | |
505 | 505 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
506 | 506 | else nil | |
507 | 507 | if ((inv == inv)) | |
508 | 508 | then { | |
509 | 509 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
510 | 510 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
511 | 511 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
512 | 512 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
513 | 513 | if ((0 >= userShareForStake)) | |
514 | 514 | then throw("amount of staked sharetokens must be > 0") | |
515 | 515 | else { | |
516 | 516 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
517 | 517 | if ((invLP == invLP)) | |
518 | 518 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
519 | 519 | else throw("Strict value is not equal to itself.") | |
520 | 520 | } | |
521 | 521 | } | |
522 | 522 | else throw("Strict value is not equal to itself.") | |
523 | 523 | } | |
524 | 524 | else throw("Strict value is not equal to itself.") | |
525 | 525 | } | |
526 | 526 | ||
527 | 527 | ||
528 | 528 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
529 | 529 | let totalAmount = getPoolTotalShare(pool) | |
530 | 530 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
531 | 531 | let $t01514315381 = if (withLoan) | |
532 | 532 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
533 | 533 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
534 | 534 | let curPoolInterest = $t01514315381._1 | |
535 | 535 | let totalStakedWithLoan = $t01514315381._2 | |
536 | 536 | [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))] | |
537 | 537 | } | |
538 | 538 | ||
539 | 539 | ||
540 | 540 | func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
541 | 541 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
542 | 542 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
543 | 543 | then { | |
544 | 544 | let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
545 | 545 | if ((inv == inv)) | |
546 | 546 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
547 | 547 | else throw("Strict value is not equal to itself.") | |
548 | 548 | } | |
549 | 549 | else throw("Strict value is not equal to itself.") | |
550 | 550 | } | |
551 | 551 | ||
552 | 552 | ||
553 | 553 | func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = { | |
554 | 554 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
555 | 555 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
556 | 556 | then { | |
557 | 557 | let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
558 | 558 | if ((inv == inv)) | |
559 | 559 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
560 | 560 | else throw("Strict value is not equal to itself.") | |
561 | 561 | } | |
562 | 562 | else throw("Strict value is not equal to itself.") | |
563 | 563 | } | |
564 | 564 | ||
565 | 565 | ||
566 | 566 | func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
567 | 567 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
568 | 568 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
569 | 569 | then { | |
570 | 570 | let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
571 | 571 | if ((inv == inv)) | |
572 | 572 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
573 | 573 | else throw("Strict value is not equal to itself.") | |
574 | 574 | } | |
575 | 575 | else throw("Strict value is not equal to itself.") | |
576 | 576 | } | |
577 | 577 | ||
578 | 578 | ||
579 | 579 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
580 | 580 | let poolAddr = Address(fromBase58String(pool)) | |
581 | 581 | let $t01773217811 = getPoolData(poolAddr, pType) | |
582 | 582 | let AId = $t01773217811._1 | |
583 | 583 | let BId = $t01773217811._2 | |
584 | 584 | let balA = $t01773217811._3 | |
585 | 585 | let balB = $t01773217811._4 | |
586 | 586 | let shareId = $t01773217811._5 | |
587 | 587 | let $t01781417894 = if ((tokenId == AId)) | |
588 | 588 | then $Tuple2(tokenAmount, 0) | |
589 | 589 | else $Tuple2(0, tokenAmount) | |
590 | 590 | let pmtA = $t01781417894._1 | |
591 | 591 | let pmtB = $t01781417894._2 | |
592 | 592 | let $t01789718001 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
593 | 593 | let stakedAmount = $t01789718001._1 | |
594 | 594 | let nf = $t01789718001._2 | |
595 | 595 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
596 | 596 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
597 | 597 | let totalShareAmount = getPoolTotalShare(pool) | |
598 | 598 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
599 | 599 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
600 | 600 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
601 | 601 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
602 | 602 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
603 | 603 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
604 | 604 | else 0 | |
605 | 605 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
606 | 606 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
607 | 607 | else 0 | |
608 | 608 | let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
609 | 609 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
610 | 610 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
611 | 611 | if ((axlyFee == axlyFee)) | |
612 | 612 | 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)) | |
613 | 613 | else throw("Strict value is not equal to itself.") | |
614 | 614 | } | |
615 | 615 | ||
616 | 616 | ||
617 | 617 | func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
618 | 618 | let poolAddr = Address(fromBase58String(pool)) | |
619 | 619 | let feeScale6 = 1000000 | |
620 | 620 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
621 | 621 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee)) | |
622 | 622 | let $t01989120179 = if ((assetTokenToGet == assetIdA)) | |
623 | 623 | then { | |
624 | 624 | let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee)) | |
625 | 625 | $Tuple2(amountToPay, assetIdB) | |
626 | 626 | } | |
627 | 627 | else { | |
628 | 628 | let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee)) | |
629 | 629 | $Tuple2(amountToPay, assetIdA) | |
630 | 630 | } | |
631 | 631 | let amountToPay = $t01989120179._1 | |
632 | 632 | let assetToPay = $t01989120179._2 | |
633 | 633 | invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
634 | 634 | } | |
635 | 635 | ||
636 | 636 | ||
637 | 637 | func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
638 | 638 | let poolAddr = Address(fromBase58String(pool)) | |
639 | 639 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
640 | 640 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
641 | 641 | let feeScale = toBigInt(100000000) | |
642 | 642 | let $t02065820966 = if ((assetTokenToGet == assetIdA)) | |
643 | 643 | then { | |
644 | 644 | let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet)) | |
645 | 645 | $Tuple2(amountToPay, assetIdB) | |
646 | 646 | } | |
647 | 647 | else { | |
648 | 648 | let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet)) | |
649 | 649 | $Tuple2(amountToPay, assetIdA) | |
650 | 650 | } | |
651 | 651 | let amountToPay = $t02065820966._1 | |
652 | 652 | let assetToPay = $t02065820966._2 | |
653 | 653 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))))) | |
654 | 654 | invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)]) | |
655 | 655 | } | |
656 | 656 | ||
657 | 657 | ||
658 | 658 | func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL)) | |
659 | 659 | then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
660 | 660 | else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
661 | 661 | ||
662 | 662 | ||
663 | 663 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = { | |
664 | 664 | let poolAddr = Address(fromBase58String(pool)) | |
665 | 665 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
666 | 666 | let $t02183121907 = getPoolData(poolAddr, pType) | |
667 | 667 | let assetIdA = $t02183121907._1 | |
668 | 668 | let assetIdB = $t02183121907._2 | |
669 | 669 | let balA = $t02183121907._3 | |
670 | 670 | let balB = $t02183121907._4 | |
671 | 671 | let shareId = $t02183121907._5 | |
672 | 672 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
673 | 673 | if ((cBalABefore == cBalABefore)) | |
674 | 674 | then { | |
675 | 675 | let cBalBBefore = accountBalance(assetIdFromStr(assetIdB)) | |
676 | 676 | if ((cBalBBefore == cBalBBefore)) | |
677 | 677 | then { | |
678 | 678 | let inv = if ((pType == SF_POOL)) | |
679 | 679 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
680 | - | else if ((pType == WX_POOL)) | |
681 | - | then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil) | |
682 | - | else throw("Wrong position type") | |
680 | + | else { | |
681 | + | let inv = unstakeLP(pool, pType, shareId, userCanWithdraw) | |
682 | + | if ((inv == inv)) | |
683 | + | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
684 | + | else throw("Strict value is not equal to itself.") | |
685 | + | } | |
683 | 686 | if ((inv == inv)) | |
684 | 687 | then { | |
685 | 688 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
686 | 689 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
687 | - | let $ | |
688 | - | let tokensAmountA = $ | |
689 | - | let tokensAmountB = $ | |
690 | - | let $ | |
690 | + | let $t02247022559 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
691 | + | let tokensAmountA = $t02247022559._1 | |
692 | + | let tokensAmountB = $t02247022559._2 | |
693 | + | let $t02256223258 = if ((debt > 0)) | |
691 | 694 | then { | |
692 | 695 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
693 | 696 | then (debt > tokensAmountA) | |
694 | 697 | else false) | |
695 | 698 | then (debt - tokensAmountA) | |
696 | 699 | else if (if ((borrowAsset == assetIdB)) | |
697 | 700 | then (debt > tokensAmountB) | |
698 | 701 | else false) | |
699 | 702 | then (debt - tokensAmountB) | |
700 | 703 | else 0 | |
701 | 704 | let exInv = if ((amountToGetEx > 0)) | |
702 | 705 | then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset) | |
703 | 706 | else 0 | |
704 | 707 | if ((exInv == exInv)) | |
705 | 708 | then { | |
706 | 709 | let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA)) | |
707 | 710 | let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB)) | |
708 | 711 | $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore)) | |
709 | 712 | } | |
710 | 713 | else throw("Strict value is not equal to itself.") | |
711 | 714 | } | |
712 | 715 | else $Tuple2(tokensAmountA, tokensAmountB) | |
713 | - | let toUserAmountA = $ | |
714 | - | let toUserAmountB = $ | |
716 | + | let toUserAmountA = $t02256223258._1 | |
717 | + | let toUserAmountB = $t02256223258._2 | |
715 | 718 | $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId) | |
716 | 719 | } | |
717 | 720 | else throw("Strict value is not equal to itself.") | |
718 | 721 | } | |
719 | 722 | else throw("Strict value is not equal to itself.") | |
720 | 723 | } | |
721 | 724 | else throw("Strict value is not equal to itself.") | |
722 | 725 | } | |
723 | 726 | ||
724 | 727 | ||
725 | 728 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
726 | 729 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
727 | 730 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
728 | 731 | let poolInterest = if (borrowed) | |
729 | 732 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
730 | 733 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
731 | 734 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
732 | 735 | } | |
733 | 736 | ||
734 | 737 | ||
735 | 738 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
736 | 739 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
737 | 740 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
738 | 741 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) | |
739 | 742 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
740 | 743 | let poolTotalShare = getPoolTotalShare(pool) | |
741 | 744 | let userAddr = Address(fromBase58String(user)) | |
742 | 745 | let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "") | |
743 | 746 | let debt = if ((borrowAmount > 0)) | |
744 | 747 | then { | |
745 | 748 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + posId), borrowAsset], nil) | |
746 | 749 | if ($isInstanceOf(@, "Int")) | |
747 | 750 | then @ | |
748 | 751 | else throw(($getType(@) + " couldn't be cast to Int")) | |
749 | 752 | } | |
750 | 753 | else 0 | |
751 | - | let $ | |
752 | - | if (($ | |
754 | + | let $t02477024923 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
755 | + | if (($t02477024923 == $t02477024923)) | |
753 | 756 | then { | |
754 | - | let shareId = $ | |
755 | - | let cBalBAfter = $ | |
756 | - | let cBalAAfter = $ | |
757 | - | let assetIdB = $ | |
758 | - | let toUserAmountB = $ | |
759 | - | let assetIdA = $ | |
760 | - | let toUserAmountA = $ | |
757 | + | let shareId = $t02477024923._7 | |
758 | + | let cBalBAfter = $t02477024923._6 | |
759 | + | let cBalAAfter = $t02477024923._5 | |
760 | + | let assetIdB = $t02477024923._4 | |
761 | + | let toUserAmountB = $t02477024923._3 | |
762 | + | let assetIdA = $t02477024923._2 | |
763 | + | let toUserAmountA = $t02477024923._1 | |
761 | 764 | let closeDbtInv = if ((debt > 0)) | |
762 | 765 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
763 | 766 | else 0 | |
764 | 767 | if ((closeDbtInv == closeDbtInv)) | |
765 | 768 | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId)) | |
766 | 769 | else throw("Strict value is not equal to itself.") | |
767 | 770 | } | |
768 | 771 | else throw("Strict value is not equal to itself.") | |
769 | 772 | } | |
770 | 773 | ||
771 | 774 | ||
772 | 775 | func parseRequest (requestId) = { | |
773 | 776 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
774 | 777 | let user = request[0] | |
775 | 778 | let pool = request[1] | |
776 | 779 | let pmtA = parseIntValue(request[2]) | |
777 | 780 | let AId = request[3] | |
778 | 781 | let pmtB = parseIntValue(request[4]) | |
779 | 782 | let BId = request[5] | |
780 | 783 | let balA = parseIntValue(request[6]) | |
781 | 784 | let balB = parseIntValue(request[7]) | |
782 | 785 | let shareId = request[8] | |
783 | 786 | let bwAsset = request[9] | |
784 | 787 | let bwAmount = parseIntValue(request[10]) | |
785 | 788 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
786 | 789 | } | |
787 | 790 | ||
788 | 791 | ||
789 | 792 | @Callable(i) | |
790 | 793 | func replenishEVALONLY (pool,leverage,borrowAssetId,pmtA,pmtB) = if (if ((100 > leverage)) | |
791 | 794 | then true | |
792 | 795 | else (leverage > 300)) | |
793 | 796 | then throw("Leverage can't be <100 and >300") | |
794 | 797 | else { | |
795 | 798 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
796 | - | let $ | |
797 | - | let AId = $ | |
798 | - | let BId = $ | |
799 | - | let balA = $ | |
800 | - | let balB = $ | |
801 | - | let shareId = $ | |
799 | + | let $t02643526525 = getPoolData(Address(fromBase58String(pool)), pType) | |
800 | + | let AId = $t02643526525._1 | |
801 | + | let BId = $t02643526525._2 | |
802 | + | let balA = $t02643526525._3 | |
803 | + | let balB = $t02643526525._4 | |
804 | + | let shareId = $t02643526525._5 | |
802 | 805 | let borrowAmount = if ((leverage > 100)) | |
803 | 806 | then { | |
804 | 807 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [AId, false], nil) | |
805 | 808 | if ($isInstanceOf(@, "(Int, Int)")) | |
806 | 809 | then @ | |
807 | 810 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
808 | 811 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [BId, false], nil) | |
809 | 812 | if ($isInstanceOf(@, "(Int, Int)")) | |
810 | 813 | then @ | |
811 | 814 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
812 | 815 | let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(AId), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(BId), 0, 0, DOWN))) | |
813 | 816 | let borrowPrice = if ((borrowAssetId == AId)) | |
814 | 817 | then dPriceA | |
815 | 818 | else dPriceB | |
816 | 819 | (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice) | |
817 | 820 | } | |
818 | 821 | else 0 | |
819 | - | let $ | |
822 | + | let $t02709627208 = if ((borrowAssetId == AId)) | |
820 | 823 | then $Tuple2((pmtA + borrowAmount), pmtB) | |
821 | 824 | else $Tuple2(pmtA, (pmtB + borrowAmount)) | |
822 | - | let payInA = $ | |
823 | - | let payInB = $ | |
825 | + | let payInA = $t02709627208._1 | |
826 | + | let payInB = $t02709627208._2 | |
824 | 827 | let lpAmount = calcReplanishLPVirt(pType, pool, pmtA, AId, pmtB, BId, balA, balB) | |
825 | 828 | nil | |
826 | 829 | } | |
827 | 830 | ||
828 | 831 | ||
829 | 832 | ||
830 | 833 | @Callable(i) | |
831 | 834 | func getShareAssetPriceREADONLY (shareId) = { | |
832 | 835 | let sharePrices = getSharePrice([shareId]) | |
833 | 836 | $Tuple2(nil, sharePrices[0]) | |
834 | 837 | } | |
835 | 838 | ||
836 | 839 | ||
837 | 840 | ||
838 | 841 | @Callable(i) | |
839 | 842 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
840 | 843 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
841 | 844 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
842 | 845 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
843 | 846 | $Tuple2(nil, userCanWithdraw) | |
844 | 847 | } | |
845 | 848 | ||
846 | 849 | ||
847 | 850 | ||
848 | 851 | @Callable(i) | |
849 | 852 | func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage)) | |
850 | 853 | then true | |
851 | 854 | else (leverage > 300)) | |
852 | 855 | then throw("Leverage can't be <100 and >300") | |
853 | 856 | else { | |
854 | 857 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
855 | - | let $ | |
856 | - | let AId = $ | |
857 | - | let BId = $ | |
858 | - | let balA = $ | |
859 | - | let balB = $ | |
860 | - | let shareId = $ | |
861 | - | let $ | |
858 | + | let $t02873928829 = getPoolData(Address(fromBase58String(pool)), pType) | |
859 | + | let AId = $t02873928829._1 | |
860 | + | let BId = $t02873928829._2 | |
861 | + | let balA = $t02873928829._3 | |
862 | + | let balB = $t02873928829._4 | |
863 | + | let shareId = $t02873928829._5 | |
864 | + | let $t02883229469 = if ((size(i.payments) == 2)) | |
862 | 865 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
863 | 866 | then throw("Wrong payment asset A") | |
864 | 867 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
865 | 868 | then throw("Wrong payment asset B") | |
866 | 869 | else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId) | |
867 | 870 | else if ((size(i.payments) == 1)) | |
868 | 871 | then if ((assetIdToStr(i.payments[0].assetId) == AId)) | |
869 | 872 | then $Tuple4(i.payments[0].amount, AId, 0, BId) | |
870 | 873 | else if ((assetIdToStr(i.payments[0].assetId) == BId)) | |
871 | 874 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
872 | 875 | else throw("Wrong payment") | |
873 | 876 | else throw("One or two payments expected") | |
874 | - | let pmtA = $ | |
875 | - | let pmtAssetA = $ | |
876 | - | let pmtB = $ | |
877 | - | let pmtAssetB = $ | |
877 | + | let pmtA = $t02883229469._1 | |
878 | + | let pmtAssetA = $t02883229469._2 | |
879 | + | let pmtB = $t02883229469._3 | |
880 | + | let pmtAssetB = $t02883229469._4 | |
878 | 881 | let newPosNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
879 | 882 | if ((leverage > 100)) | |
880 | 883 | then { | |
881 | 884 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil) | |
882 | 885 | if ($isInstanceOf(@, "(Int, Int)")) | |
883 | 886 | then @ | |
884 | 887 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
885 | 888 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil) | |
886 | 889 | if ($isInstanceOf(@, "(Int, Int)")) | |
887 | 890 | then @ | |
888 | 891 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
889 | 892 | let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN))) | |
890 | 893 | let borrowPrice = if ((borrowAssetId == AId)) | |
891 | 894 | then dPriceA | |
892 | 895 | else dPriceB | |
893 | 896 | let borrowAmount = (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice) | |
894 | 897 | let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",") | |
895 | 898 | let newRequestId = { | |
896 | 899 | let @ = invoke(this, "createNewRequest", [request], nil) | |
897 | 900 | if ($isInstanceOf(@, "Int")) | |
898 | 901 | then @ | |
899 | 902 | else throw(($getType(@) + " couldn't be cast to Int")) | |
900 | 903 | } | |
901 | 904 | if ((newRequestId == newRequestId)) | |
902 | 905 | then { | |
903 | 906 | let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
904 | 907 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
905 | 908 | if ((inv == inv)) | |
906 | 909 | then nil | |
907 | 910 | else throw("Strict value is not equal to itself.") | |
908 | 911 | } | |
909 | 912 | else throw("Strict value is not equal to itself.") | |
910 | 913 | } | |
911 | 914 | else { | |
912 | - | let $ | |
913 | - | let userStaked = $ | |
914 | - | let axlyFee = $ | |
915 | + | let $t03085230964 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
916 | + | let userStaked = $t03085230964._1 | |
917 | + | let axlyFee = $t03085230964._2 | |
915 | 918 | (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId)) | |
916 | 919 | } | |
917 | 920 | } | |
918 | 921 | ||
919 | 922 | ||
920 | 923 | ||
921 | 924 | @Callable(i) | |
922 | 925 | func replenishFromLand (requestId) = { | |
923 | - | let $ | |
924 | - | let user = $ | |
925 | - | let pool = $ | |
926 | - | let pmtA = $ | |
927 | - | let AId = $ | |
928 | - | let pmtB = $ | |
929 | - | let BId = $ | |
930 | - | let balA = $ | |
931 | - | let balB = $ | |
932 | - | let shareId = $ | |
933 | - | let bwAsset = $ | |
934 | - | let bwAmount = $ | |
926 | + | let $t03117531279 = parseRequest(requestId) | |
927 | + | let user = $t03117531279._1 | |
928 | + | let pool = $t03117531279._2 | |
929 | + | let pmtA = $t03117531279._3 | |
930 | + | let AId = $t03117531279._4 | |
931 | + | let pmtB = $t03117531279._5 | |
932 | + | let BId = $t03117531279._6 | |
933 | + | let balA = $t03117531279._7 | |
934 | + | let balB = $t03117531279._8 | |
935 | + | let shareId = $t03117531279._9 | |
936 | + | let bwAsset = $t03117531279._10 | |
937 | + | let bwAmount = $t03117531279._11 | |
935 | 938 | if ((size(i.payments) != 1)) | |
936 | 939 | then throw("Wrong payment size") | |
937 | 940 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
938 | 941 | then true | |
939 | 942 | else (i.payments[0].amount != bwAmount)) | |
940 | 943 | then throw("Wrong payment") | |
941 | 944 | else { | |
942 | - | let $ | |
945 | + | let $t03146931593 = if ((AId == bwAsset)) | |
943 | 946 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
944 | 947 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
945 | - | let pmtAllA = $ | |
946 | - | let pmtAllB = $ | |
948 | + | let pmtAllA = $t03146931593._1 | |
949 | + | let pmtAllB = $t03146931593._2 | |
947 | 950 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
948 | - | let $ | |
949 | - | let userStaked = $ | |
950 | - | let axlyFee = $ | |
951 | + | let $t03167531784 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
952 | + | let userStaked = $t03167531784._1 | |
953 | + | let axlyFee = $t03167531784._2 | |
951 | 954 | let posNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
952 | 955 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
953 | 956 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
954 | 957 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
955 | 958 | } | |
956 | 959 | } | |
957 | 960 | ||
958 | 961 | ||
959 | 962 | ||
960 | 963 | @Callable(i) | |
961 | 964 | func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false) | |
962 | 965 | ||
963 | 966 | ||
964 | 967 | ||
965 | 968 | @Callable(i) | |
966 | 969 | func createUpdateStopLoss (posId,poolId,assetId,price) = { | |
967 | 970 | let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil) | |
968 | 971 | if ($isInstanceOf(@, "(Int, Int)")) | |
969 | 972 | then @ | |
970 | 973 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
971 | 974 | if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
972 | 975 | then throw("There are no user position") | |
973 | 976 | else if ((0 >= price)) | |
974 | 977 | then throw("Price must be greater than 0") | |
975 | 978 | else if ((price > tokenOraclePrice)) | |
976 | 979 | then throw("Price must be less than current token price") | |
977 | 980 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
978 | 981 | } | |
979 | 982 | ||
980 | 983 | ||
981 | 984 | ||
982 | 985 | @Callable(i) | |
983 | 986 | func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
984 | 987 | then throw("No entry") | |
985 | 988 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))] | |
986 | 989 | ||
987 | 990 | ||
988 | 991 | ||
989 | 992 | @Callable(i) | |
990 | 993 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
991 | 994 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
992 | 995 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
993 | 996 | }) | |
994 | 997 | ||
995 | 998 | ||
996 | 999 | ||
997 | 1000 | @Callable(i) | |
998 | 1001 | func stopLoss (user,posId,pool,assetId) = { | |
999 | 1002 | let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil) | |
1000 | 1003 | if ($isInstanceOf(@, "(Int, Int)")) | |
1001 | 1004 | then @ | |
1002 | 1005 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
1003 | 1006 | if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))))) | |
1004 | 1007 | then throw("No entry") | |
1005 | 1008 | else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))) | |
1006 | 1009 | } | |
1007 | 1010 | ||
1008 | 1011 | ||
1009 | 1012 | ||
1010 | 1013 | @Callable(i) | |
1011 | 1014 | func liquidate (user,posId,liquidateAmount) = { | |
1012 | 1015 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1013 | 1016 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1014 | - | let $ | |
1015 | - | let AId = $ | |
1016 | - | let BId = $ | |
1017 | - | let balA = $ | |
1018 | - | let balB = $ | |
1019 | - | let shareId = $ | |
1017 | + | let $t03456734657 = getPoolData(Address(fromBase58String(pool)), pType) | |
1018 | + | let AId = $t03456734657._1 | |
1019 | + | let BId = $t03456734657._2 | |
1020 | + | let balA = $t03456734657._3 | |
1021 | + | let balB = $t03456734657._4 | |
1022 | + | let shareId = $t03456734657._5 | |
1020 | 1023 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1021 | 1024 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1022 | 1025 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1023 | 1026 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1024 | 1027 | if ((borrowAmount > 0)) | |
1025 | 1028 | then [IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestLoan))), IntegerEntry((pool + kPoolTotalLoan), (getPoolTotalShareWithLoan(pool) - liquidateAmount))] | |
1026 | 1029 | else ([IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestNoLoan)))] ++ [IntegerEntry((pool + kPoolTotal), (getPoolTotalShare(pool) - liquidateAmount)), IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition), (userCanWithdraw - liquidateAmount)), ScriptTransfer(i.caller, amount, fromBase58String(shareId))]) | |
1027 | 1030 | } | |
1028 | 1031 | ||
1029 | 1032 | ||
1030 | 1033 | ||
1031 | 1034 | @Callable(i) | |
1032 | 1035 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
1033 | - | let $ | |
1036 | + | let $t03599736191 = if (claim) | |
1034 | 1037 | then claimFarmed(type, pool) | |
1035 | 1038 | else { | |
1036 | 1039 | let claimedAsset = if ((type == SF_POOL)) | |
1037 | 1040 | then SWOPID | |
1038 | 1041 | else WXID | |
1039 | 1042 | $Tuple2(amountToExchange, claimedAsset) | |
1040 | 1043 | } | |
1041 | - | let claimedAmount = $ | |
1042 | - | let claimedAsset = $ | |
1044 | + | let claimedAmount = $t03599736191._1 | |
1045 | + | let claimedAsset = $t03599736191._2 | |
1043 | 1046 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1044 | 1047 | let change = (claimedAmount - amountToExchange) | |
1045 | 1048 | let changeEntry = if ((change > 0)) | |
1046 | 1049 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1047 | 1050 | else nil | |
1048 | 1051 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1049 | 1052 | } | |
1050 | 1053 | ||
1051 | 1054 | ||
1052 | 1055 | ||
1053 | 1056 | @Callable(i) | |
1054 | 1057 | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = { | |
1055 | - | let $ | |
1058 | + | let $t03684837042 = if (claim) | |
1056 | 1059 | then claimFarmed(type, pool) | |
1057 | 1060 | else { | |
1058 | 1061 | let claimedAsset = if ((type == SF_POOL)) | |
1059 | 1062 | then SWOPID | |
1060 | 1063 | else WXID | |
1061 | 1064 | $Tuple2(amountToExchange, claimedAsset) | |
1062 | 1065 | } | |
1063 | - | let claimedAmount = $ | |
1064 | - | let claimedAsset = $ | |
1066 | + | let claimedAmount = $t03684837042._1 | |
1067 | + | let claimedAsset = $t03684837042._2 | |
1065 | 1068 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1066 | 1069 | let change = (claimedAmount - amountToExchange) | |
1067 | 1070 | let changeEntry = if ((change > 0)) | |
1068 | 1071 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1069 | 1072 | else nil | |
1070 | 1073 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1071 | 1074 | } | |
1072 | 1075 | ||
1073 | 1076 | ||
1074 | 1077 | ||
1075 | 1078 | @Callable(i) | |
1076 | 1079 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
1077 | - | let $ | |
1080 | + | let $t03776537959 = if (claim) | |
1078 | 1081 | then claimFarmed(type, pool) | |
1079 | 1082 | else { | |
1080 | 1083 | let claimedAsset = if ((type == SF_POOL)) | |
1081 | 1084 | then SWOPID | |
1082 | 1085 | else WXID | |
1083 | 1086 | $Tuple2(amountToExchange, claimedAsset) | |
1084 | 1087 | } | |
1085 | - | let claimedAmount = $ | |
1086 | - | let claimedAsset = $ | |
1088 | + | let claimedAmount = $t03776537959._1 | |
1089 | + | let claimedAsset = $t03776537959._2 | |
1087 | 1090 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1088 | 1091 | let change = (claimedAmount - amountToExchange) | |
1089 | 1092 | let changeEntry = if ((change > 0)) | |
1090 | 1093 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1091 | 1094 | else nil | |
1092 | 1095 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1093 | 1096 | } | |
1094 | 1097 | ||
1095 | 1098 | ||
1096 | 1099 | ||
1097 | 1100 | @Callable(i) | |
1098 | 1101 | func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = if (if ((type != SF_POOL)) | |
1099 | 1102 | then (type != WX_POOL) | |
1100 | 1103 | else false) | |
1101 | 1104 | then throw("Wrong type") | |
1102 | 1105 | else { | |
1103 | - | let $ | |
1104 | - | let aId = $ | |
1105 | - | let bId = $ | |
1106 | - | let aBal = $ | |
1107 | - | let bBal = $ | |
1108 | - | let shareId = $ | |
1106 | + | let $t03865238746 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1107 | + | let aId = $t03865238746._1 | |
1108 | + | let bId = $t03865238746._2 | |
1109 | + | let aBal = $t03865238746._3 | |
1110 | + | let bBal = $t03865238746._4 | |
1111 | + | let shareId = $t03865238746._5 | |
1109 | 1112 | [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)] | |
1110 | 1113 | } | |
1111 | 1114 | ||
1112 | 1115 | ||
1113 | 1116 | ||
1114 | 1117 | @Callable(i) | |
1115 | 1118 | func capitalizeTest (pool,pType,tokenId,tokenAmount) = { | |
1116 | 1119 | let poolAddr = Address(fromBase58String(pool)) | |
1117 | - | let $ | |
1118 | - | let AId = $ | |
1119 | - | let BId = $ | |
1120 | - | let balA = $ | |
1121 | - | let balB = $ | |
1122 | - | let shareId = $ | |
1123 | - | let $ | |
1120 | + | let $t03954239621 = getPoolData(poolAddr, pType) | |
1121 | + | let AId = $t03954239621._1 | |
1122 | + | let BId = $t03954239621._2 | |
1123 | + | let balA = $t03954239621._3 | |
1124 | + | let balB = $t03954239621._4 | |
1125 | + | let shareId = $t03954239621._5 | |
1126 | + | let $t03962439704 = if ((tokenId == AId)) | |
1124 | 1127 | then $Tuple2(tokenAmount, 0) | |
1125 | 1128 | else $Tuple2(0, tokenAmount) | |
1126 | - | let pmtA = $ | |
1127 | - | let pmtB = $ | |
1128 | - | let $ | |
1129 | - | let stakedAmount = $ | |
1130 | - | let nf = $ | |
1129 | + | let pmtA = $t03962439704._1 | |
1130 | + | let pmtB = $t03962439704._2 | |
1131 | + | let $t03970739811 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1132 | + | let stakedAmount = $t03970739811._1 | |
1133 | + | let nf = $t03970739811._2 | |
1131 | 1134 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
1132 | 1135 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
1133 | 1136 | let totalShareAmount = getPoolTotalShare(pool) | |
1134 | 1137 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
1135 | 1138 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
1136 | 1139 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
1137 | 1140 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
1138 | 1141 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
1139 | 1142 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
1140 | 1143 | else 0 | |
1141 | 1144 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
1142 | 1145 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
1143 | 1146 | else 0 | |
1144 | 1147 | let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
1145 | 1148 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
1146 | 1149 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
1147 | 1150 | if ((axlyFee == axlyFee)) | |
1148 | 1151 | 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)) | |
1149 | 1152 | else throw("Strict value is not equal to itself.") | |
1150 | 1153 | } | |
1151 | 1154 | ||
1152 | 1155 | ||
1153 | 1156 | ||
1154 | 1157 | @Callable(i) | |
1155 | 1158 | func claimFarmedTest (type,pool) = if ((type == SF_POOL)) | |
1156 | 1159 | then { | |
1157 | 1160 | let balBefore = accountBalance(SWOPID) | |
1158 | 1161 | if ((balBefore == balBefore)) | |
1159 | 1162 | then { | |
1160 | 1163 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
1161 | 1164 | if ((inv == inv)) | |
1162 | 1165 | then { | |
1163 | 1166 | let balAfter = accountBalance(SWOPID) | |
1164 | 1167 | $Tuple2(nil, $Tuple2((balAfter - balBefore), SWOPID)) | |
1165 | 1168 | } | |
1166 | 1169 | else throw("Strict value is not equal to itself.") | |
1167 | 1170 | } | |
1168 | 1171 | else throw("Strict value is not equal to itself.") | |
1169 | 1172 | } | |
1170 | 1173 | else if ((type == WX_POOL)) | |
1171 | 1174 | then { | |
1172 | 1175 | let balBefore = accountBalance(WXID) | |
1173 | 1176 | if ((balBefore == balBefore)) | |
1174 | 1177 | then { | |
1175 | 1178 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
1176 | 1179 | if ((inv == inv)) | |
1177 | 1180 | then { | |
1178 | 1181 | let balAfter = accountBalance(WXID) | |
1179 | 1182 | $Tuple2(nil, $Tuple2((balAfter - balBefore), WXID)) | |
1180 | 1183 | } | |
1181 | 1184 | else throw("Strict value is not equal to itself.") | |
1182 | 1185 | } | |
1183 | 1186 | else throw("Strict value is not equal to itself.") | |
1184 | 1187 | } | |
1185 | 1188 | else throw("Wrong pool type") | |
1186 | 1189 | ||
1187 | 1190 | ||
1188 | 1191 | @Verifier(tx) | |
1189 | 1192 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1190 | 1193 |
github/deemru/w8io/026f985 151.68 ms ◑