tx · 71ZBgz93Z1nyQaB7fPCbPmjCrZzSAjAeDTumkK46pxSz 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.54000000 Waves 2023.10.19 11:02 [2805187] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "71ZBgz93Z1nyQaB7fPCbPmjCrZzSAjAeDTumkK46pxSz", "fee": 54000000, "feeAssetId": null, "timestamp": 1697702554456, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "5n5nivsep6vDsUUsRsdQit3cq9qXEh6t8bSwXtvbSxa7zTLpd3kEvLixxMKdjhTEkknbs5Pj1DDDBe9WnpE469CC" ], "script": "base64:BgKiAQgCEgMKAQgSAwoBCBIECgIICBIFCgMIGBgSBQoDCAEIEgQKAggBEgYKBAEICAESBQoDAQgIEg8KDQgICAgICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEgcKBQgICAEEEgUKAwgEARIMCgoICAgBAQEBAQEEEgkKBwgBAQEBAQESABIAEgASABIAEgASABIAEgMKAQgSAwoBCIUBAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gABENQTU0CBGNwbW0ABEZMQVQCBGZsYXQAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUAB1NDQUxFMTYJALYCAQCAgIT+pt7hEQAKRkVFX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prev: 4UTFAedCYskK15BEPCtDcX6UhYyJtqYyvd5fe3NAzfPH Next: 5XNh4ePEYR6x3AQF8QDp4tz7AbM2fQ28sfL9JeKAfE2C Diff:
Old | New | Differences | |
---|---|---|---|
645 | 645 | ||
646 | 646 | ||
647 | 647 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
648 | - | let $ | |
648 | + | let $t01912020355 = if ((pType == SF_POOL)) | |
649 | 649 | then { | |
650 | 650 | let inv = { | |
651 | 651 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
670 | 670 | else if ((pType == WX_POOL)) | |
671 | 671 | then if ((valueOrElse(getString(this, (toString(poolAddr) + kPoolType)), "cpmm") == FLAT)) | |
672 | 672 | then { | |
673 | - | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", [shareId, userCanWithdraw], nil) | |
673 | + | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", ["", shareId, userCanWithdraw, toString(this)], nil) | |
674 | 674 | if ((inv == inv)) | |
675 | 675 | then { | |
676 | - | let $ | |
676 | + | let $t01961320110 = match inv { | |
677 | 677 | case _ => | |
678 | 678 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
679 | 679 | then if ($isInstanceOf($match0._2, "Int")) | |
702 | 702 | } | |
703 | 703 | else throw("Couldn't cast types") | |
704 | 704 | } | |
705 | - | let outAmAmt = $ | |
706 | - | let outPrAmt = $ | |
707 | - | let amBalance = $ | |
708 | - | let prBalance = $ | |
709 | - | let lpEmission = $ | |
710 | - | let curPrice = $ | |
711 | - | let poolStatus = $ | |
705 | + | let outAmAmt = $t01961320110._1 | |
706 | + | let outPrAmt = $t01961320110._2 | |
707 | + | let amBalance = $t01961320110._3 | |
708 | + | let prBalance = $t01961320110._4 | |
709 | + | let lpEmission = $t01961320110._5 | |
710 | + | let curPrice = $t01961320110._6 | |
711 | + | let poolStatus = $t01961320110._7 | |
712 | 712 | $Tuple2(outAmAmt, outPrAmt) | |
713 | 713 | } | |
714 | 714 | else throw("Strict value is not equal to itself.") | |
725 | 725 | else throw("Strict value is not equal to itself.") | |
726 | 726 | } | |
727 | 727 | else unknownPoolType() | |
728 | - | let amountA = $ | |
729 | - | let amountB = $ | |
728 | + | let amountA = $t01912020355._1 | |
729 | + | let amountB = $t01912020355._2 | |
730 | 730 | $Tuple2(amountA, amountB) | |
731 | 731 | } | |
732 | 732 | ||
748 | 748 | } | |
749 | 749 | else if ((pType == WX_POOL)) | |
750 | 750 | then { | |
751 | - | let $ | |
752 | - | let aId = $ | |
753 | - | let bId = $ | |
754 | - | let aBal = $ | |
755 | - | let bBal = $ | |
756 | - | let lpId = $ | |
751 | + | let $t02072320802 = getWXPoolData(addressFromStringValue(pool)) | |
752 | + | let aId = $t02072320802._1 | |
753 | + | let bId = $t02072320802._2 | |
754 | + | let aBal = $t02072320802._3 | |
755 | + | let bBal = $t02072320802._4 | |
756 | + | let lpId = $t02072320802._5 | |
757 | 757 | let balBefore = accountBalance(WXID) | |
758 | 758 | if ((balBefore == balBefore)) | |
759 | 759 | then { | |
775 | 775 | if ((lpBalanceBefore == lpBalanceBefore)) | |
776 | 776 | then { | |
777 | 777 | let poolAddr = addressFromStringValue(pool) | |
778 | - | let $ | |
778 | + | let $t02140021816 = if (if ((pmtA > 0)) | |
779 | 779 | then (pmtB > 0) | |
780 | 780 | else false) | |
781 | 781 | then { | |
782 | - | let $ | |
783 | - | let pmtInA = $ | |
784 | - | let pmtInB = $ | |
785 | - | let change = $ | |
786 | - | let changeId = $ | |
782 | + | let $t02146621582 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
783 | + | let pmtInA = $t02146621582._1 | |
784 | + | let pmtInB = $t02146621582._2 | |
785 | + | let change = $t02146621582._3 | |
786 | + | let changeId = $t02146621582._4 | |
787 | 787 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
788 | 788 | if ((inv == inv)) | |
789 | 789 | then $Tuple2(change, changeId) | |
794 | 794 | else if ((pmtB > 0)) | |
795 | 795 | then $Tuple2(pmtB, bId) | |
796 | 796 | else throw("pmts must be > 0") | |
797 | - | let change = $ | |
798 | - | let changeId = $ | |
797 | + | let change = $t02140021816._1 | |
798 | + | let changeId = $t02140021816._2 | |
799 | 799 | let inv = if ((change > 0)) | |
800 | 800 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
801 | 801 | else nil | |
823 | 823 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
824 | 824 | let totalAmount = getPoolTotalShare(pool) | |
825 | 825 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
826 | - | let $ | |
826 | + | let $t02267322911 = if (withLoan) | |
827 | 827 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
828 | 828 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
829 | - | let curPoolInterest = $ | |
830 | - | let totalStakedWithLoan = $ | |
829 | + | let curPoolInterest = $t02267322911._1 | |
830 | + | let totalStakedWithLoan = $t02267322911._2 | |
831 | 831 | [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))] | |
832 | 832 | } | |
833 | 833 | ||
908 | 908 | ||
909 | 909 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
910 | 910 | let poolAddr = Address(fromBase58String(pool)) | |
911 | - | let $ | |
912 | - | let AId = $ | |
913 | - | let BId = $ | |
914 | - | let balA = $ | |
915 | - | let balB = $ | |
916 | - | let shareId = $ | |
911 | + | let $t02501825084 = getPoolData(poolAddr, pType) | |
912 | + | let AId = $t02501825084._1 | |
913 | + | let BId = $t02501825084._2 | |
914 | + | let balA = $t02501825084._3 | |
915 | + | let balB = $t02501825084._4 | |
916 | + | let shareId = $t02501825084._5 | |
917 | 917 | if (if ((tokenId != AId)) | |
918 | 918 | then (tokenId != BId) | |
919 | 919 | else false) | |
930 | 930 | let axlyFeeLoan = fraction(tokensForFeeLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
931 | 931 | let axlyFeeNoLoan = fraction(tokensForFeeNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
932 | 932 | let axlyFee = (axlyFeeLoan + axlyFeeNoLoan) | |
933 | - | let $ | |
933 | + | let $t02582925929 = if ((tokenId == AId)) | |
934 | 934 | then $Tuple2((tokenAmount - axlyFee), 0) | |
935 | 935 | else $Tuple2(0, (tokenAmount - axlyFee)) | |
936 | - | let pmtA = $ | |
937 | - | let pmtB = $ | |
938 | - | let $ | |
939 | - | let stakedAmount = $ | |
940 | - | let nf = $ | |
936 | + | let pmtA = $t02582925929._1 | |
937 | + | let pmtB = $t02582925929._2 | |
938 | + | let $t02593226036 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
939 | + | let stakedAmount = $t02593226036._1 | |
940 | + | let nf = $t02593226036._2 | |
941 | 941 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
942 | 942 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
943 | 943 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
983 | 983 | let userAddr = Address(fromBase58String(user)) | |
984 | 984 | let poolAddr = Address(fromBase58String(pool)) | |
985 | 985 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
986 | - | let $ | |
987 | - | let idAStr = $ | |
988 | - | let idBStr = $ | |
989 | - | let balA = $ | |
990 | - | let balB = $ | |
991 | - | let shareId = $ | |
992 | - | let $ | |
993 | - | let idA = $ | |
994 | - | let idB = $ | |
986 | + | let $t02856528637 = getPoolData(poolAddr, pType) | |
987 | + | let idAStr = $t02856528637._1 | |
988 | + | let idBStr = $t02856528637._2 | |
989 | + | let balA = $t02856528637._3 | |
990 | + | let balB = $t02856528637._4 | |
991 | + | let shareId = $t02856528637._5 | |
992 | + | let $t02864028707 = $Tuple2(assetIdFromStr(idAStr), assetIdFromStr(idBStr)) | |
993 | + | let idA = $t02864028707._1 | |
994 | + | let idB = $t02864028707._2 | |
995 | 995 | let stopLossFee = calcStopLossFee(pool, isBorrowed, stopLoss, userCanWithdraw) | |
996 | 996 | let cBalABefore = accountBalance(idA) | |
997 | 997 | if ((cBalABefore == cBalABefore)) | |
1022 | 1022 | let cBalBAfter = accountBalance(idB) | |
1023 | 1023 | if ((cBalBAfter == cBalBAfter)) | |
1024 | 1024 | then { | |
1025 | - | let $ | |
1026 | - | let tokensAmountA = $ | |
1027 | - | let tokensAmountB = $ | |
1028 | - | let $ | |
1025 | + | let $t02940229491 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
1026 | + | let tokensAmountA = $t02940229491._1 | |
1027 | + | let tokensAmountB = $t02940229491._2 | |
1028 | + | let $t02949430730 = if (isBorrowed) | |
1029 | 1029 | then { | |
1030 | 1030 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1031 | 1031 | let debt = { | |
1074 | 1074 | else throw("Strict value is not equal to itself.") | |
1075 | 1075 | } | |
1076 | 1076 | else $Tuple2(tokensAmountA, tokensAmountB) | |
1077 | - | let toUserA = $ | |
1078 | - | let toUserB = $ | |
1077 | + | let toUserA = $t02949430730._1 | |
1078 | + | let toUserB = $t02949430730._2 | |
1079 | 1079 | let poolTotalLoanEntries = if (isBorrowed) | |
1080 | 1080 | then [IntegerEntry((pool + kPoolTotalLoan), ((poolTotalShareLoan - userCanWithdraw) - stopLossFee))] | |
1081 | 1081 | else nil | |
1121 | 1121 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
1122 | 1122 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
1123 | 1123 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
1124 | - | let $ | |
1124 | + | let $t03271232809 = if ((borrowId == aId)) | |
1125 | 1125 | then $Tuple2(dPriceA, decPrA) | |
1126 | 1126 | else $Tuple2(dPriceB, decPrB) | |
1127 | - | let borrowPrice = $ | |
1128 | - | let borrowDecPr = $ | |
1127 | + | let borrowPrice = $t03271232809._1 | |
1128 | + | let borrowDecPr = $t03271232809._2 | |
1129 | 1129 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
1130 | 1130 | } | |
1131 | 1131 | ||
1154 | 1154 | ||
1155 | 1155 | ||
1156 | 1156 | func claimAndCheckAmnt (pool,pType,claim,amount,change) = { | |
1157 | - | let $ | |
1157 | + | let $t03380934071 = if (claim) | |
1158 | 1158 | then claimFarmed(pType, pool) | |
1159 | 1159 | else { | |
1160 | 1160 | let claimedAsset = if ((pType == SF_POOL)) | |
1164 | 1164 | else unknownPoolType() | |
1165 | 1165 | $Tuple2(amount, claimedAsset) | |
1166 | 1166 | } | |
1167 | - | if (($ | |
1167 | + | if (($t03380934071 == $t03380934071)) | |
1168 | 1168 | then { | |
1169 | - | let claimAsset = $ | |
1170 | - | let claimAmount = $ | |
1169 | + | let claimAsset = $t03380934071._2 | |
1170 | + | let claimAmount = $t03380934071._1 | |
1171 | 1171 | let bal = accountBalance(claimAsset) | |
1172 | 1172 | if ((bal == bal)) | |
1173 | 1173 | then if ((amount > bal)) | |
1183 | 1183 | func getPoolInfoREADONLY (pool) = { | |
1184 | 1184 | let poolAddr = addressFromStringValue(pool) | |
1185 | 1185 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1186 | - | let $ | |
1187 | - | let AId = $ | |
1188 | - | let BId = $ | |
1189 | - | let balA = $ | |
1190 | - | let balB = $ | |
1191 | - | let shareId = $ | |
1186 | + | let $t03443834528 = getPoolData(Address(fromBase58String(pool)), pType) | |
1187 | + | let AId = $t03443834528._1 | |
1188 | + | let BId = $t03443834528._2 | |
1189 | + | let balA = $t03443834528._3 | |
1190 | + | let balB = $t03443834528._4 | |
1191 | + | let shareId = $t03443834528._5 | |
1192 | 1192 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
1193 | 1193 | $Tuple2(nil, $Tuple6(AId, BId, shareId, balA, balB, shareSupply)) | |
1194 | 1194 | } | |
1216 | 1216 | @Callable(i) | |
1217 | 1217 | func getUserPositionREADONLY (user,pools,posNum) = { | |
1218 | 1218 | func userPos (a,pool) = { | |
1219 | - | let $ | |
1220 | - | let wAmountsA = $ | |
1221 | - | let wAmountsB = $ | |
1222 | - | let debts = $ | |
1223 | - | let eqWAmountsA = $ | |
1224 | - | let eqWAmountsB = $ | |
1225 | - | let index = $ | |
1219 | + | let $t03540135471 = a | |
1220 | + | let wAmountsA = $t03540135471._1 | |
1221 | + | let wAmountsB = $t03540135471._2 | |
1222 | + | let debts = $t03540135471._3 | |
1223 | + | let eqWAmountsA = $t03540135471._4 | |
1224 | + | let eqWAmountsB = $t03540135471._5 | |
1225 | + | let index = $t03540135471._6 | |
1226 | 1226 | if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition))))) | |
1227 | 1227 | then $Tuple6((wAmountsA :+ 0), (wAmountsB :+ 0), (debts :+ 0), (eqWAmountsA :+ 0), (eqWAmountsB :+ 0), (index + 1)) | |
1228 | 1228 | else { | |
1229 | 1229 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1230 | - | let $ | |
1231 | - | let AId = $ | |
1232 | - | let BId = $ | |
1233 | - | let balA = $ | |
1234 | - | let balB = $ | |
1235 | - | let shareId = $ | |
1230 | + | let $t03575035840 = getPoolData(Address(fromBase58String(pool)), pType) | |
1231 | + | let AId = $t03575035840._1 | |
1232 | + | let BId = $t03575035840._2 | |
1233 | + | let balA = $t03575035840._3 | |
1234 | + | let balB = $t03575035840._4 | |
1235 | + | let shareId = $t03575035840._5 | |
1236 | 1236 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1237 | 1237 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1238 | - | let $ | |
1239 | - | let wAmountA = $ | |
1240 | - | let wAmountB = $ | |
1238 | + | let $t03605636176 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1239 | + | let wAmountA = $t03605636176._1 | |
1240 | + | let wAmountB = $t03605636176._2 | |
1241 | 1241 | if ((borrowAmount > 0)) | |
1242 | 1242 | then { | |
1243 | 1243 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1271 | 1271 | } | |
1272 | 1272 | else unknownPoolType() | |
1273 | 1273 | else 0 | |
1274 | - | let $ | |
1274 | + | let $t03708837307 = if ((borrowAsset == AId)) | |
1275 | 1275 | then $Tuple2(((wAmountA + amountToGetEx) - debt), (wAmountB - amountToPay)) | |
1276 | 1276 | else $Tuple2((wAmountA - amountToPay), ((wAmountB + amountToGetEx) - debt)) | |
1277 | - | let eqWAmountA = $ | |
1278 | - | let eqWAmountB = $ | |
1277 | + | let eqWAmountA = $t03708837307._1 | |
1278 | + | let eqWAmountB = $t03708837307._2 | |
1279 | 1279 | $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (eqWAmountsA :+ eqWAmountA), (eqWAmountsB :+ eqWAmountB), (index + 1)) | |
1280 | 1280 | } | |
1281 | 1281 | else throw("Strict value is not equal to itself.") | |
1284 | 1284 | } | |
1285 | 1285 | } | |
1286 | 1286 | ||
1287 | - | let $ | |
1287 | + | let $t03756237673 = { | |
1288 | 1288 | let $l = pools | |
1289 | 1289 | let $s = size($l) | |
1290 | 1290 | let $acc0 = $Tuple6(nil, nil, nil, nil, nil, 0) | |
1298 | 1298 | ||
1299 | 1299 | $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) | |
1300 | 1300 | } | |
1301 | - | let wAmountsA = $ | |
1302 | - | let wAmountsB = $ | |
1303 | - | let debts = $ | |
1304 | - | let eqWAmountsA = $ | |
1305 | - | let eqWAmountsB = $ | |
1301 | + | let wAmountsA = $t03756237673._1 | |
1302 | + | let wAmountsB = $t03756237673._2 | |
1303 | + | let debts = $t03756237673._3 | |
1304 | + | let eqWAmountsA = $t03756237673._4 | |
1305 | + | let eqWAmountsB = $t03756237673._5 | |
1306 | 1306 | $Tuple2(nil, $Tuple5(wAmountsA, wAmountsB, debts, eqWAmountsA, eqWAmountsB)) | |
1307 | 1307 | } | |
1308 | 1308 | ||
1322 | 1322 | else false) | |
1323 | 1323 | then throw("You can't borrow in this pool") | |
1324 | 1324 | else { | |
1325 | - | let $ | |
1326 | - | let AId = $ | |
1327 | - | let BId = $ | |
1328 | - | let balA = $ | |
1329 | - | let balB = $ | |
1330 | - | let shareId = $ | |
1325 | + | let $t03827138361 = getPoolData(Address(fromBase58String(pool)), pType) | |
1326 | + | let AId = $t03827138361._1 | |
1327 | + | let BId = $t03827138361._2 | |
1328 | + | let balA = $t03827138361._3 | |
1329 | + | let balB = $t03827138361._4 | |
1330 | + | let shareId = $t03827138361._5 | |
1331 | 1331 | if (if ((borrowId != AId)) | |
1332 | 1332 | then (borrowId != BId) | |
1333 | 1333 | else false) | |
1334 | 1334 | then throw("Wrong borrow asset") | |
1335 | 1335 | else { | |
1336 | - | let $ | |
1337 | - | let pmtA = $ | |
1338 | - | let pmtB = $ | |
1336 | + | let $t03844238501 = parseReplenishPmts(i.payments, AId, BId) | |
1337 | + | let pmtA = $t03844238501._1 | |
1338 | + | let pmtB = $t03844238501._2 | |
1339 | 1339 | let user = toString(i.caller) | |
1340 | 1340 | let newPosNum = getNewUserPositionNumber(user) | |
1341 | 1341 | if ((leverage > 100)) | |
1355 | 1355 | if ((inv == inv)) | |
1356 | 1356 | then { | |
1357 | 1357 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1358 | - | let $ | |
1359 | - | if (($ | |
1358 | + | let $t03949039584 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1359 | + | if (($t03949039584 == $t03949039584)) | |
1360 | 1360 | then { | |
1361 | - | let newBalB = $ | |
1362 | - | let newBalA = $ | |
1361 | + | let newBalB = $t03949039584._2 | |
1362 | + | let newBalA = $t03949039584._1 | |
1363 | 1363 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1364 | - | let $ | |
1365 | - | let wAmountA = $ | |
1366 | - | let wAmountB = $ | |
1364 | + | let $t03965439769 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1365 | + | let wAmountA = $t03965439769._1 | |
1366 | + | let wAmountB = $t03965439769._2 | |
1367 | 1367 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1368 | 1368 | } | |
1369 | 1369 | else throw("Strict value is not equal to itself.") | |
1373 | 1373 | else throw("Strict value is not equal to itself.") | |
1374 | 1374 | } | |
1375 | 1375 | else { | |
1376 | - | let $ | |
1377 | - | if (($ | |
1376 | + | let $t03982239937 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1377 | + | if (($t03982239937 == $t03982239937)) | |
1378 | 1378 | then { | |
1379 | - | let axlyFee = $ | |
1380 | - | let userStaked = $ | |
1381 | - | let $ | |
1382 | - | if (($ | |
1379 | + | let axlyFee = $t03982239937._2 | |
1380 | + | let userStaked = $t03982239937._1 | |
1381 | + | let $t03994340037 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1382 | + | if (($t03994340037 == $t03994340037)) | |
1383 | 1383 | then { | |
1384 | - | let newBalB = $ | |
1385 | - | let newBalA = $ | |
1384 | + | let newBalB = $t03994340037._2 | |
1385 | + | let newBalA = $t03994340037._1 | |
1386 | 1386 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1387 | - | let $ | |
1388 | - | let wAmountA = $ | |
1389 | - | let wAmountB = $ | |
1387 | + | let $t04010740222 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1388 | + | let wAmountA = $t04010740222._1 | |
1389 | + | let wAmountB = $t04010740222._2 | |
1390 | 1390 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1391 | 1391 | } | |
1392 | 1392 | else throw("Strict value is not equal to itself.") | |
1479 | 1479 | ||
1480 | 1480 | @Callable(i) | |
1481 | 1481 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1482 | - | let $ | |
1483 | - | let user = $ | |
1484 | - | let pool = $ | |
1485 | - | let pmtA = $ | |
1486 | - | let AId = $ | |
1487 | - | let pmtB = $ | |
1488 | - | let BId = $ | |
1489 | - | let balA = $ | |
1490 | - | let balB = $ | |
1491 | - | let shareId = $ | |
1492 | - | let bwAsset = $ | |
1493 | - | let bwAmount = $ | |
1482 | + | let $t04506145165 = parseRequest(requestId) | |
1483 | + | let user = $t04506145165._1 | |
1484 | + | let pool = $t04506145165._2 | |
1485 | + | let pmtA = $t04506145165._3 | |
1486 | + | let AId = $t04506145165._4 | |
1487 | + | let pmtB = $t04506145165._5 | |
1488 | + | let BId = $t04506145165._6 | |
1489 | + | let balA = $t04506145165._7 | |
1490 | + | let balB = $t04506145165._8 | |
1491 | + | let shareId = $t04506145165._9 | |
1492 | + | let bwAsset = $t04506145165._10 | |
1493 | + | let bwAmount = $t04506145165._11 | |
1494 | 1494 | if ((size(i.payments) != 1)) | |
1495 | 1495 | then throw("Wrong payment size") | |
1496 | 1496 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1498 | 1498 | else (i.payments[0].amount != bwAmount)) | |
1499 | 1499 | then throw("Wrong payment") | |
1500 | 1500 | else { | |
1501 | - | let $ | |
1501 | + | let $t04535545455 = if ((AId == bwAsset)) | |
1502 | 1502 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1503 | 1503 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1504 | - | let pmtAllA = $ | |
1505 | - | let pmtAllB = $ | |
1504 | + | let pmtAllA = $t04535545455._1 | |
1505 | + | let pmtAllB = $t04535545455._2 | |
1506 | 1506 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1507 | - | let $ | |
1508 | - | let userStaked = $ | |
1509 | - | let axlyFee = $ | |
1507 | + | let $t04553745652 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1508 | + | let userStaked = $t04553745652._1 | |
1509 | + | let axlyFee = $t04553745652._2 | |
1510 | 1510 | let posNum = getNewUserPositionNumber(user) | |
1511 | 1511 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1512 | 1512 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1513 | - | let $ | |
1514 | - | let wAmountA = $ | |
1515 | - | let wAmountB = $ | |
1513 | + | let $t04601246127 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1514 | + | let wAmountA = $t04601246127._1 | |
1515 | + | let wAmountB = $t04601246127._2 | |
1516 | 1516 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1517 | 1517 | } | |
1518 | 1518 | })) | |
1523 | 1523 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1524 | 1524 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1525 | 1525 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1526 | - | let $ | |
1527 | - | let AId = $ | |
1528 | - | let BId = $ | |
1529 | - | let balA = $ | |
1530 | - | let balB = $ | |
1531 | - | let shareId = $ | |
1526 | + | let $t04664846738 = getPoolData(Address(fromBase58String(pool)), pType) | |
1527 | + | let AId = $t04664846738._1 | |
1528 | + | let BId = $t04664846738._2 | |
1529 | + | let balA = $t04664846738._3 | |
1530 | + | let balB = $t04664846738._4 | |
1531 | + | let shareId = $t04664846738._5 | |
1532 | 1532 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1533 | 1533 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1534 | 1534 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1560 | 1560 | func capitalizeEx (pool,route,tokenToId,amountToExchange,claim) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1561 | 1561 | let pType = getStringValue(this, (kPool + pool)) | |
1562 | 1562 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1563 | - | let $ | |
1564 | - | if (($ | |
1563 | + | let $t04870848810 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1564 | + | if (($t04870848810 == $t04870848810)) | |
1565 | 1565 | then { | |
1566 | - | let claimedAsset = $ | |
1567 | - | let claimedAmount = $ | |
1566 | + | let claimedAsset = $t04870848810._2 | |
1567 | + | let claimedAmount = $t04870848810._1 | |
1568 | 1568 | let rArgs = split(route, "__") | |
1569 | 1569 | let exchangedAmount = if ((rArgs[0] == "directSwopfiCPMM")) | |
1570 | 1570 | then directSwopfiCPMM(rArgs, tokenToId) | |
1589 | 1589 | @Callable(i) | |
1590 | 1590 | func capitalizeNoEx (pool,claim,amountFromBalance) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1591 | 1591 | let pType = getStringValue(this, (kPool + pool)) | |
1592 | - | let $ | |
1593 | - | if (($ | |
1592 | + | let $t04949449592 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1593 | + | if (($t04949449592 == $t04949449592)) | |
1594 | 1594 | then { | |
1595 | - | let claimedAsset = $ | |
1596 | - | let claimedAmount = $ | |
1595 | + | let claimedAsset = $t04949449592._2 | |
1596 | + | let claimedAmount = $t04949449592._1 | |
1597 | 1597 | capitalize(pool, pType, assetIdToStr(claimedAsset), (claimedAmount + amountFromBalance)) | |
1598 | 1598 | } | |
1599 | 1599 | else throw("Strict value is not equal to itself.") | |
1611 | 1611 | else false) | |
1612 | 1612 | then throw("Wrong pool type") | |
1613 | 1613 | else { | |
1614 | - | let $ | |
1615 | - | let aId = $ | |
1616 | - | let bId = $ | |
1617 | - | let aBal = $ | |
1618 | - | let bBal = $ | |
1619 | - | let shareId = $ | |
1614 | + | let $t05011350207 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1615 | + | let aId = $t05011350207._1 | |
1616 | + | let bId = $t05011350207._2 | |
1617 | + | let aBal = $t05011350207._3 | |
1618 | + | let bBal = $t05011350207._4 | |
1619 | + | let shareId = $t05011350207._5 | |
1620 | 1620 | if ((0 > inFeeNoLoan)) | |
1621 | 1621 | then throw("inFeeNoLoan must be greater than 0") | |
1622 | 1622 | else if ((0 > inFeeLoan)) |
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 CPMM = "cpmm" | |
9 | 9 | ||
10 | 10 | let FLAT = "flat" | |
11 | 11 | ||
12 | 12 | let CAP_FEE_NO_LOAN = "capNoLoan" | |
13 | 13 | ||
14 | 14 | let CAP_FEE_LOAN = "capLoan" | |
15 | 15 | ||
16 | 16 | let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan" | |
17 | 17 | ||
18 | 18 | let STOPLOSS_LOAN = "stopLossLoan" | |
19 | 19 | ||
20 | 20 | let LOAN_FEE = "loan" | |
21 | 21 | ||
22 | 22 | let NO_LOAN_FEE = "noLoan" | |
23 | 23 | ||
24 | 24 | let NO_FEE = "noFee" | |
25 | 25 | ||
26 | 26 | let SCALE8 = 100000000 | |
27 | 27 | ||
28 | 28 | let SCALE10 = 10000000000 | |
29 | 29 | ||
30 | 30 | let SCALE16 = toBigInt(10000000000000000) | |
31 | 31 | ||
32 | 32 | let FEE_SCALE6 = 1000000 | |
33 | 33 | ||
34 | 34 | let kSFPoolAAssetBalance = "A_asset_balance" | |
35 | 35 | ||
36 | 36 | let kSFPoolBAssetBalance = "B_asset_balance" | |
37 | 37 | ||
38 | 38 | let kSFPoolAAssetId = "A_asset_id" | |
39 | 39 | ||
40 | 40 | let kSFPoolBAssetId = "B_asset_id" | |
41 | 41 | ||
42 | 42 | let kSFPoolShareId = "share_asset_id" | |
43 | 43 | ||
44 | 44 | let kSFPoolShareSupply = "share_asset_supply" | |
45 | 45 | ||
46 | 46 | let kSFPoolFee = "commission" | |
47 | 47 | ||
48 | 48 | let kUserPosition = "_userPosition" | |
49 | 49 | ||
50 | 50 | let kUserPositionPool = "_userPositionPool" | |
51 | 51 | ||
52 | 52 | let kUserBorrowAmount = "_userPositionBorrowAmount" | |
53 | 53 | ||
54 | 54 | let kUserBorrowAssetId = "_userPositionBorrowAssetId" | |
55 | 55 | ||
56 | 56 | let kUserPositionNum = "_userPositionNumber" | |
57 | 57 | ||
58 | 58 | let kUserPositionInterest = "_userPositionInterest" | |
59 | 59 | ||
60 | 60 | let kPoolTotal = "_poolTotal" | |
61 | 61 | ||
62 | 62 | let kPoolTotalLoan = "_poolTotalLoan" | |
63 | 63 | ||
64 | 64 | let kPoolInterestLoan = "_poolInterestLoan" | |
65 | 65 | ||
66 | 66 | let kPoolInterestNoLoan = "_poolInterestNoLoan" | |
67 | 67 | ||
68 | 68 | let kPoolCanBorrow = "_poolCanBorrow" | |
69 | 69 | ||
70 | 70 | let kAxlyInFeeWithoutLoan = "_axlyFeeNoLoan" | |
71 | 71 | ||
72 | 72 | let kAxlyInFeeWithLoan = "_axlyFeeWithLoan" | |
73 | 73 | ||
74 | 74 | let kAxlyNoLoanCapFee = "_axlyFeeCapNoLoan" | |
75 | 75 | ||
76 | 76 | let kAxlyWithLoanCapFee = "_axlyFeeCapWithLoan" | |
77 | 77 | ||
78 | 78 | let kAxlyStopLossNoLoanFee = "_axlyFeeStoplossWithLoan" | |
79 | 79 | ||
80 | 80 | let kAxlyStopLossLoanFee = "_axlyFeeStoplossNoLoan" | |
81 | 81 | ||
82 | 82 | let kRequestId = "_request_id" | |
83 | 83 | ||
84 | 84 | let kRequestIter = "requests_iter" | |
85 | 85 | ||
86 | 86 | let kPool = "pool_" | |
87 | 87 | ||
88 | 88 | let kPoolType = "_poolType" | |
89 | 89 | ||
90 | 90 | let kSharePool = "_poolShareId" | |
91 | 91 | ||
92 | 92 | let kPoolCapChange = "_poolCapChange" | |
93 | 93 | ||
94 | 94 | let kTokenLastPrice = "last_price" | |
95 | 95 | ||
96 | 96 | let kPriceInOracle = "_twap5B" | |
97 | 97 | ||
98 | 98 | let kActive = "active" | |
99 | 99 | ||
100 | 100 | let kActiveUsers = "activeUsers" | |
101 | 101 | ||
102 | 102 | let kActiveSFWX = "_active" | |
103 | 103 | ||
104 | 104 | let kPoolActive = "_activePool" | |
105 | 105 | ||
106 | 106 | let kUserStopLoss = "_stopLoss" | |
107 | 107 | ||
108 | 108 | let kFallbackExchangeSwopfi = "_fallbackExchangeSwopfi" | |
109 | 109 | ||
110 | 110 | let kMoneyBox = "axly_money_box" | |
111 | 111 | ||
112 | 112 | let kSFFarmingAddr = "swopfi_farming_addr" | |
113 | 113 | ||
114 | 114 | let kLendService = "lend_service_addr" | |
115 | 115 | ||
116 | 116 | let kOperatorCallPK = "admin_call_pub_key" | |
117 | 117 | ||
118 | 118 | let kPriceOracle = "price_oracle" | |
119 | 119 | ||
120 | 120 | let kExContract = "exchange_contract" | |
121 | 121 | ||
122 | 122 | let kWxSwapContract = "wx_swap_contract" | |
123 | 123 | ||
124 | 124 | let kSwopId = "swop_id" | |
125 | 125 | ||
126 | 126 | let kWxId = "wx_id" | |
127 | 127 | ||
128 | 128 | let kGroup1Admin1PK = "group1_admin1_pub_key" | |
129 | 129 | ||
130 | 130 | let kGroup1Admin2PK = "group1_admin2_pub_key" | |
131 | 131 | ||
132 | 132 | let kGroup2Admin1PK = "group2_admin1_pub_key" | |
133 | 133 | ||
134 | 134 | let kGroup2Admin2PK = "group2_admin2_pub_key" | |
135 | 135 | ||
136 | 136 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
137 | 137 | ||
138 | 138 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
139 | 139 | ||
140 | 140 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
141 | 141 | ||
142 | 142 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
143 | 143 | ||
144 | 144 | let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id")) | |
145 | 145 | ||
146 | 146 | let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id")) | |
147 | 147 | ||
148 | 148 | let group1Admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup1Admin1PK), "Can't get kGroup1Admin1PK")) | |
149 | 149 | ||
150 | 150 | let group1Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup1Admin2PK), "Can't get kGroup1Admin2PK")) | |
151 | 151 | ||
152 | 152 | let group2Admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin1PK), "Can't get kGroup2Admin1PK")) | |
153 | 153 | ||
154 | 154 | let group2Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin2PK), "Can't get kGroup2Admin1PK")) | |
155 | 155 | ||
156 | 156 | let operatorPK = fromBase58String(valueOrErrorMessage(getString(this, kOperatorCallPK), "Can't get operatorPK")) | |
157 | 157 | ||
158 | 158 | func unknownPoolType () = throw("Wrong pool type") | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func isOperatorCall (i) = if ((i.callerPublicKey == operatorPK)) | |
165 | 165 | then unit | |
166 | 166 | else throw("Only operator can call this function") | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func isAdminCall (i) = if (if ((i.callerPublicKey == group1Admin1PK)) | |
170 | 170 | then true | |
171 | 171 | else (i.callerPublicKey == group1Admin2PK)) | |
172 | 172 | then unit | |
173 | 173 | else throw("Only admin group1 can call this function") | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func isSelfCall (i) = if ((i.caller == this)) | |
177 | 177 | then unit | |
178 | 178 | else throw("Only contract itself can call this function") | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func isLandCall (i) = if ((i.caller == getLendSrvAddr())) | |
182 | 182 | then unit | |
183 | 183 | else throw("Only land contract can call this function") | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func isActive () = if ((valueOrElse(getBoolean(this, kActive), true) == true)) | |
187 | 187 | then unit | |
188 | 188 | else throw("DApp is inactive at this moment") | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func isActiveForUsers () = if (if (valueOrElse(getBoolean(this, kActive), true)) | |
192 | 192 | then (valueOrElse(getBoolean(this, kActiveUsers), true) == true) | |
193 | 193 | else false) | |
194 | 194 | then unit | |
195 | 195 | else throw("DApp is inactive for users at this moment") | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func isPoolActive (pool,type) = { | |
199 | 199 | let WXSFActive = valueOrElse(getBoolean(this, (type + kActiveSFWX)), true) | |
200 | 200 | let poolActive = valueOrElse(getBoolean(this, (pool + kPoolActive)), true) | |
201 | 201 | if (if (WXSFActive) | |
202 | 202 | then poolActive | |
203 | 203 | else false) | |
204 | 204 | then true | |
205 | 205 | else false | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func accountBalance (assetId) = match assetId { | |
210 | 210 | case id: ByteVector => | |
211 | 211 | assetBalance(this, id) | |
212 | 212 | case waves: Unit => | |
213 | 213 | wavesBalance(this).available | |
214 | 214 | case _ => | |
215 | 215 | throw("Match error") | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | 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")) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func getWXPoolBalances (poolAddr,aId,bId) = $Tuple2({ | |
223 | 223 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
224 | 224 | if ($isInstanceOf(@, "Int")) | |
225 | 225 | then @ | |
226 | 226 | else throw(($getType(@) + " couldn't be cast to Int")) | |
227 | 227 | }, { | |
228 | 228 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
229 | 229 | if ($isInstanceOf(@, "Int")) | |
230 | 230 | then @ | |
231 | 231 | else throw(($getType(@) + " couldn't be cast to Int")) | |
232 | 232 | }) | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func getPoolBalances (poolAddr,type,aId,bId) = if ((type == SF_POOL)) | |
236 | 236 | then getSFPoolBalances(poolAddr) | |
237 | 237 | else if ((type == WX_POOL)) | |
238 | 238 | then getWXPoolBalances(poolAddr, aId, bId) | |
239 | 239 | else unknownPoolType() | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func getSFPoolData (poolAddr) = { | |
243 | 243 | let $t080898138 = getSFPoolBalances(poolAddr) | |
244 | 244 | if (($t080898138 == $t080898138)) | |
245 | 245 | then { | |
246 | 246 | let balB = $t080898138._2 | |
247 | 247 | let balA = $t080898138._1 | |
248 | 248 | $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")) | |
249 | 249 | } | |
250 | 250 | else throw("Strict value is not equal to itself.") | |
251 | 251 | } | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | func getWXPoolData (poolAddr) = { | |
255 | 255 | let cfg = { | |
256 | 256 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
257 | 257 | if ($isInstanceOf(@, "List[Any]")) | |
258 | 258 | then @ | |
259 | 259 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
260 | 260 | } | |
261 | 261 | if ((cfg == cfg)) | |
262 | 262 | then { | |
263 | 263 | let aId = valueOrErrorMessage({ | |
264 | 264 | let @ = cfg[4] | |
265 | 265 | if ($isInstanceOf(@, "String")) | |
266 | 266 | then @ | |
267 | 267 | else unit | |
268 | 268 | }, "Can't get pool A asset id") | |
269 | 269 | let bId = valueOrErrorMessage({ | |
270 | 270 | let @ = cfg[5] | |
271 | 271 | if ($isInstanceOf(@, "String")) | |
272 | 272 | then @ | |
273 | 273 | else unit | |
274 | 274 | }, "Can't get pool B asset id") | |
275 | 275 | let shareId = valueOrErrorMessage({ | |
276 | 276 | let @ = cfg[3] | |
277 | 277 | if ($isInstanceOf(@, "String")) | |
278 | 278 | then @ | |
279 | 279 | else unit | |
280 | 280 | }, "Can't get pool LP asset id") | |
281 | 281 | let $t088358894 = getWXPoolBalances(poolAddr, aId, bId) | |
282 | 282 | if (($t088358894 == $t088358894)) | |
283 | 283 | then { | |
284 | 284 | let balB = $t088358894._2 | |
285 | 285 | let balA = $t088358894._1 | |
286 | 286 | $Tuple5(aId, bId, balA, balB, shareId) | |
287 | 287 | } | |
288 | 288 | else throw("Strict value is not equal to itself.") | |
289 | 289 | } | |
290 | 290 | else throw("Strict value is not equal to itself.") | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
295 | 295 | then getSFPoolData(poolAddr) | |
296 | 296 | else if ((type == WX_POOL)) | |
297 | 297 | then getWXPoolData(poolAddr) | |
298 | 298 | else unknownPoolType() | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
302 | 302 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
303 | 303 | else if ((type == WX_POOL)) | |
304 | 304 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
305 | 305 | else unknownPoolType() | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
309 | 309 | ||
310 | 310 | ||
311 | 311 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
318 | 318 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
319 | 319 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
320 | 320 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
321 | 321 | else if ((feeType == LOAN_FEE)) | |
322 | 322 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
323 | 323 | else if ((feeType == NO_LOAN_FEE)) | |
324 | 324 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
325 | 325 | else if ((feeType == NO_FEE)) | |
326 | 326 | then 0 | |
327 | 327 | else throw("Wrong fee type") | |
328 | 328 | ||
329 | 329 | ||
330 | 330 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | func getWXFarmingAddr (poolAddr) = { | |
334 | 334 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
335 | 335 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
336 | 336 | Address(fromBase58String(factroyCfg[1])) | |
337 | 337 | } | |
338 | 338 | ||
339 | 339 | ||
340 | 340 | func assetIdToStr (assetId) = match assetId { | |
341 | 341 | case id: ByteVector => | |
342 | 342 | toBase58String(id) | |
343 | 343 | case waves: Unit => | |
344 | 344 | "WAVES" | |
345 | 345 | case _ => | |
346 | 346 | throw("Not Asset id") | |
347 | 347 | } | |
348 | 348 | ||
349 | 349 | ||
350 | 350 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
351 | 351 | then unit | |
352 | 352 | else fromBase58String(assetId) | |
353 | 353 | ||
354 | 354 | ||
355 | 355 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
356 | 356 | then 8 | |
357 | 357 | else match assetInfo(fromBase58String(assetId)) { | |
358 | 358 | case asset: Asset => | |
359 | 359 | asset.decimals | |
360 | 360 | case _ => | |
361 | 361 | throw("Can't find asset") | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | ||
365 | 365 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
366 | 366 | ||
367 | 367 | ||
368 | 368 | func getAssetsPrice (assetIds) = { | |
369 | 369 | func getPrices (a,assetId) = { | |
370 | 370 | let assetPrice = valueOrElse(getInteger(priceOracleAddr, (assetId + kPriceInOracle)), -1) | |
371 | 371 | (a :+ assetPrice) | |
372 | 372 | } | |
373 | 373 | ||
374 | 374 | let $l = assetIds | |
375 | 375 | let $s = size($l) | |
376 | 376 | let $acc0 = nil | |
377 | 377 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
378 | 378 | then $a | |
379 | 379 | else getPrices($a, $l[$i]) | |
380 | 380 | ||
381 | 381 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
382 | 382 | then $a | |
383 | 383 | else throw("List size exceeds 50") | |
384 | 384 | ||
385 | 385 | $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) | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | func getSharePrice (shareId) = { | |
390 | 390 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
391 | 391 | let poolAddr = Address(fromBase58String(pool)) | |
392 | 392 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
393 | 393 | let $t01188311948 = getPoolData(poolAddr, pType) | |
394 | 394 | let aId = $t01188311948._1 | |
395 | 395 | let bId = $t01188311948._2 | |
396 | 396 | let aBalance = $t01188311948._3 | |
397 | 397 | let bBalance = $t01188311948._4 | |
398 | 398 | let prices = getAssetsPrice([aId, bId]) | |
399 | 399 | let dPriceA = prices[0] | |
400 | 400 | let dPriceB = prices[1] | |
401 | 401 | if (if ((0 > dPriceA)) | |
402 | 402 | then true | |
403 | 403 | else (0 > dPriceB)) | |
404 | 404 | then -1 | |
405 | 405 | else { | |
406 | 406 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
407 | 407 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
408 | 408 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
409 | 409 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
410 | 410 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
411 | 411 | fraction(sum, sharePrecision, shareSupply) | |
412 | 412 | } | |
413 | 413 | } | |
414 | 414 | ||
415 | 415 | ||
416 | 416 | func getSharePrices (shareIds) = { | |
417 | 417 | func getPrices (a,shareId) = (a :+ getSharePrice(shareId)) | |
418 | 418 | ||
419 | 419 | let $l = shareIds | |
420 | 420 | let $s = size($l) | |
421 | 421 | let $acc0 = nil | |
422 | 422 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
423 | 423 | then $a | |
424 | 424 | else getPrices($a, $l[$i]) | |
425 | 425 | ||
426 | 426 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
427 | 427 | then $a | |
428 | 428 | else throw("List size exceeds 20") | |
429 | 429 | ||
430 | 430 | $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) | |
431 | 431 | } | |
432 | 432 | ||
433 | 433 | ||
434 | 434 | func getCursEntries (aId,bId,shareId,wAmounts) = { | |
435 | 435 | let assetsPrices = getAssetsPrice([aId, bId]) | |
436 | 436 | let sharePrice = getSharePrice(shareId) | |
437 | 437 | let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts) | |
438 | 438 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
439 | 439 | } | |
440 | 440 | ||
441 | 441 | ||
442 | 442 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL)) | |
443 | 443 | then { | |
444 | 444 | let repl = { | |
445 | 445 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil) | |
446 | 446 | if ($isInstanceOf(@, "List[Any]")) | |
447 | 447 | then @ | |
448 | 448 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
449 | 449 | } | |
450 | 450 | if ((repl == repl)) | |
451 | 451 | then $Tuple5({ | |
452 | 452 | let @ = repl[3] | |
453 | 453 | if ($isInstanceOf(@, "Int")) | |
454 | 454 | then @ | |
455 | 455 | else throw(($getType(@) + " couldn't be cast to Int")) | |
456 | 456 | }, { | |
457 | 457 | let @ = repl[4] | |
458 | 458 | if ($isInstanceOf(@, "Int")) | |
459 | 459 | then @ | |
460 | 460 | else throw(($getType(@) + " couldn't be cast to Int")) | |
461 | 461 | }, { | |
462 | 462 | let @ = repl[1] | |
463 | 463 | if ($isInstanceOf(@, "Int")) | |
464 | 464 | then @ | |
465 | 465 | else throw(($getType(@) + " couldn't be cast to Int")) | |
466 | 466 | }, assetIdToStr(repl[2]), { | |
467 | 467 | let @ = repl[0] | |
468 | 468 | if ($isInstanceOf(@, "Int")) | |
469 | 469 | then @ | |
470 | 470 | else throw(($getType(@) + " couldn't be cast to Int")) | |
471 | 471 | }) | |
472 | 472 | else throw("Strict value is not equal to itself.") | |
473 | 473 | } | |
474 | 474 | else if ((pType == WX_POOL)) | |
475 | 475 | then { | |
476 | 476 | let $t01349213742 = $Tuple2(split({ | |
477 | 477 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
478 | 478 | if ($isInstanceOf(@, "String")) | |
479 | 479 | then @ | |
480 | 480 | else throw(($getType(@) + " couldn't be cast to String")) | |
481 | 481 | }, "__"), split({ | |
482 | 482 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
483 | 483 | if ($isInstanceOf(@, "String")) | |
484 | 484 | then @ | |
485 | 485 | else throw(($getType(@) + " couldn't be cast to String")) | |
486 | 486 | }, "__")) | |
487 | 487 | if (($t01349213742 == $t01349213742)) | |
488 | 488 | then { | |
489 | 489 | let evalPutInB = $t01349213742._2 | |
490 | 490 | let evalPutInA = $t01349213742._1 | |
491 | 491 | let lpInA = parseIntValue(evalPutInA[1]) | |
492 | 492 | let lpInB = parseIntValue(evalPutInB[1]) | |
493 | 493 | if ((lpInB > lpInA)) | |
494 | 494 | then { | |
495 | 495 | let pmt = parseIntValue(evalPutInA[8]) | |
496 | 496 | $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB) | |
497 | 497 | } | |
498 | 498 | else { | |
499 | 499 | let pmt = parseIntValue(evalPutInB[7]) | |
500 | 500 | $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA) | |
501 | 501 | } | |
502 | 502 | } | |
503 | 503 | else throw("Strict value is not equal to itself.") | |
504 | 504 | } | |
505 | 505 | else unknownPoolType() | |
506 | 506 | ||
507 | 507 | ||
508 | 508 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
509 | 509 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
510 | 510 | if ((pType == SF_POOL)) | |
511 | 511 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
512 | 512 | else if ((pType == WX_POOL)) | |
513 | 513 | then invoke(poolAddr, "put", [1000000, false], payments) | |
514 | 514 | else unknownPoolType() | |
515 | 515 | } | |
516 | 516 | ||
517 | 517 | ||
518 | 518 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
519 | 519 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
520 | 520 | if ((pType == SF_POOL)) | |
521 | 521 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
522 | 522 | else if ((pType == WX_POOL)) | |
523 | 523 | then { | |
524 | 524 | let fc = if ((valueOrElse(getString(this, (toString(poolAddr) + kPoolType)), "cpmm") == FLAT)) | |
525 | 525 | then "putOneTknV2" | |
526 | 526 | else "putOneTkn" | |
527 | 527 | invoke(poolAddr, fc, [0, false], payments) | |
528 | 528 | } | |
529 | 529 | else unknownPoolType() | |
530 | 530 | } | |
531 | 531 | ||
532 | 532 | ||
533 | 533 | func stakeLP (pool,pType,shareId,amount) = { | |
534 | 534 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
535 | 535 | if ((pType == SF_POOL)) | |
536 | 536 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
537 | 537 | else if ((pType == WX_POOL)) | |
538 | 538 | then invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
539 | 539 | else unknownPoolType() | |
540 | 540 | } | |
541 | 541 | ||
542 | 542 | ||
543 | 543 | func unstakeLP (pool,pType,shareId,amount) = { | |
544 | 544 | let $t01552015870 = if ((pType == SF_POOL)) | |
545 | 545 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
546 | 546 | else if ((pType == WX_POOL)) | |
547 | 547 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
548 | 548 | else unknownPoolType() | |
549 | 549 | let farmAddr = $t01552015870._1 | |
550 | 550 | let fName = $t01552015870._2 | |
551 | 551 | let params = $t01552015870._3 | |
552 | 552 | let inv = invoke(farmAddr, fName, params, nil) | |
553 | 553 | if ((inv == inv)) | |
554 | 554 | then amount | |
555 | 555 | else throw("Strict value is not equal to itself.") | |
556 | 556 | } | |
557 | 557 | ||
558 | 558 | ||
559 | 559 | func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
560 | 560 | let poolAddr = Address(fromBase58String(pool)) | |
561 | 561 | let feeScale6 = 1000000 | |
562 | 562 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
563 | 563 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
564 | 564 | let $t01629216598 = if ((assetTokenToGet == assetIdA)) | |
565 | 565 | then { | |
566 | 566 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
567 | 567 | $Tuple2(amountToPay, assetIdB) | |
568 | 568 | } | |
569 | 569 | else { | |
570 | 570 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
571 | 571 | $Tuple2(amountToPay, assetIdA) | |
572 | 572 | } | |
573 | 573 | let amountToPay = $t01629216598._1 | |
574 | 574 | let assetToPay = $t01629216598._2 | |
575 | 575 | $Tuple2(assetToPay, amountToPay) | |
576 | 576 | } | |
577 | 577 | ||
578 | 578 | ||
579 | 579 | func getWXSwapFees (pool) = { | |
580 | 580 | let poolAddr = addressFromStringValue(pool) | |
581 | 581 | let fContract = addressFromStringValue(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")) | |
582 | 582 | let poolFeeDefault = value(getInteger(wxSwapContract, "%s__poolFee")) | |
583 | 583 | let protocolFeeDefault = value(getInteger(wxSwapContract, "%s__protocolFee")) | |
584 | 584 | match invoke(fContract, "getSwapFeeREADONLY", [toString(poolAddr)], nil) { | |
585 | 585 | case fees: (Int, Int) => | |
586 | 586 | $Tuple2(fees._1, fees._2) | |
587 | 587 | case _ => | |
588 | 588 | $Tuple2(poolFeeDefault, protocolFeeDefault) | |
589 | 589 | } | |
590 | 590 | } | |
591 | 591 | ||
592 | 592 | ||
593 | 593 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
594 | 594 | let $t01733817377 = getWXSwapFees(pool) | |
595 | 595 | let pFee = $t01733817377._1 | |
596 | 596 | let prFee = $t01733817377._2 | |
597 | 597 | let feeScale = toBigInt(100000000) | |
598 | 598 | let $t01741717725 = if ((assetTokenToGet == assetIdA)) | |
599 | 599 | then { | |
600 | 600 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
601 | 601 | $Tuple2(amountToPay, assetIdB) | |
602 | 602 | } | |
603 | 603 | else { | |
604 | 604 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
605 | 605 | $Tuple2(amountToPay, assetIdA) | |
606 | 606 | } | |
607 | 607 | let amountToPay = $t01741717725._1 | |
608 | 608 | let assetToPay = $t01741717725._2 | |
609 | 609 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
610 | 610 | $Tuple2(assetToPay, amountToPayWithFee) | |
611 | 611 | } | |
612 | 612 | ||
613 | 613 | ||
614 | 614 | func exchangeDirectly (pType,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
615 | 615 | let poolFB = valueOrElse(getString(this, (pool + kFallbackExchangeSwopfi)), "") | |
616 | 616 | if (if ((pType == SF_POOL)) | |
617 | 617 | then true | |
618 | 618 | else (poolFB != "")) | |
619 | 619 | then { | |
620 | 620 | let $t01816618378 = if ((poolFB == "")) | |
621 | 621 | then $Tuple3(balA, balB, pool) | |
622 | 622 | else { | |
623 | 623 | let $t01827218345 = getSFPoolBalances(addressFromStringValue(poolFB)) | |
624 | 624 | let sfBalA = $t01827218345._1 | |
625 | 625 | let sfBalB = $t01827218345._2 | |
626 | 626 | $Tuple3(sfBalA, sfBalB, poolFB) | |
627 | 627 | } | |
628 | 628 | let pBalA = $t01816618378._1 | |
629 | 629 | let pBalB = $t01816618378._2 | |
630 | 630 | let exPool = $t01816618378._3 | |
631 | 631 | let $t01838318509 = calcAmountToPaySF(exPool, assetIdA, assetIdB, pBalA, pBalB, amountTokenToGet, assetTokenToGet) | |
632 | 632 | let assetToPay = $t01838318509._1 | |
633 | 633 | let amountToPay = $t01838318509._2 | |
634 | 634 | invoke(addressFromStringValue(exPool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
635 | 635 | } | |
636 | 636 | else if ((pType == WX_POOL)) | |
637 | 637 | then { | |
638 | 638 | let $t01871118833 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
639 | 639 | let assetToPay = $t01871118833._1 | |
640 | 640 | let amountToPay = $t01871118833._2 | |
641 | 641 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
642 | 642 | } | |
643 | 643 | else unknownPoolType() | |
644 | 644 | } | |
645 | 645 | ||
646 | 646 | ||
647 | 647 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
648 | - | let $ | |
648 | + | let $t01912020355 = if ((pType == SF_POOL)) | |
649 | 649 | then { | |
650 | 650 | let inv = { | |
651 | 651 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
652 | 652 | if ($isInstanceOf(@, "List[Any]")) | |
653 | 653 | then @ | |
654 | 654 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
655 | 655 | } | |
656 | 656 | if ((inv == inv)) | |
657 | 657 | then $Tuple2({ | |
658 | 658 | let @ = inv[0] | |
659 | 659 | if ($isInstanceOf(@, "Int")) | |
660 | 660 | then @ | |
661 | 661 | else throw(($getType(@) + " couldn't be cast to Int")) | |
662 | 662 | }, { | |
663 | 663 | let @ = inv[1] | |
664 | 664 | if ($isInstanceOf(@, "Int")) | |
665 | 665 | then @ | |
666 | 666 | else throw(($getType(@) + " couldn't be cast to Int")) | |
667 | 667 | }) | |
668 | 668 | else throw("Strict value is not equal to itself.") | |
669 | 669 | } | |
670 | 670 | else if ((pType == WX_POOL)) | |
671 | 671 | then if ((valueOrElse(getString(this, (toString(poolAddr) + kPoolType)), "cpmm") == FLAT)) | |
672 | 672 | then { | |
673 | - | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", [shareId, userCanWithdraw], nil) | |
673 | + | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", ["", shareId, userCanWithdraw, toString(this)], nil) | |
674 | 674 | if ((inv == inv)) | |
675 | 675 | then { | |
676 | - | let $ | |
676 | + | let $t01961320110 = match inv { | |
677 | 677 | case _ => | |
678 | 678 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
679 | 679 | then if ($isInstanceOf($match0._2, "Int")) | |
680 | 680 | then if ($isInstanceOf($match0._5, "Int")) | |
681 | 681 | then if ($isInstanceOf($match0._6, "Int")) | |
682 | 682 | then if ($isInstanceOf($match0._7, "Int")) | |
683 | 683 | then if ($isInstanceOf($match0._8, "String")) | |
684 | 684 | then $isInstanceOf($match0._9, "String") | |
685 | 685 | else false | |
686 | 686 | else false | |
687 | 687 | else false | |
688 | 688 | else false | |
689 | 689 | else false | |
690 | 690 | else false) | |
691 | 691 | then (size($match0) == 10) | |
692 | 692 | else false) | |
693 | 693 | then { | |
694 | 694 | let outAmAmt = $match0._1 | |
695 | 695 | let outPrAmt = $match0._2 | |
696 | 696 | let amBalance = $match0._5 | |
697 | 697 | let prBalance = $match0._6 | |
698 | 698 | let lpEmission = $match0._7 | |
699 | 699 | let curPrice = $match0._8 | |
700 | 700 | let poolStatus = $match0._9 | |
701 | 701 | $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus) | |
702 | 702 | } | |
703 | 703 | else throw("Couldn't cast types") | |
704 | 704 | } | |
705 | - | let outAmAmt = $ | |
706 | - | let outPrAmt = $ | |
707 | - | let amBalance = $ | |
708 | - | let prBalance = $ | |
709 | - | let lpEmission = $ | |
710 | - | let curPrice = $ | |
711 | - | let poolStatus = $ | |
705 | + | let outAmAmt = $t01961320110._1 | |
706 | + | let outPrAmt = $t01961320110._2 | |
707 | + | let amBalance = $t01961320110._3 | |
708 | + | let prBalance = $t01961320110._4 | |
709 | + | let lpEmission = $t01961320110._5 | |
710 | + | let curPrice = $t01961320110._6 | |
711 | + | let poolStatus = $t01961320110._7 | |
712 | 712 | $Tuple2(outAmAmt, outPrAmt) | |
713 | 713 | } | |
714 | 714 | else throw("Strict value is not equal to itself.") | |
715 | 715 | } | |
716 | 716 | else { | |
717 | 717 | let inv = split({ | |
718 | 718 | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil) | |
719 | 719 | if ($isInstanceOf(@, "String")) | |
720 | 720 | then @ | |
721 | 721 | else throw(($getType(@) + " couldn't be cast to String")) | |
722 | 722 | }, "__") | |
723 | 723 | if ((inv == inv)) | |
724 | 724 | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
725 | 725 | else throw("Strict value is not equal to itself.") | |
726 | 726 | } | |
727 | 727 | else unknownPoolType() | |
728 | - | let amountA = $ | |
729 | - | let amountB = $ | |
728 | + | let amountA = $t01912020355._1 | |
729 | + | let amountB = $t01912020355._2 | |
730 | 730 | $Tuple2(amountA, amountB) | |
731 | 731 | } | |
732 | 732 | ||
733 | 733 | ||
734 | 734 | func claimFarmed (pType,pool) = if ((pType == SF_POOL)) | |
735 | 735 | then { | |
736 | 736 | let balBefore = accountBalance(SWOPID) | |
737 | 737 | if ((balBefore == balBefore)) | |
738 | 738 | then { | |
739 | 739 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
740 | 740 | if ((inv == inv)) | |
741 | 741 | then { | |
742 | 742 | let balAfter = accountBalance(SWOPID) | |
743 | 743 | $Tuple2((balAfter - balBefore), SWOPID) | |
744 | 744 | } | |
745 | 745 | else throw("Strict value is not equal to itself.") | |
746 | 746 | } | |
747 | 747 | else throw("Strict value is not equal to itself.") | |
748 | 748 | } | |
749 | 749 | else if ((pType == WX_POOL)) | |
750 | 750 | then { | |
751 | - | let $ | |
752 | - | let aId = $ | |
753 | - | let bId = $ | |
754 | - | let aBal = $ | |
755 | - | let bBal = $ | |
756 | - | let lpId = $ | |
751 | + | let $t02072320802 = getWXPoolData(addressFromStringValue(pool)) | |
752 | + | let aId = $t02072320802._1 | |
753 | + | let bId = $t02072320802._2 | |
754 | + | let aBal = $t02072320802._3 | |
755 | + | let bBal = $t02072320802._4 | |
756 | + | let lpId = $t02072320802._5 | |
757 | 757 | let balBefore = accountBalance(WXID) | |
758 | 758 | if ((balBefore == balBefore)) | |
759 | 759 | then { | |
760 | 760 | let inv = invoke(getWXFarmingAddr(addressFromStringValue(pool)), "claimWx", [lpId], nil) | |
761 | 761 | if ((inv == inv)) | |
762 | 762 | then { | |
763 | 763 | let balAfter = accountBalance(WXID) | |
764 | 764 | $Tuple2((balAfter - balBefore), WXID) | |
765 | 765 | } | |
766 | 766 | else throw("Strict value is not equal to itself.") | |
767 | 767 | } | |
768 | 768 | else throw("Strict value is not equal to itself.") | |
769 | 769 | } | |
770 | 770 | else unknownPoolType() | |
771 | 771 | ||
772 | 772 | ||
773 | 773 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
774 | 774 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
775 | 775 | if ((lpBalanceBefore == lpBalanceBefore)) | |
776 | 776 | then { | |
777 | 777 | let poolAddr = addressFromStringValue(pool) | |
778 | - | let $ | |
778 | + | let $t02140021816 = if (if ((pmtA > 0)) | |
779 | 779 | then (pmtB > 0) | |
780 | 780 | else false) | |
781 | 781 | then { | |
782 | - | let $ | |
783 | - | let pmtInA = $ | |
784 | - | let pmtInB = $ | |
785 | - | let change = $ | |
786 | - | let changeId = $ | |
782 | + | let $t02146621582 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
783 | + | let pmtInA = $t02146621582._1 | |
784 | + | let pmtInB = $t02146621582._2 | |
785 | + | let change = $t02146621582._3 | |
786 | + | let changeId = $t02146621582._4 | |
787 | 787 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
788 | 788 | if ((inv == inv)) | |
789 | 789 | then $Tuple2(change, changeId) | |
790 | 790 | else throw("Strict value is not equal to itself.") | |
791 | 791 | } | |
792 | 792 | else if ((pmtA > 0)) | |
793 | 793 | then $Tuple2(pmtA, aId) | |
794 | 794 | else if ((pmtB > 0)) | |
795 | 795 | then $Tuple2(pmtB, bId) | |
796 | 796 | else throw("pmts must be > 0") | |
797 | - | let change = $ | |
798 | - | let changeId = $ | |
797 | + | let change = $t02140021816._1 | |
798 | + | let changeId = $t02140021816._2 | |
799 | 799 | let inv = if ((change > 0)) | |
800 | 800 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
801 | 801 | else nil | |
802 | 802 | if ((inv == inv)) | |
803 | 803 | then { | |
804 | 804 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
805 | 805 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
806 | 806 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
807 | 807 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
808 | 808 | if ((0 >= userShareForStake)) | |
809 | 809 | then throw("amount of staked sharetokens must be > 0") | |
810 | 810 | else { | |
811 | 811 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
812 | 812 | if ((invLP == invLP)) | |
813 | 813 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
814 | 814 | else throw("Strict value is not equal to itself.") | |
815 | 815 | } | |
816 | 816 | } | |
817 | 817 | else throw("Strict value is not equal to itself.") | |
818 | 818 | } | |
819 | 819 | else throw("Strict value is not equal to itself.") | |
820 | 820 | } | |
821 | 821 | ||
822 | 822 | ||
823 | 823 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
824 | 824 | let totalAmount = getPoolTotalShare(pool) | |
825 | 825 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
826 | - | let $ | |
826 | + | let $t02267322911 = if (withLoan) | |
827 | 827 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
828 | 828 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
829 | - | let curPoolInterest = $ | |
830 | - | let totalStakedWithLoan = $ | |
829 | + | let curPoolInterest = $t02267322911._1 | |
830 | + | let totalStakedWithLoan = $t02267322911._2 | |
831 | 831 | [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))] | |
832 | 832 | } | |
833 | 833 | ||
834 | 834 | ||
835 | 835 | func listToInt (a,item) = (a :+ parseIntValue(item)) | |
836 | 836 | ||
837 | 837 | ||
838 | 838 | func directSwopfiCPMM (rArgs,tokenTo) = { | |
839 | 839 | let dApp = addressFromStringValue(rArgs[1]) | |
840 | 840 | let pmtP = split(rArgs[2], "|") | |
841 | 841 | let tokenBalanceBefore = accountBalance(assetIdFromStr(tokenTo)) | |
842 | 842 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
843 | 843 | then { | |
844 | 844 | let pmt = [AttachedPayment(assetIdFromStr(pmtP[0]), parseIntValue(pmtP[1]))] | |
845 | 845 | let minToRecive = rArgs[3] | |
846 | 846 | let inv = invoke(dApp, "callFunction", ["exchange", [minToRecive]], pmt) | |
847 | 847 | if ((inv == inv)) | |
848 | 848 | then (accountBalance(assetIdFromStr(tokenTo)) - tokenBalanceBefore) | |
849 | 849 | else throw("Strict value is not equal to itself.") | |
850 | 850 | } | |
851 | 851 | else throw("Strict value is not equal to itself.") | |
852 | 852 | } | |
853 | 853 | ||
854 | 854 | ||
855 | 855 | func directRoutingSwopfi (rArgs,tokenTo) = { | |
856 | 856 | let dApp = addressFromStringValue(rArgs[1]) | |
857 | 857 | let tokenBalanceBefore = accountBalance(assetIdFromStr(tokenTo)) | |
858 | 858 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
859 | 859 | then { | |
860 | 860 | let pmt = { | |
861 | 861 | let pmtP = split(rArgs[2], "|") | |
862 | 862 | [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))] | |
863 | 863 | } | |
864 | 864 | let args = { | |
865 | 865 | let eArgs = split(rArgs[3], "|") | |
866 | 866 | let exchangers = split(eArgs[0], ",") | |
867 | 867 | let exchangersType = split(eArgs[1], ",") | |
868 | 868 | let args1 = { | |
869 | 869 | let $l = split(eArgs[2], ",") | |
870 | 870 | let $s = size($l) | |
871 | 871 | let $acc0 = nil | |
872 | 872 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
873 | 873 | then $a | |
874 | 874 | else listToInt($a, $l[$i]) | |
875 | 875 | ||
876 | 876 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
877 | 877 | then $a | |
878 | 878 | else throw("List size exceeds 3") | |
879 | 879 | ||
880 | 880 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
881 | 881 | } | |
882 | 882 | let args2 = { | |
883 | 883 | let $l = split(eArgs[3], ",") | |
884 | 884 | let $s = size($l) | |
885 | 885 | let $acc0 = nil | |
886 | 886 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
887 | 887 | then $a | |
888 | 888 | else listToInt($a, $l[$i]) | |
889 | 889 | ||
890 | 890 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
891 | 891 | then $a | |
892 | 892 | else throw("List size exceeds 3") | |
893 | 893 | ||
894 | 894 | $f1_2($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3) | |
895 | 895 | } | |
896 | 896 | let routingAssetsKeys = split(eArgs[4], ",") | |
897 | 897 | let minToRecive = parseIntValue(eArgs[5]) | |
898 | 898 | [exchangers, exchangersType, args1, args2, routingAssetsKeys, minToRecive] | |
899 | 899 | } | |
900 | 900 | let inv = invoke(dApp, "routingTrade", args, pmt) | |
901 | 901 | if ((inv == inv)) | |
902 | 902 | then (accountBalance(assetIdFromStr(tokenTo)) - tokenBalanceBefore) | |
903 | 903 | else throw("Strict value is not equal to itself.") | |
904 | 904 | } | |
905 | 905 | else throw("Strict value is not equal to itself.") | |
906 | 906 | } | |
907 | 907 | ||
908 | 908 | ||
909 | 909 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
910 | 910 | let poolAddr = Address(fromBase58String(pool)) | |
911 | - | let $ | |
912 | - | let AId = $ | |
913 | - | let BId = $ | |
914 | - | let balA = $ | |
915 | - | let balB = $ | |
916 | - | let shareId = $ | |
911 | + | let $t02501825084 = getPoolData(poolAddr, pType) | |
912 | + | let AId = $t02501825084._1 | |
913 | + | let BId = $t02501825084._2 | |
914 | + | let balA = $t02501825084._3 | |
915 | + | let balB = $t02501825084._4 | |
916 | + | let shareId = $t02501825084._5 | |
917 | 917 | if (if ((tokenId != AId)) | |
918 | 918 | then (tokenId != BId) | |
919 | 919 | else false) | |
920 | 920 | then throw("Wrong asset") | |
921 | 921 | else { | |
922 | 922 | let totalShareAmount = getPoolTotalShare(pool) | |
923 | 923 | if ((totalShareAmount == 0)) | |
924 | 924 | then [ScriptTransfer(moneyBox, tokenAmount, fromBase58String(tokenId))] | |
925 | 925 | else { | |
926 | 926 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
927 | 927 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
928 | 928 | let tokensForFeeLoan = fraction(tokenAmount, loanPercent, SCALE8) | |
929 | 929 | let tokensForFeeNoLoan = (tokenAmount - tokensForFeeLoan) | |
930 | 930 | let axlyFeeLoan = fraction(tokensForFeeLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
931 | 931 | let axlyFeeNoLoan = fraction(tokensForFeeNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
932 | 932 | let axlyFee = (axlyFeeLoan + axlyFeeNoLoan) | |
933 | - | let $ | |
933 | + | let $t02582925929 = if ((tokenId == AId)) | |
934 | 934 | then $Tuple2((tokenAmount - axlyFee), 0) | |
935 | 935 | else $Tuple2(0, (tokenAmount - axlyFee)) | |
936 | - | let pmtA = $ | |
937 | - | let pmtB = $ | |
938 | - | let $ | |
939 | - | let stakedAmount = $ | |
940 | - | let nf = $ | |
936 | + | let pmtA = $t02582925929._1 | |
937 | + | let pmtB = $t02582925929._2 | |
938 | + | let $t02593226036 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
939 | + | let stakedAmount = $t02593226036._1 | |
940 | + | let nf = $t02593226036._2 | |
941 | 941 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
942 | 942 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
943 | 943 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
944 | 944 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
945 | 945 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
946 | 946 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
947 | 947 | else 0 | |
948 | 948 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
949 | 949 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
950 | 950 | else 0 | |
951 | 951 | ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), (totalShareAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), (totalShareAmountWithLoan + stakedLoan)), ScriptTransfer(moneyBox, axlyFee, assetIdFromStr(tokenId))] ++ getCursEntries(AId, BId, shareId, nil)) | |
952 | 952 | } | |
953 | 953 | } | |
954 | 954 | } | |
955 | 955 | ||
956 | 956 | ||
957 | 957 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
958 | 958 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
959 | 959 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
960 | 960 | let poolInterest = if (borrowed) | |
961 | 961 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
962 | 962 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
963 | 963 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
964 | 964 | } | |
965 | 965 | ||
966 | 966 | ||
967 | 967 | func calcStopLossFee (pool,isBorrowed,stopLoss,lpWithdraw) = { | |
968 | 968 | let feeType = if (isBorrowed) | |
969 | 969 | then STOPLOSS_LOAN | |
970 | 970 | else STOPLOSS_FEE_NO_LOAN | |
971 | 971 | if (stopLoss) | |
972 | 972 | then fraction(lpWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6) | |
973 | 973 | else 0 | |
974 | 974 | } | |
975 | 975 | ||
976 | 976 | ||
977 | 977 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
978 | 978 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
979 | 979 | let isBorrowed = (valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) > 0) | |
980 | 980 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, isBorrowed) | |
981 | 981 | let poolTotalShare = getPoolTotalShare(pool) | |
982 | 982 | let poolTotalShareLoan = getPoolTotalShareWithLoan(pool) | |
983 | 983 | let userAddr = Address(fromBase58String(user)) | |
984 | 984 | let poolAddr = Address(fromBase58String(pool)) | |
985 | 985 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
986 | - | let $ | |
987 | - | let idAStr = $ | |
988 | - | let idBStr = $ | |
989 | - | let balA = $ | |
990 | - | let balB = $ | |
991 | - | let shareId = $ | |
992 | - | let $ | |
993 | - | let idA = $ | |
994 | - | let idB = $ | |
986 | + | let $t02856528637 = getPoolData(poolAddr, pType) | |
987 | + | let idAStr = $t02856528637._1 | |
988 | + | let idBStr = $t02856528637._2 | |
989 | + | let balA = $t02856528637._3 | |
990 | + | let balB = $t02856528637._4 | |
991 | + | let shareId = $t02856528637._5 | |
992 | + | let $t02864028707 = $Tuple2(assetIdFromStr(idAStr), assetIdFromStr(idBStr)) | |
993 | + | let idA = $t02864028707._1 | |
994 | + | let idB = $t02864028707._2 | |
995 | 995 | let stopLossFee = calcStopLossFee(pool, isBorrowed, stopLoss, userCanWithdraw) | |
996 | 996 | let cBalABefore = accountBalance(idA) | |
997 | 997 | if ((cBalABefore == cBalABefore)) | |
998 | 998 | then { | |
999 | 999 | let cBalBBefore = accountBalance(idB) | |
1000 | 1000 | if ((cBalBBefore == cBalBBefore)) | |
1001 | 1001 | then { | |
1002 | 1002 | let inv = if ((pType == SF_POOL)) | |
1003 | 1003 | then { | |
1004 | 1004 | let inv = unstakeLP(pool, pType, shareId, stopLossFee) | |
1005 | 1005 | if ((inv == inv)) | |
1006 | 1006 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
1007 | 1007 | else throw("Strict value is not equal to itself.") | |
1008 | 1008 | } | |
1009 | 1009 | else if ((pType == WX_POOL)) | |
1010 | 1010 | then { | |
1011 | 1011 | let inv = unstakeLP(pool, pType, shareId, (userCanWithdraw + stopLossFee)) | |
1012 | 1012 | if ((inv == inv)) | |
1013 | 1013 | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
1014 | 1014 | else throw("Strict value is not equal to itself.") | |
1015 | 1015 | } | |
1016 | 1016 | else unknownPoolType() | |
1017 | 1017 | if ((inv == inv)) | |
1018 | 1018 | then { | |
1019 | 1019 | let cBalAAfter = accountBalance(idA) | |
1020 | 1020 | if ((cBalAAfter == cBalAAfter)) | |
1021 | 1021 | then { | |
1022 | 1022 | let cBalBAfter = accountBalance(idB) | |
1023 | 1023 | if ((cBalBAfter == cBalBAfter)) | |
1024 | 1024 | then { | |
1025 | - | let $ | |
1026 | - | let tokensAmountA = $ | |
1027 | - | let tokensAmountB = $ | |
1028 | - | let $ | |
1025 | + | let $t02940229491 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
1026 | + | let tokensAmountA = $t02940229491._1 | |
1027 | + | let tokensAmountB = $t02940229491._2 | |
1028 | + | let $t02949430730 = if (isBorrowed) | |
1029 | 1029 | then { | |
1030 | 1030 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1031 | 1031 | let debt = { | |
1032 | 1032 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil) | |
1033 | 1033 | if ($isInstanceOf(@, "Int")) | |
1034 | 1034 | then @ | |
1035 | 1035 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1036 | 1036 | } | |
1037 | 1037 | if ((debt == debt)) | |
1038 | 1038 | then { | |
1039 | 1039 | let amountToGetEx = if (if ((borrowAsset == idAStr)) | |
1040 | 1040 | then (debt > tokensAmountA) | |
1041 | 1041 | else false) | |
1042 | 1042 | then (debt - tokensAmountA) | |
1043 | 1043 | else if (if ((borrowAsset == idBStr)) | |
1044 | 1044 | then (debt > tokensAmountB) | |
1045 | 1045 | else false) | |
1046 | 1046 | then (debt - tokensAmountB) | |
1047 | 1047 | else 0 | |
1048 | 1048 | let exInv = if ((amountToGetEx > 0)) | |
1049 | 1049 | then exchangeDirectly(pType, pool, idAStr, idBStr, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset) | |
1050 | 1050 | else nil | |
1051 | 1051 | if ((exInv == exInv)) | |
1052 | 1052 | then { | |
1053 | 1053 | let cBalAAfterRepay = accountBalance(idA) | |
1054 | 1054 | if ((cBalAAfterRepay == cBalAAfterRepay)) | |
1055 | 1055 | then { | |
1056 | 1056 | let cBalBAfterRepay = accountBalance(idB) | |
1057 | 1057 | if ((cBalBAfterRepay == cBalBAfterRepay)) | |
1058 | 1058 | then { | |
1059 | 1059 | let closeDbtInv = if ((debt > 0)) | |
1060 | 1060 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
1061 | 1061 | else 0 | |
1062 | 1062 | if ((closeDbtInv == closeDbtInv)) | |
1063 | 1063 | then if ((borrowAsset == idAStr)) | |
1064 | 1064 | then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore)) | |
1065 | 1065 | else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt)) | |
1066 | 1066 | else throw("Strict value is not equal to itself.") | |
1067 | 1067 | } | |
1068 | 1068 | else throw("Strict value is not equal to itself.") | |
1069 | 1069 | } | |
1070 | 1070 | else throw("Strict value is not equal to itself.") | |
1071 | 1071 | } | |
1072 | 1072 | else throw("Strict value is not equal to itself.") | |
1073 | 1073 | } | |
1074 | 1074 | else throw("Strict value is not equal to itself.") | |
1075 | 1075 | } | |
1076 | 1076 | else $Tuple2(tokensAmountA, tokensAmountB) | |
1077 | - | let toUserA = $ | |
1078 | - | let toUserB = $ | |
1077 | + | let toUserA = $t02949430730._1 | |
1078 | + | let toUserB = $t02949430730._2 | |
1079 | 1079 | let poolTotalLoanEntries = if (isBorrowed) | |
1080 | 1080 | then [IntegerEntry((pool + kPoolTotalLoan), ((poolTotalShareLoan - userCanWithdraw) - stopLossFee))] | |
1081 | 1081 | else nil | |
1082 | 1082 | 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, toUserA, idA), ScriptTransfer(userAddr, toUserB, idB), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ poolTotalLoanEntries) ++ getCursEntries(idAStr, idBStr, shareId, nil)) | |
1083 | 1083 | $Tuple2(entries, [toUserA, toUserB]) | |
1084 | 1084 | } | |
1085 | 1085 | else throw("Strict value is not equal to itself.") | |
1086 | 1086 | } | |
1087 | 1087 | else throw("Strict value is not equal to itself.") | |
1088 | 1088 | } | |
1089 | 1089 | else throw("Strict value is not equal to itself.") | |
1090 | 1090 | } | |
1091 | 1091 | else throw("Strict value is not equal to itself.") | |
1092 | 1092 | } | |
1093 | 1093 | else throw("Strict value is not equal to itself.") | |
1094 | 1094 | } | |
1095 | 1095 | ||
1096 | 1096 | ||
1097 | 1097 | func parseRequest (requestId) = { | |
1098 | 1098 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
1099 | 1099 | let user = request[0] | |
1100 | 1100 | let pool = request[1] | |
1101 | 1101 | let pmtA = parseIntValue(request[2]) | |
1102 | 1102 | let AId = request[3] | |
1103 | 1103 | let pmtB = parseIntValue(request[4]) | |
1104 | 1104 | let BId = request[5] | |
1105 | 1105 | let balA = parseIntValue(request[6]) | |
1106 | 1106 | let balB = parseIntValue(request[7]) | |
1107 | 1107 | let shareId = request[8] | |
1108 | 1108 | let bwAsset = request[9] | |
1109 | 1109 | let bwAmount = parseIntValue(request[10]) | |
1110 | 1110 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
1111 | 1111 | } | |
1112 | 1112 | ||
1113 | 1113 | ||
1114 | 1114 | func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = if (if ((borrowId != aId)) | |
1115 | 1115 | then (borrowId != bId) | |
1116 | 1116 | else false) | |
1117 | 1117 | then throw("Wrong borrow asset") | |
1118 | 1118 | else { | |
1119 | 1119 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
1120 | 1120 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
1121 | 1121 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
1122 | 1122 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
1123 | 1123 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
1124 | - | let $ | |
1124 | + | let $t03271232809 = if ((borrowId == aId)) | |
1125 | 1125 | then $Tuple2(dPriceA, decPrA) | |
1126 | 1126 | else $Tuple2(dPriceB, decPrB) | |
1127 | - | let borrowPrice = $ | |
1128 | - | let borrowDecPr = $ | |
1127 | + | let borrowPrice = $t03271232809._1 | |
1128 | + | let borrowDecPr = $t03271232809._2 | |
1129 | 1129 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
1130 | 1130 | } | |
1131 | 1131 | ||
1132 | 1132 | ||
1133 | 1133 | func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2)) | |
1134 | 1134 | then if ((assetIdToStr(pmts[0].assetId) != AId)) | |
1135 | 1135 | then throw("Wrong payment asset A") | |
1136 | 1136 | else if ((assetIdToStr(pmts[1].assetId) != BId)) | |
1137 | 1137 | then throw("Wrong payment asset B") | |
1138 | 1138 | else $Tuple2(pmts[0].amount, pmts[1].amount) | |
1139 | 1139 | else if ((size(pmts) == 1)) | |
1140 | 1140 | then if ((assetIdToStr(pmts[0].assetId) == AId)) | |
1141 | 1141 | then $Tuple2(pmts[0].amount, 0) | |
1142 | 1142 | else if ((assetIdToStr(pmts[0].assetId) == BId)) | |
1143 | 1143 | then $Tuple2(0, pmts[0].amount) | |
1144 | 1144 | else throw("Wrong payment") | |
1145 | 1145 | else throw("One or two payments expected") | |
1146 | 1146 | ||
1147 | 1147 | ||
1148 | 1148 | func calcPriceImpact (balA,balB,newBalA,newBalB) = { | |
1149 | 1149 | let pri = ((SCALE8 - fraction(fraction(balB, SCALE8, balA), SCALE8, fraction(newBalB, SCALE8, newBalA))) * 100) | |
1150 | 1150 | if ((0 > pri)) | |
1151 | 1151 | then (pri * -1) | |
1152 | 1152 | else pri | |
1153 | 1153 | } | |
1154 | 1154 | ||
1155 | 1155 | ||
1156 | 1156 | func claimAndCheckAmnt (pool,pType,claim,amount,change) = { | |
1157 | - | let $ | |
1157 | + | let $t03380934071 = if (claim) | |
1158 | 1158 | then claimFarmed(pType, pool) | |
1159 | 1159 | else { | |
1160 | 1160 | let claimedAsset = if ((pType == SF_POOL)) | |
1161 | 1161 | then SWOPID | |
1162 | 1162 | else if ((pType == WX_POOL)) | |
1163 | 1163 | then WXID | |
1164 | 1164 | else unknownPoolType() | |
1165 | 1165 | $Tuple2(amount, claimedAsset) | |
1166 | 1166 | } | |
1167 | - | if (($ | |
1167 | + | if (($t03380934071 == $t03380934071)) | |
1168 | 1168 | then { | |
1169 | - | let claimAsset = $ | |
1170 | - | let claimAmount = $ | |
1169 | + | let claimAsset = $t03380934071._2 | |
1170 | + | let claimAmount = $t03380934071._1 | |
1171 | 1171 | let bal = accountBalance(claimAsset) | |
1172 | 1172 | if ((bal == bal)) | |
1173 | 1173 | then if ((amount > bal)) | |
1174 | 1174 | then throw("To big amount to exchange") | |
1175 | 1175 | else $Tuple2(claimAmount, claimAsset) | |
1176 | 1176 | else throw("Strict value is not equal to itself.") | |
1177 | 1177 | } | |
1178 | 1178 | else throw("Strict value is not equal to itself.") | |
1179 | 1179 | } | |
1180 | 1180 | ||
1181 | 1181 | ||
1182 | 1182 | @Callable(i) | |
1183 | 1183 | func getPoolInfoREADONLY (pool) = { | |
1184 | 1184 | let poolAddr = addressFromStringValue(pool) | |
1185 | 1185 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1186 | - | let $ | |
1187 | - | let AId = $ | |
1188 | - | let BId = $ | |
1189 | - | let balA = $ | |
1190 | - | let balB = $ | |
1191 | - | let shareId = $ | |
1186 | + | let $t03443834528 = getPoolData(Address(fromBase58String(pool)), pType) | |
1187 | + | let AId = $t03443834528._1 | |
1188 | + | let BId = $t03443834528._2 | |
1189 | + | let balA = $t03443834528._3 | |
1190 | + | let balB = $t03443834528._4 | |
1191 | + | let shareId = $t03443834528._5 | |
1192 | 1192 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
1193 | 1193 | $Tuple2(nil, $Tuple6(AId, BId, shareId, balA, balB, shareSupply)) | |
1194 | 1194 | } | |
1195 | 1195 | ||
1196 | 1196 | ||
1197 | 1197 | ||
1198 | 1198 | @Callable(i) | |
1199 | 1199 | func getShareAssetPriceREADONLY (shareId) = { | |
1200 | 1200 | let sharePrices = getSharePrice(shareId) | |
1201 | 1201 | $Tuple2(nil, sharePrices) | |
1202 | 1202 | } | |
1203 | 1203 | ||
1204 | 1204 | ||
1205 | 1205 | ||
1206 | 1206 | @Callable(i) | |
1207 | 1207 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
1208 | 1208 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
1209 | 1209 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
1210 | 1210 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
1211 | 1211 | $Tuple2(nil, userCanWithdraw) | |
1212 | 1212 | } | |
1213 | 1213 | ||
1214 | 1214 | ||
1215 | 1215 | ||
1216 | 1216 | @Callable(i) | |
1217 | 1217 | func getUserPositionREADONLY (user,pools,posNum) = { | |
1218 | 1218 | func userPos (a,pool) = { | |
1219 | - | let $ | |
1220 | - | let wAmountsA = $ | |
1221 | - | let wAmountsB = $ | |
1222 | - | let debts = $ | |
1223 | - | let eqWAmountsA = $ | |
1224 | - | let eqWAmountsB = $ | |
1225 | - | let index = $ | |
1219 | + | let $t03540135471 = a | |
1220 | + | let wAmountsA = $t03540135471._1 | |
1221 | + | let wAmountsB = $t03540135471._2 | |
1222 | + | let debts = $t03540135471._3 | |
1223 | + | let eqWAmountsA = $t03540135471._4 | |
1224 | + | let eqWAmountsB = $t03540135471._5 | |
1225 | + | let index = $t03540135471._6 | |
1226 | 1226 | if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition))))) | |
1227 | 1227 | then $Tuple6((wAmountsA :+ 0), (wAmountsB :+ 0), (debts :+ 0), (eqWAmountsA :+ 0), (eqWAmountsB :+ 0), (index + 1)) | |
1228 | 1228 | else { | |
1229 | 1229 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1230 | - | let $ | |
1231 | - | let AId = $ | |
1232 | - | let BId = $ | |
1233 | - | let balA = $ | |
1234 | - | let balB = $ | |
1235 | - | let shareId = $ | |
1230 | + | let $t03575035840 = getPoolData(Address(fromBase58String(pool)), pType) | |
1231 | + | let AId = $t03575035840._1 | |
1232 | + | let BId = $t03575035840._2 | |
1233 | + | let balA = $t03575035840._3 | |
1234 | + | let balB = $t03575035840._4 | |
1235 | + | let shareId = $t03575035840._5 | |
1236 | 1236 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1237 | 1237 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1238 | - | let $ | |
1239 | - | let wAmountA = $ | |
1240 | - | let wAmountB = $ | |
1238 | + | let $t03605636176 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1239 | + | let wAmountA = $t03605636176._1 | |
1240 | + | let wAmountB = $t03605636176._2 | |
1241 | 1241 | if ((borrowAmount > 0)) | |
1242 | 1242 | then { | |
1243 | 1243 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1244 | 1244 | let debt = { | |
1245 | 1245 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil) | |
1246 | 1246 | if ($isInstanceOf(@, "Int")) | |
1247 | 1247 | then @ | |
1248 | 1248 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1249 | 1249 | } | |
1250 | 1250 | if ((debt == debt)) | |
1251 | 1251 | then { | |
1252 | 1252 | let amountToGetEx = if (if ((borrowAsset == AId)) | |
1253 | 1253 | then (debt > wAmountA) | |
1254 | 1254 | else false) | |
1255 | 1255 | then (debt - wAmountA) | |
1256 | 1256 | else if (if ((borrowAsset == BId)) | |
1257 | 1257 | then (debt > wAmountB) | |
1258 | 1258 | else false) | |
1259 | 1259 | then (debt - wAmountB) | |
1260 | 1260 | else 0 | |
1261 | 1261 | let amountToPay = if ((amountToGetEx > 0)) | |
1262 | 1262 | then if ((pType == SF_POOL)) | |
1263 | 1263 | then { | |
1264 | 1264 | let ex = calcAmountToPaySF(pool, AId, BId, balA, balB, amountToGetEx, borrowAsset) | |
1265 | 1265 | ex._2 | |
1266 | 1266 | } | |
1267 | 1267 | else if ((pType == WX_POOL)) | |
1268 | 1268 | then { | |
1269 | 1269 | let ex = calcAmountToPayWX(pool, AId, BId, balA, balB, amountToGetEx, borrowAsset) | |
1270 | 1270 | ex._2 | |
1271 | 1271 | } | |
1272 | 1272 | else unknownPoolType() | |
1273 | 1273 | else 0 | |
1274 | - | let $ | |
1274 | + | let $t03708837307 = if ((borrowAsset == AId)) | |
1275 | 1275 | then $Tuple2(((wAmountA + amountToGetEx) - debt), (wAmountB - amountToPay)) | |
1276 | 1276 | else $Tuple2((wAmountA - amountToPay), ((wAmountB + amountToGetEx) - debt)) | |
1277 | - | let eqWAmountA = $ | |
1278 | - | let eqWAmountB = $ | |
1277 | + | let eqWAmountA = $t03708837307._1 | |
1278 | + | let eqWAmountB = $t03708837307._2 | |
1279 | 1279 | $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (eqWAmountsA :+ eqWAmountA), (eqWAmountsB :+ eqWAmountB), (index + 1)) | |
1280 | 1280 | } | |
1281 | 1281 | else throw("Strict value is not equal to itself.") | |
1282 | 1282 | } | |
1283 | 1283 | else $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), debts, (wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1)) | |
1284 | 1284 | } | |
1285 | 1285 | } | |
1286 | 1286 | ||
1287 | - | let $ | |
1287 | + | let $t03756237673 = { | |
1288 | 1288 | let $l = pools | |
1289 | 1289 | let $s = size($l) | |
1290 | 1290 | let $acc0 = $Tuple6(nil, nil, nil, nil, nil, 0) | |
1291 | 1291 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1292 | 1292 | then $a | |
1293 | 1293 | else userPos($a, $l[$i]) | |
1294 | 1294 | ||
1295 | 1295 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1296 | 1296 | then $a | |
1297 | 1297 | else throw("List size exceeds 20") | |
1298 | 1298 | ||
1299 | 1299 | $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) | |
1300 | 1300 | } | |
1301 | - | let wAmountsA = $ | |
1302 | - | let wAmountsB = $ | |
1303 | - | let debts = $ | |
1304 | - | let eqWAmountsA = $ | |
1305 | - | let eqWAmountsB = $ | |
1301 | + | let wAmountsA = $t03756237673._1 | |
1302 | + | let wAmountsB = $t03756237673._2 | |
1303 | + | let debts = $t03756237673._3 | |
1304 | + | let eqWAmountsA = $t03756237673._4 | |
1305 | + | let eqWAmountsB = $t03756237673._5 | |
1306 | 1306 | $Tuple2(nil, $Tuple5(wAmountsA, wAmountsB, debts, eqWAmountsA, eqWAmountsB)) | |
1307 | 1307 | } | |
1308 | 1308 | ||
1309 | 1309 | ||
1310 | 1310 | ||
1311 | 1311 | @Callable(i) | |
1312 | 1312 | func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), { | |
1313 | 1313 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1314 | 1314 | if (!(isPoolActive(pool, pType))) | |
1315 | 1315 | then throw("Pool not active at this moment") | |
1316 | 1316 | else if (if ((100 > leverage)) | |
1317 | 1317 | then true | |
1318 | 1318 | else (leverage > 300)) | |
1319 | 1319 | then throw("Leverage can't be <100 and >300") | |
1320 | 1320 | else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow)))) | |
1321 | 1321 | then (leverage > 100) | |
1322 | 1322 | else false) | |
1323 | 1323 | then throw("You can't borrow in this pool") | |
1324 | 1324 | else { | |
1325 | - | let $ | |
1326 | - | let AId = $ | |
1327 | - | let BId = $ | |
1328 | - | let balA = $ | |
1329 | - | let balB = $ | |
1330 | - | let shareId = $ | |
1325 | + | let $t03827138361 = getPoolData(Address(fromBase58String(pool)), pType) | |
1326 | + | let AId = $t03827138361._1 | |
1327 | + | let BId = $t03827138361._2 | |
1328 | + | let balA = $t03827138361._3 | |
1329 | + | let balB = $t03827138361._4 | |
1330 | + | let shareId = $t03827138361._5 | |
1331 | 1331 | if (if ((borrowId != AId)) | |
1332 | 1332 | then (borrowId != BId) | |
1333 | 1333 | else false) | |
1334 | 1334 | then throw("Wrong borrow asset") | |
1335 | 1335 | else { | |
1336 | - | let $ | |
1337 | - | let pmtA = $ | |
1338 | - | let pmtB = $ | |
1336 | + | let $t03844238501 = parseReplenishPmts(i.payments, AId, BId) | |
1337 | + | let pmtA = $t03844238501._1 | |
1338 | + | let pmtB = $t03844238501._2 | |
1339 | 1339 | let user = toString(i.caller) | |
1340 | 1340 | let newPosNum = getNewUserPositionNumber(user) | |
1341 | 1341 | if ((leverage > 100)) | |
1342 | 1342 | then { | |
1343 | 1343 | let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId) | |
1344 | 1344 | let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",") | |
1345 | 1345 | let newRequestId = { | |
1346 | 1346 | let @ = invoke(this, "createNewRequest", [request], nil) | |
1347 | 1347 | if ($isInstanceOf(@, "Int")) | |
1348 | 1348 | then @ | |
1349 | 1349 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1350 | 1350 | } | |
1351 | 1351 | if ((newRequestId == newRequestId)) | |
1352 | 1352 | then { | |
1353 | 1353 | let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
1354 | 1354 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
1355 | 1355 | if ((inv == inv)) | |
1356 | 1356 | then { | |
1357 | 1357 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1358 | - | let $ | |
1359 | - | if (($ | |
1358 | + | let $t03949039584 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1359 | + | if (($t03949039584 == $t03949039584)) | |
1360 | 1360 | then { | |
1361 | - | let newBalB = $ | |
1362 | - | let newBalA = $ | |
1361 | + | let newBalB = $t03949039584._2 | |
1362 | + | let newBalA = $t03949039584._1 | |
1363 | 1363 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1364 | - | let $ | |
1365 | - | let wAmountA = $ | |
1366 | - | let wAmountB = $ | |
1364 | + | let $t03965439769 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1365 | + | let wAmountA = $t03965439769._1 | |
1366 | + | let wAmountB = $t03965439769._2 | |
1367 | 1367 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1368 | 1368 | } | |
1369 | 1369 | else throw("Strict value is not equal to itself.") | |
1370 | 1370 | } | |
1371 | 1371 | else throw("Strict value is not equal to itself.") | |
1372 | 1372 | } | |
1373 | 1373 | else throw("Strict value is not equal to itself.") | |
1374 | 1374 | } | |
1375 | 1375 | else { | |
1376 | - | let $ | |
1377 | - | if (($ | |
1376 | + | let $t03982239937 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1377 | + | if (($t03982239937 == $t03982239937)) | |
1378 | 1378 | then { | |
1379 | - | let axlyFee = $ | |
1380 | - | let userStaked = $ | |
1381 | - | let $ | |
1382 | - | if (($ | |
1379 | + | let axlyFee = $t03982239937._2 | |
1380 | + | let userStaked = $t03982239937._1 | |
1381 | + | let $t03994340037 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1382 | + | if (($t03994340037 == $t03994340037)) | |
1383 | 1383 | then { | |
1384 | - | let newBalB = $ | |
1385 | - | let newBalA = $ | |
1384 | + | let newBalB = $t03994340037._2 | |
1385 | + | let newBalA = $t03994340037._1 | |
1386 | 1386 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1387 | - | let $ | |
1388 | - | let wAmountA = $ | |
1389 | - | let wAmountB = $ | |
1387 | + | let $t04010740222 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1388 | + | let wAmountA = $t04010740222._1 | |
1389 | + | let wAmountB = $t04010740222._2 | |
1390 | 1390 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1391 | 1391 | } | |
1392 | 1392 | else throw("Strict value is not equal to itself.") | |
1393 | 1393 | } | |
1394 | 1394 | else throw("Strict value is not equal to itself.") | |
1395 | 1395 | } | |
1396 | 1396 | } | |
1397 | 1397 | } | |
1398 | 1398 | }) | |
1399 | 1399 | ||
1400 | 1400 | ||
1401 | 1401 | ||
1402 | 1402 | @Callable(i) | |
1403 | 1403 | func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), { | |
1404 | 1404 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1405 | 1405 | if (!(isPoolActive(pool, pType))) | |
1406 | 1406 | then throw("Pool not active at this moment") | |
1407 | 1407 | else withdrawToUser(toString(i.caller), pool, toString(posId), false) | |
1408 | 1408 | }) | |
1409 | 1409 | ||
1410 | 1410 | ||
1411 | 1411 | ||
1412 | 1412 | @Callable(i) | |
1413 | 1413 | func createUpdateStopLoss (posId,poolId,assetId,price) = valueOrElse(isActiveForUsers(), { | |
1414 | 1414 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1415 | 1415 | let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited") | |
1416 | 1416 | if (!(isPoolActive(poolId, pType))) | |
1417 | 1417 | then throw("Pool not active at this moment") | |
1418 | 1418 | else if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
1419 | 1419 | then throw("There are no user position") | |
1420 | 1420 | else if ((0 >= price)) | |
1421 | 1421 | then throw("Price must be greater than 0") | |
1422 | 1422 | else if ((price > tokenOraclePrice)) | |
1423 | 1423 | then throw("Price must be less than current token price") | |
1424 | 1424 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
1425 | 1425 | }) | |
1426 | 1426 | ||
1427 | 1427 | ||
1428 | 1428 | ||
1429 | 1429 | @Callable(i) | |
1430 | 1430 | func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), { | |
1431 | 1431 | let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited") | |
1432 | 1432 | if (!(isPoolActive(poolId, pType))) | |
1433 | 1433 | then throw("Pool not active at this moment") | |
1434 | 1434 | else if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
1435 | 1435 | then throw("No entry") | |
1436 | 1436 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))] | |
1437 | 1437 | }) | |
1438 | 1438 | ||
1439 | 1439 | ||
1440 | 1440 | ||
1441 | 1441 | @Callable(i) | |
1442 | 1442 | func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,operatorPubKey,group1Admin1PubKey,group1Admin2PubKey,group2Admin1PubKey,group2Admin2PubKey) = valueOrElse(isSelfCall(i), if (isDefined(getString(kOperatorCallPK))) | |
1443 | 1443 | then throw("Already inited") | |
1444 | 1444 | else if (!(isDefined(addressFromString(moneyBoxAddr)))) | |
1445 | 1445 | then throw("moneyBoxAddr is not correct address") | |
1446 | 1446 | else if (!(isDefined(addressFromString(sfFarmingAddr)))) | |
1447 | 1447 | then throw("sfFarmingAddr is not correct address") | |
1448 | 1448 | else if (!(isDefined(addressFromString(lendAddr)))) | |
1449 | 1449 | then throw("lendAddr is not correct address") | |
1450 | 1450 | else if (!(isDefined(addressFromString(priceOracleAddr)))) | |
1451 | 1451 | then throw("priceOracleAddr is not correct address") | |
1452 | 1452 | else if (!(isDefined(addressFromString(keeperExContract)))) | |
1453 | 1453 | then throw("keeperExContract is not correct address") | |
1454 | 1454 | else if (!(isDefined(assetInfo(fromBase58String(swopAssetId))))) | |
1455 | 1455 | then throw("swopAssetId is not correct asset id") | |
1456 | 1456 | else if (!(isDefined(assetInfo(fromBase58String(wxAssetId))))) | |
1457 | 1457 | then throw("swopAssetId is not correct asset id") | |
1458 | 1458 | else if ((size(fromBase58String(operatorPubKey)) != 32)) | |
1459 | 1459 | then throw("operatorPubKey is not correct") | |
1460 | 1460 | else if ((size(fromBase58String(group1Admin1PubKey)) != 32)) | |
1461 | 1461 | then throw("group1Admin1PubKey is not correct") | |
1462 | 1462 | else if ((size(fromBase58String(group1Admin2PubKey)) != 32)) | |
1463 | 1463 | then throw("group1Admin2PubKey is not correct") | |
1464 | 1464 | else if ((size(fromBase58String(group2Admin1PubKey)) != 32)) | |
1465 | 1465 | then throw("group2Admin1PubKey is not correct") | |
1466 | 1466 | else if ((size(fromBase58String(group2Admin2PubKey)) != 32)) | |
1467 | 1467 | then throw("group2Admin2PubKey is not correct") | |
1468 | 1468 | 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(kOperatorCallPK, operatorPubKey), StringEntry(kGroup1Admin1PK, group1Admin1PubKey), StringEntry(kGroup1Admin2PK, group1Admin2PubKey), StringEntry(kGroup2Admin1PK, group2Admin1PubKey), StringEntry(kGroup2Admin2PK, group2Admin2PubKey)]) | |
1469 | 1469 | ||
1470 | 1470 | ||
1471 | 1471 | ||
1472 | 1472 | @Callable(i) | |
1473 | 1473 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
1474 | 1474 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
1475 | 1475 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
1476 | 1476 | }) | |
1477 | 1477 | ||
1478 | 1478 | ||
1479 | 1479 | ||
1480 | 1480 | @Callable(i) | |
1481 | 1481 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1482 | - | let $ | |
1483 | - | let user = $ | |
1484 | - | let pool = $ | |
1485 | - | let pmtA = $ | |
1486 | - | let AId = $ | |
1487 | - | let pmtB = $ | |
1488 | - | let BId = $ | |
1489 | - | let balA = $ | |
1490 | - | let balB = $ | |
1491 | - | let shareId = $ | |
1492 | - | let bwAsset = $ | |
1493 | - | let bwAmount = $ | |
1482 | + | let $t04506145165 = parseRequest(requestId) | |
1483 | + | let user = $t04506145165._1 | |
1484 | + | let pool = $t04506145165._2 | |
1485 | + | let pmtA = $t04506145165._3 | |
1486 | + | let AId = $t04506145165._4 | |
1487 | + | let pmtB = $t04506145165._5 | |
1488 | + | let BId = $t04506145165._6 | |
1489 | + | let balA = $t04506145165._7 | |
1490 | + | let balB = $t04506145165._8 | |
1491 | + | let shareId = $t04506145165._9 | |
1492 | + | let bwAsset = $t04506145165._10 | |
1493 | + | let bwAmount = $t04506145165._11 | |
1494 | 1494 | if ((size(i.payments) != 1)) | |
1495 | 1495 | then throw("Wrong payment size") | |
1496 | 1496 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1497 | 1497 | then true | |
1498 | 1498 | else (i.payments[0].amount != bwAmount)) | |
1499 | 1499 | then throw("Wrong payment") | |
1500 | 1500 | else { | |
1501 | - | let $ | |
1501 | + | let $t04535545455 = if ((AId == bwAsset)) | |
1502 | 1502 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1503 | 1503 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1504 | - | let pmtAllA = $ | |
1505 | - | let pmtAllB = $ | |
1504 | + | let pmtAllA = $t04535545455._1 | |
1505 | + | let pmtAllB = $t04535545455._2 | |
1506 | 1506 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1507 | - | let $ | |
1508 | - | let userStaked = $ | |
1509 | - | let axlyFee = $ | |
1507 | + | let $t04553745652 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1508 | + | let userStaked = $t04553745652._1 | |
1509 | + | let axlyFee = $t04553745652._2 | |
1510 | 1510 | let posNum = getNewUserPositionNumber(user) | |
1511 | 1511 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1512 | 1512 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1513 | - | let $ | |
1514 | - | let wAmountA = $ | |
1515 | - | let wAmountB = $ | |
1513 | + | let $t04601246127 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1514 | + | let wAmountA = $t04601246127._1 | |
1515 | + | let wAmountB = $t04601246127._2 | |
1516 | 1516 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1517 | 1517 | } | |
1518 | 1518 | })) | |
1519 | 1519 | ||
1520 | 1520 | ||
1521 | 1521 | ||
1522 | 1522 | @Callable(i) | |
1523 | 1523 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1524 | 1524 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1525 | 1525 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1526 | - | let $ | |
1527 | - | let AId = $ | |
1528 | - | let BId = $ | |
1529 | - | let balA = $ | |
1530 | - | let balB = $ | |
1531 | - | let shareId = $ | |
1526 | + | let $t04664846738 = getPoolData(Address(fromBase58String(pool)), pType) | |
1527 | + | let AId = $t04664846738._1 | |
1528 | + | let BId = $t04664846738._2 | |
1529 | + | let balA = $t04664846738._3 | |
1530 | + | let balB = $t04664846738._4 | |
1531 | + | let shareId = $t04664846738._5 | |
1532 | 1532 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1533 | 1533 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1534 | 1534 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1535 | 1535 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1536 | 1536 | if ((liquidateAmount > userCanWithdraw)) | |
1537 | 1537 | then throw("You can't liquidate more than user have") | |
1538 | 1538 | else if ((borrowAmount == 0)) | |
1539 | 1539 | then throw("You can't liquidate position without borrow") | |
1540 | 1540 | 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))] | |
1541 | 1541 | })) | |
1542 | 1542 | ||
1543 | 1543 | ||
1544 | 1544 | ||
1545 | 1545 | @Callable(i) | |
1546 | 1546 | func stopLoss (user,posId,pool,assetId) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1547 | 1547 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1548 | 1548 | let stopLossPrice = valueOrErrorMessage(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)), "No entry") | |
1549 | 1549 | if ((tokenOraclePrice > stopLossPrice)) | |
1550 | 1550 | then throw("Token price greater stop loss price") | |
1551 | 1551 | else { | |
1552 | 1552 | let res = withdrawToUser(user, pool, toString(posId), true) | |
1553 | 1553 | $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2) | |
1554 | 1554 | } | |
1555 | 1555 | })) | |
1556 | 1556 | ||
1557 | 1557 | ||
1558 | 1558 | ||
1559 | 1559 | @Callable(i) | |
1560 | 1560 | func capitalizeEx (pool,route,tokenToId,amountToExchange,claim) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1561 | 1561 | let pType = getStringValue(this, (kPool + pool)) | |
1562 | 1562 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1563 | - | let $ | |
1564 | - | if (($ | |
1563 | + | let $t04870848810 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1564 | + | if (($t04870848810 == $t04870848810)) | |
1565 | 1565 | then { | |
1566 | - | let claimedAsset = $ | |
1567 | - | let claimedAmount = $ | |
1566 | + | let claimedAsset = $t04870848810._2 | |
1567 | + | let claimedAmount = $t04870848810._1 | |
1568 | 1568 | let rArgs = split(route, "__") | |
1569 | 1569 | let exchangedAmount = if ((rArgs[0] == "directSwopfiCPMM")) | |
1570 | 1570 | then directSwopfiCPMM(rArgs, tokenToId) | |
1571 | 1571 | else if ((rArgs[0] == "routingSwopfi")) | |
1572 | 1572 | then directRoutingSwopfi(rArgs, tokenToId) | |
1573 | 1573 | else throw("Wrong route") | |
1574 | 1574 | if ((exchangedAmount == exchangedAmount)) | |
1575 | 1575 | then { | |
1576 | 1576 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1577 | 1577 | let changeEntry = if ((newChange >= 0)) | |
1578 | 1578 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1579 | 1579 | else nil | |
1580 | 1580 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1581 | 1581 | } | |
1582 | 1582 | else throw("Strict value is not equal to itself.") | |
1583 | 1583 | } | |
1584 | 1584 | else throw("Strict value is not equal to itself.") | |
1585 | 1585 | })) | |
1586 | 1586 | ||
1587 | 1587 | ||
1588 | 1588 | ||
1589 | 1589 | @Callable(i) | |
1590 | 1590 | func capitalizeNoEx (pool,claim,amountFromBalance) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1591 | 1591 | let pType = getStringValue(this, (kPool + pool)) | |
1592 | - | let $ | |
1593 | - | if (($ | |
1592 | + | let $t04949449592 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1593 | + | if (($t04949449592 == $t04949449592)) | |
1594 | 1594 | then { | |
1595 | - | let claimedAsset = $ | |
1596 | - | let claimedAmount = $ | |
1595 | + | let claimedAsset = $t04949449592._2 | |
1596 | + | let claimedAmount = $t04949449592._1 | |
1597 | 1597 | capitalize(pool, pType, assetIdToStr(claimedAsset), (claimedAmount + amountFromBalance)) | |
1598 | 1598 | } | |
1599 | 1599 | else throw("Strict value is not equal to itself.") | |
1600 | 1600 | })) | |
1601 | 1601 | ||
1602 | 1602 | ||
1603 | 1603 | ||
1604 | 1604 | @Callable(i) | |
1605 | 1605 | func initNewPool (type,poolType,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (if ((type != SF_POOL)) | |
1606 | 1606 | then (type != WX_POOL) | |
1607 | 1607 | else false) | |
1608 | 1608 | then throw("Wrong type") | |
1609 | 1609 | else if (if ((poolType != CPMM)) | |
1610 | 1610 | then (poolType != FLAT) | |
1611 | 1611 | else false) | |
1612 | 1612 | then throw("Wrong pool type") | |
1613 | 1613 | else { | |
1614 | - | let $ | |
1615 | - | let aId = $ | |
1616 | - | let bId = $ | |
1617 | - | let aBal = $ | |
1618 | - | let bBal = $ | |
1619 | - | let shareId = $ | |
1614 | + | let $t05011350207 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1615 | + | let aId = $t05011350207._1 | |
1616 | + | let bId = $t05011350207._2 | |
1617 | + | let aBal = $t05011350207._3 | |
1618 | + | let bBal = $t05011350207._4 | |
1619 | + | let shareId = $t05011350207._5 | |
1620 | 1620 | if ((0 > inFeeNoLoan)) | |
1621 | 1621 | then throw("inFeeNoLoan must be greater than 0") | |
1622 | 1622 | else if ((0 > inFeeLoan)) | |
1623 | 1623 | then throw("inFeeLoan must be greater than 0") | |
1624 | 1624 | else if ((0 > capFeeNoLoan)) | |
1625 | 1625 | then throw("capFeeNoLoan must be greater than 0") | |
1626 | 1626 | else if ((0 > capFeeWithLoan)) | |
1627 | 1627 | then throw("capFeeWithLoan must be greater than 0") | |
1628 | 1628 | else if ((0 > stoplossFeeNoLoan)) | |
1629 | 1629 | then throw("stoplossFeeNoLoan must be greater than 0") | |
1630 | 1630 | else if ((0 > stoplossFeeWithLoan)) | |
1631 | 1631 | then throw("stoplossFeeWithLoan must be greater than 0") | |
1632 | 1632 | 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((poolAddr + kPoolType), poolType), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)] | |
1633 | 1633 | })) | |
1634 | 1634 | ||
1635 | 1635 | ||
1636 | 1636 | ||
1637 | 1637 | @Callable(i) | |
1638 | 1638 | func updatePoolFees (poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + poolAddr))))) | |
1639 | 1639 | then throw(("Can't find pool with addr " + poolAddr)) | |
1640 | 1640 | else if ((0 > inFeeNoLoan)) | |
1641 | 1641 | then throw("inFeeNoLoan must be greater than 0") | |
1642 | 1642 | else if ((0 > inFeeLoan)) | |
1643 | 1643 | then throw("inFeeLoan must be greater than 0") | |
1644 | 1644 | else if ((0 > capFeeNoLoan)) | |
1645 | 1645 | then throw("capFeeNoLoan must be greater than 0") | |
1646 | 1646 | else if ((0 > capFeeWithLoan)) | |
1647 | 1647 | then throw("capFeeWithLoan must be greater than 0") | |
1648 | 1648 | else if ((0 > stoplossFeeNoLoan)) | |
1649 | 1649 | then throw("stoplossFeeNoLoan must be greater than 0") | |
1650 | 1650 | else if ((0 > stoplossFeeWithLoan)) | |
1651 | 1651 | then throw("stoplossFeeWithLoan must be greater than 0") | |
1652 | 1652 | 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)])) | |
1653 | 1653 | ||
1654 | 1654 | ||
1655 | 1655 | ||
1656 | 1656 | @Callable(i) | |
1657 | 1657 | func activate () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActive), true)) | |
1658 | 1658 | then throw("dApp already active") | |
1659 | 1659 | else [BooleanEntry(kActive, true)]) | |
1660 | 1660 | ||
1661 | 1661 | ||
1662 | 1662 | ||
1663 | 1663 | @Callable(i) | |
1664 | 1664 | func shutdown () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActive), true))) | |
1665 | 1665 | then throw("dApp already shutdown") | |
1666 | 1666 | else [BooleanEntry(kActive, false)]) | |
1667 | 1667 | ||
1668 | 1668 | ||
1669 | 1669 | ||
1670 | 1670 | @Callable(i) | |
1671 | 1671 | func activateForUsers () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActiveUsers), true)) | |
1672 | 1672 | then throw("dApp already active for users") | |
1673 | 1673 | else [BooleanEntry(kActiveUsers, true)]) | |
1674 | 1674 | ||
1675 | 1675 | ||
1676 | 1676 | ||
1677 | 1677 | @Callable(i) | |
1678 | 1678 | func shutdownForUsers () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActiveUsers), true))) | |
1679 | 1679 | then throw("dApp already shutdown for users") | |
1680 | 1680 | else [BooleanEntry(kActiveUsers, false)]) | |
1681 | 1681 | ||
1682 | 1682 | ||
1683 | 1683 | ||
1684 | 1684 | @Callable(i) | |
1685 | 1685 | func activateSF () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true)) | |
1686 | 1686 | then throw("SWOPFI already active") | |
1687 | 1687 | else [BooleanEntry((SF_POOL + kActiveSFWX), true)]) | |
1688 | 1688 | ||
1689 | 1689 | ||
1690 | 1690 | ||
1691 | 1691 | @Callable(i) | |
1692 | 1692 | func shutdownSF () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true))) | |
1693 | 1693 | then throw("SWOPFI already shutdown") | |
1694 | 1694 | else [BooleanEntry((SF_POOL + kActiveSFWX), false)]) | |
1695 | 1695 | ||
1696 | 1696 | ||
1697 | 1697 | ||
1698 | 1698 | @Callable(i) | |
1699 | 1699 | func activateWX () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true)) | |
1700 | 1700 | then throw("WX already active") | |
1701 | 1701 | else [BooleanEntry((WX_POOL + kActiveSFWX), true)]) | |
1702 | 1702 | ||
1703 | 1703 | ||
1704 | 1704 | ||
1705 | 1705 | @Callable(i) | |
1706 | 1706 | func shutdownWX () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true))) | |
1707 | 1707 | then throw("WX already shutdown") | |
1708 | 1708 | else [BooleanEntry((WX_POOL + kActiveSFWX), false)]) | |
1709 | 1709 | ||
1710 | 1710 | ||
1711 | 1711 | ||
1712 | 1712 | @Callable(i) | |
1713 | 1713 | func activatePool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1714 | 1714 | then throw("Unknown pool") | |
1715 | 1715 | else if (valueOrElse(getBoolean(this, (pool + kPoolActive)), true)) | |
1716 | 1716 | then throw("Pool already active") | |
1717 | 1717 | else [BooleanEntry((pool + kPoolActive), true)]) | |
1718 | 1718 | ||
1719 | 1719 | ||
1720 | 1720 | ||
1721 | 1721 | @Callable(i) | |
1722 | 1722 | func shutdownPool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1723 | 1723 | then throw("Unknown pool") | |
1724 | 1724 | else if (!(valueOrElse(getBoolean(this, (pool + kPoolActive)), true))) | |
1725 | 1725 | then throw("Pool already shutdown") | |
1726 | 1726 | else [BooleanEntry((pool + kPoolActive), false)]) | |
1727 | 1727 | ||
1728 | 1728 |
github/deemru/w8io/026f985 232.52 ms ◑