tx · 4UTFAedCYskK15BEPCtDcX6UhYyJtqYyvd5fe3NAzfPH 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.54000000 Waves 2023.10.19 11:00 [2805184] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "4UTFAedCYskK15BEPCtDcX6UhYyJtqYyvd5fe3NAzfPH", "fee": 54000000, "feeAssetId": null, "timestamp": 1697702449947, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "4FctnhhHeUuooEF79MvFHhx2MPNoSKEzkRfgVjDfLtddJL58kkzqE9Lmo9RwBUhqPX9JqxNExcbnHN586P98iLM4" ], "script": "base64:BgKiAQgCEgMKAQgSAwoBCBIECgIICBIFCgMIGBgSBQoDCAEIEgQKAggBEgYKBAEICAESBQoDAQgIEg8KDQgICAgICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEgcKBQgICAEEEgUKAwgEARIMCgoICAgBAQEBAQEEEgkKBwgBAQEBAQESABIAEgASABIAEgASABIAEgMKAQgSAwoBCIUBAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gABENQTU0CBGNwbW0ABEZMQVQCBGZsYXQAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUAB1NDQUxFMTYJALYCAQCAgIT+pt7hEQAKRkVFX1NDQ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pbABnL5a2", "height": 2805184, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4M2PVDWnzvVtmNfFftF8nMZfRvKBHCoeedabQqmhBELP Next: 71ZBgz93Z1nyQaB7fPCbPmjCrZzSAjAeDTumkK46pxSz Diff:
Old | New | Differences | |
---|---|---|---|
645 | 645 | ||
646 | 646 | ||
647 | 647 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
648 | - | let $ | |
648 | + | let $t01912020334 = 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, " | |
673 | + | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", [shareId, userCanWithdraw], nil) | |
674 | 674 | if ((inv == inv)) | |
675 | 675 | then { | |
676 | - | let $ | |
676 | + | let $t01959220089 = 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 = $t01959220089._1 | |
706 | + | let outPrAmt = $t01959220089._2 | |
707 | + | let amBalance = $t01959220089._3 | |
708 | + | let prBalance = $t01959220089._4 | |
709 | + | let lpEmission = $t01959220089._5 | |
710 | + | let curPrice = $t01959220089._6 | |
711 | + | let poolStatus = $t01959220089._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 = $t01912020334._1 | |
729 | + | let amountB = $t01912020334._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 $t02070220781 = getWXPoolData(addressFromStringValue(pool)) | |
752 | + | let aId = $t02070220781._1 | |
753 | + | let bId = $t02070220781._2 | |
754 | + | let aBal = $t02070220781._3 | |
755 | + | let bBal = $t02070220781._4 | |
756 | + | let lpId = $t02070220781._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 $t02137921795 = 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 $t02144521561 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
783 | + | let pmtInA = $t02144521561._1 | |
784 | + | let pmtInB = $t02144521561._2 | |
785 | + | let change = $t02144521561._3 | |
786 | + | let changeId = $t02144521561._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 = $t02137921795._1 | |
798 | + | let changeId = $t02137921795._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 $t02265222890 = 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 = $t02265222890._1 | |
830 | + | let totalStakedWithLoan = $t02265222890._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 $t02499725063 = getPoolData(poolAddr, pType) | |
912 | + | let AId = $t02499725063._1 | |
913 | + | let BId = $t02499725063._2 | |
914 | + | let balA = $t02499725063._3 | |
915 | + | let balB = $t02499725063._4 | |
916 | + | let shareId = $t02499725063._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 $t02580825908 = 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 = $t02580825908._1 | |
937 | + | let pmtB = $t02580825908._2 | |
938 | + | let $t02591126015 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
939 | + | let stakedAmount = $t02591126015._1 | |
940 | + | let nf = $t02591126015._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 $t02854428616 = getPoolData(poolAddr, pType) | |
987 | + | let idAStr = $t02854428616._1 | |
988 | + | let idBStr = $t02854428616._2 | |
989 | + | let balA = $t02854428616._3 | |
990 | + | let balB = $t02854428616._4 | |
991 | + | let shareId = $t02854428616._5 | |
992 | + | let $t02861928686 = $Tuple2(assetIdFromStr(idAStr), assetIdFromStr(idBStr)) | |
993 | + | let idA = $t02861928686._1 | |
994 | + | let idB = $t02861928686._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 $t02938129470 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
1026 | + | let tokensAmountA = $t02938129470._1 | |
1027 | + | let tokensAmountB = $t02938129470._2 | |
1028 | + | let $t02947330709 = 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 = $t02947330709._1 | |
1078 | + | let toUserB = $t02947330709._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 $t03269132788 = if ((borrowId == aId)) | |
1125 | 1125 | then $Tuple2(dPriceA, decPrA) | |
1126 | 1126 | else $Tuple2(dPriceB, decPrB) | |
1127 | - | let borrowPrice = $ | |
1128 | - | let borrowDecPr = $ | |
1127 | + | let borrowPrice = $t03269132788._1 | |
1128 | + | let borrowDecPr = $t03269132788._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 $t03378834050 = 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 (($t03378834050 == $t03378834050)) | |
1168 | 1168 | then { | |
1169 | - | let claimAsset = $ | |
1170 | - | let claimAmount = $ | |
1169 | + | let claimAsset = $t03378834050._2 | |
1170 | + | let claimAmount = $t03378834050._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 $t03441734507 = getPoolData(Address(fromBase58String(pool)), pType) | |
1187 | + | let AId = $t03441734507._1 | |
1188 | + | let BId = $t03441734507._2 | |
1189 | + | let balA = $t03441734507._3 | |
1190 | + | let balB = $t03441734507._4 | |
1191 | + | let shareId = $t03441734507._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 $t03538035450 = a | |
1220 | + | let wAmountsA = $t03538035450._1 | |
1221 | + | let wAmountsB = $t03538035450._2 | |
1222 | + | let debts = $t03538035450._3 | |
1223 | + | let eqWAmountsA = $t03538035450._4 | |
1224 | + | let eqWAmountsB = $t03538035450._5 | |
1225 | + | let index = $t03538035450._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 $t03572935819 = getPoolData(Address(fromBase58String(pool)), pType) | |
1231 | + | let AId = $t03572935819._1 | |
1232 | + | let BId = $t03572935819._2 | |
1233 | + | let balA = $t03572935819._3 | |
1234 | + | let balB = $t03572935819._4 | |
1235 | + | let shareId = $t03572935819._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 $t03603536155 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1239 | + | let wAmountA = $t03603536155._1 | |
1240 | + | let wAmountB = $t03603536155._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 $t03706737286 = 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 = $t03706737286._1 | |
1278 | + | let eqWAmountB = $t03706737286._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 $t03754137652 = { | |
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 = $t03754137652._1 | |
1302 | + | let wAmountsB = $t03754137652._2 | |
1303 | + | let debts = $t03754137652._3 | |
1304 | + | let eqWAmountsA = $t03754137652._4 | |
1305 | + | let eqWAmountsB = $t03754137652._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 $t03825038340 = getPoolData(Address(fromBase58String(pool)), pType) | |
1326 | + | let AId = $t03825038340._1 | |
1327 | + | let BId = $t03825038340._2 | |
1328 | + | let balA = $t03825038340._3 | |
1329 | + | let balB = $t03825038340._4 | |
1330 | + | let shareId = $t03825038340._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 $t03842138480 = parseReplenishPmts(i.payments, AId, BId) | |
1337 | + | let pmtA = $t03842138480._1 | |
1338 | + | let pmtB = $t03842138480._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 $t03946939563 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1359 | + | if (($t03946939563 == $t03946939563)) | |
1360 | 1360 | then { | |
1361 | - | let newBalB = $ | |
1362 | - | let newBalA = $ | |
1361 | + | let newBalB = $t03946939563._2 | |
1362 | + | let newBalA = $t03946939563._1 | |
1363 | 1363 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1364 | - | let $ | |
1365 | - | let wAmountA = $ | |
1366 | - | let wAmountB = $ | |
1364 | + | let $t03963339748 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1365 | + | let wAmountA = $t03963339748._1 | |
1366 | + | let wAmountB = $t03963339748._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 $t03980139916 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1377 | + | if (($t03980139916 == $t03980139916)) | |
1378 | 1378 | then { | |
1379 | - | let axlyFee = $ | |
1380 | - | let userStaked = $ | |
1381 | - | let $ | |
1382 | - | if (($ | |
1379 | + | let axlyFee = $t03980139916._2 | |
1380 | + | let userStaked = $t03980139916._1 | |
1381 | + | let $t03992240016 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1382 | + | if (($t03992240016 == $t03992240016)) | |
1383 | 1383 | then { | |
1384 | - | let newBalB = $ | |
1385 | - | let newBalA = $ | |
1384 | + | let newBalB = $t03992240016._2 | |
1385 | + | let newBalA = $t03992240016._1 | |
1386 | 1386 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1387 | - | let $ | |
1388 | - | let wAmountA = $ | |
1389 | - | let wAmountB = $ | |
1387 | + | let $t04008640201 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1388 | + | let wAmountA = $t04008640201._1 | |
1389 | + | let wAmountB = $t04008640201._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 $t04504045144 = parseRequest(requestId) | |
1483 | + | let user = $t04504045144._1 | |
1484 | + | let pool = $t04504045144._2 | |
1485 | + | let pmtA = $t04504045144._3 | |
1486 | + | let AId = $t04504045144._4 | |
1487 | + | let pmtB = $t04504045144._5 | |
1488 | + | let BId = $t04504045144._6 | |
1489 | + | let balA = $t04504045144._7 | |
1490 | + | let balB = $t04504045144._8 | |
1491 | + | let shareId = $t04504045144._9 | |
1492 | + | let bwAsset = $t04504045144._10 | |
1493 | + | let bwAmount = $t04504045144._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 $t04533445434 = 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 = $t04533445434._1 | |
1505 | + | let pmtAllB = $t04533445434._2 | |
1506 | 1506 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1507 | - | let $ | |
1508 | - | let userStaked = $ | |
1509 | - | let axlyFee = $ | |
1507 | + | let $t04551645631 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1508 | + | let userStaked = $t04551645631._1 | |
1509 | + | let axlyFee = $t04551645631._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 $t04599146106 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1514 | + | let wAmountA = $t04599146106._1 | |
1515 | + | let wAmountB = $t04599146106._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 $t04662746717 = getPoolData(Address(fromBase58String(pool)), pType) | |
1527 | + | let AId = $t04662746717._1 | |
1528 | + | let BId = $t04662746717._2 | |
1529 | + | let balA = $t04662746717._3 | |
1530 | + | let balB = $t04662746717._4 | |
1531 | + | let shareId = $t04662746717._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 $t04868748789 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1564 | + | if (($t04868748789 == $t04868748789)) | |
1565 | 1565 | then { | |
1566 | - | let claimedAsset = $ | |
1567 | - | let claimedAmount = $ | |
1566 | + | let claimedAsset = $t04868748789._2 | |
1567 | + | let claimedAmount = $t04868748789._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 $t04947349571 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1593 | + | if (($t04947349571 == $t04947349571)) | |
1594 | 1594 | then { | |
1595 | - | let claimedAsset = $ | |
1596 | - | let claimedAmount = $ | |
1595 | + | let claimedAsset = $t04947349571._2 | |
1596 | + | let claimedAmount = $t04947349571._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 $t05009250186 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1615 | + | let aId = $t05009250186._1 | |
1616 | + | let bId = $t05009250186._2 | |
1617 | + | let aBal = $t05009250186._3 | |
1618 | + | let bBal = $t05009250186._4 | |
1619 | + | let shareId = $t05009250186._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 $t01912020334 = 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, " | |
673 | + | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", [shareId, userCanWithdraw], nil) | |
674 | 674 | if ((inv == inv)) | |
675 | 675 | then { | |
676 | - | let $ | |
676 | + | let $t01959220089 = 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 = $t01959220089._1 | |
706 | + | let outPrAmt = $t01959220089._2 | |
707 | + | let amBalance = $t01959220089._3 | |
708 | + | let prBalance = $t01959220089._4 | |
709 | + | let lpEmission = $t01959220089._5 | |
710 | + | let curPrice = $t01959220089._6 | |
711 | + | let poolStatus = $t01959220089._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 = $t01912020334._1 | |
729 | + | let amountB = $t01912020334._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 $t02070220781 = getWXPoolData(addressFromStringValue(pool)) | |
752 | + | let aId = $t02070220781._1 | |
753 | + | let bId = $t02070220781._2 | |
754 | + | let aBal = $t02070220781._3 | |
755 | + | let bBal = $t02070220781._4 | |
756 | + | let lpId = $t02070220781._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 $t02137921795 = 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 $t02144521561 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
783 | + | let pmtInA = $t02144521561._1 | |
784 | + | let pmtInB = $t02144521561._2 | |
785 | + | let change = $t02144521561._3 | |
786 | + | let changeId = $t02144521561._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 = $t02137921795._1 | |
798 | + | let changeId = $t02137921795._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 $t02265222890 = 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 = $t02265222890._1 | |
830 | + | let totalStakedWithLoan = $t02265222890._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 $t02499725063 = getPoolData(poolAddr, pType) | |
912 | + | let AId = $t02499725063._1 | |
913 | + | let BId = $t02499725063._2 | |
914 | + | let balA = $t02499725063._3 | |
915 | + | let balB = $t02499725063._4 | |
916 | + | let shareId = $t02499725063._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 $t02580825908 = 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 = $t02580825908._1 | |
937 | + | let pmtB = $t02580825908._2 | |
938 | + | let $t02591126015 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
939 | + | let stakedAmount = $t02591126015._1 | |
940 | + | let nf = $t02591126015._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 $t02854428616 = getPoolData(poolAddr, pType) | |
987 | + | let idAStr = $t02854428616._1 | |
988 | + | let idBStr = $t02854428616._2 | |
989 | + | let balA = $t02854428616._3 | |
990 | + | let balB = $t02854428616._4 | |
991 | + | let shareId = $t02854428616._5 | |
992 | + | let $t02861928686 = $Tuple2(assetIdFromStr(idAStr), assetIdFromStr(idBStr)) | |
993 | + | let idA = $t02861928686._1 | |
994 | + | let idB = $t02861928686._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 $t02938129470 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
1026 | + | let tokensAmountA = $t02938129470._1 | |
1027 | + | let tokensAmountB = $t02938129470._2 | |
1028 | + | let $t02947330709 = 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 = $t02947330709._1 | |
1078 | + | let toUserB = $t02947330709._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 $t03269132788 = if ((borrowId == aId)) | |
1125 | 1125 | then $Tuple2(dPriceA, decPrA) | |
1126 | 1126 | else $Tuple2(dPriceB, decPrB) | |
1127 | - | let borrowPrice = $ | |
1128 | - | let borrowDecPr = $ | |
1127 | + | let borrowPrice = $t03269132788._1 | |
1128 | + | let borrowDecPr = $t03269132788._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 $t03378834050 = 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 (($t03378834050 == $t03378834050)) | |
1168 | 1168 | then { | |
1169 | - | let claimAsset = $ | |
1170 | - | let claimAmount = $ | |
1169 | + | let claimAsset = $t03378834050._2 | |
1170 | + | let claimAmount = $t03378834050._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 $t03441734507 = getPoolData(Address(fromBase58String(pool)), pType) | |
1187 | + | let AId = $t03441734507._1 | |
1188 | + | let BId = $t03441734507._2 | |
1189 | + | let balA = $t03441734507._3 | |
1190 | + | let balB = $t03441734507._4 | |
1191 | + | let shareId = $t03441734507._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 $t03538035450 = a | |
1220 | + | let wAmountsA = $t03538035450._1 | |
1221 | + | let wAmountsB = $t03538035450._2 | |
1222 | + | let debts = $t03538035450._3 | |
1223 | + | let eqWAmountsA = $t03538035450._4 | |
1224 | + | let eqWAmountsB = $t03538035450._5 | |
1225 | + | let index = $t03538035450._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 $t03572935819 = getPoolData(Address(fromBase58String(pool)), pType) | |
1231 | + | let AId = $t03572935819._1 | |
1232 | + | let BId = $t03572935819._2 | |
1233 | + | let balA = $t03572935819._3 | |
1234 | + | let balB = $t03572935819._4 | |
1235 | + | let shareId = $t03572935819._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 $t03603536155 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1239 | + | let wAmountA = $t03603536155._1 | |
1240 | + | let wAmountB = $t03603536155._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 $t03706737286 = 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 = $t03706737286._1 | |
1278 | + | let eqWAmountB = $t03706737286._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 $t03754137652 = { | |
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 = $t03754137652._1 | |
1302 | + | let wAmountsB = $t03754137652._2 | |
1303 | + | let debts = $t03754137652._3 | |
1304 | + | let eqWAmountsA = $t03754137652._4 | |
1305 | + | let eqWAmountsB = $t03754137652._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 $t03825038340 = getPoolData(Address(fromBase58String(pool)), pType) | |
1326 | + | let AId = $t03825038340._1 | |
1327 | + | let BId = $t03825038340._2 | |
1328 | + | let balA = $t03825038340._3 | |
1329 | + | let balB = $t03825038340._4 | |
1330 | + | let shareId = $t03825038340._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 $t03842138480 = parseReplenishPmts(i.payments, AId, BId) | |
1337 | + | let pmtA = $t03842138480._1 | |
1338 | + | let pmtB = $t03842138480._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 $t03946939563 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1359 | + | if (($t03946939563 == $t03946939563)) | |
1360 | 1360 | then { | |
1361 | - | let newBalB = $ | |
1362 | - | let newBalA = $ | |
1361 | + | let newBalB = $t03946939563._2 | |
1362 | + | let newBalA = $t03946939563._1 | |
1363 | 1363 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1364 | - | let $ | |
1365 | - | let wAmountA = $ | |
1366 | - | let wAmountB = $ | |
1364 | + | let $t03963339748 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1365 | + | let wAmountA = $t03963339748._1 | |
1366 | + | let wAmountB = $t03963339748._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 $t03980139916 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1377 | + | if (($t03980139916 == $t03980139916)) | |
1378 | 1378 | then { | |
1379 | - | let axlyFee = $ | |
1380 | - | let userStaked = $ | |
1381 | - | let $ | |
1382 | - | if (($ | |
1379 | + | let axlyFee = $t03980139916._2 | |
1380 | + | let userStaked = $t03980139916._1 | |
1381 | + | let $t03992240016 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1382 | + | if (($t03992240016 == $t03992240016)) | |
1383 | 1383 | then { | |
1384 | - | let newBalB = $ | |
1385 | - | let newBalA = $ | |
1384 | + | let newBalB = $t03992240016._2 | |
1385 | + | let newBalA = $t03992240016._1 | |
1386 | 1386 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1387 | - | let $ | |
1388 | - | let wAmountA = $ | |
1389 | - | let wAmountB = $ | |
1387 | + | let $t04008640201 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1388 | + | let wAmountA = $t04008640201._1 | |
1389 | + | let wAmountB = $t04008640201._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 $t04504045144 = parseRequest(requestId) | |
1483 | + | let user = $t04504045144._1 | |
1484 | + | let pool = $t04504045144._2 | |
1485 | + | let pmtA = $t04504045144._3 | |
1486 | + | let AId = $t04504045144._4 | |
1487 | + | let pmtB = $t04504045144._5 | |
1488 | + | let BId = $t04504045144._6 | |
1489 | + | let balA = $t04504045144._7 | |
1490 | + | let balB = $t04504045144._8 | |
1491 | + | let shareId = $t04504045144._9 | |
1492 | + | let bwAsset = $t04504045144._10 | |
1493 | + | let bwAmount = $t04504045144._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 $t04533445434 = 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 = $t04533445434._1 | |
1505 | + | let pmtAllB = $t04533445434._2 | |
1506 | 1506 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1507 | - | let $ | |
1508 | - | let userStaked = $ | |
1509 | - | let axlyFee = $ | |
1507 | + | let $t04551645631 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1508 | + | let userStaked = $t04551645631._1 | |
1509 | + | let axlyFee = $t04551645631._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 $t04599146106 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1514 | + | let wAmountA = $t04599146106._1 | |
1515 | + | let wAmountB = $t04599146106._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 $t04662746717 = getPoolData(Address(fromBase58String(pool)), pType) | |
1527 | + | let AId = $t04662746717._1 | |
1528 | + | let BId = $t04662746717._2 | |
1529 | + | let balA = $t04662746717._3 | |
1530 | + | let balB = $t04662746717._4 | |
1531 | + | let shareId = $t04662746717._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 $t04868748789 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1564 | + | if (($t04868748789 == $t04868748789)) | |
1565 | 1565 | then { | |
1566 | - | let claimedAsset = $ | |
1567 | - | let claimedAmount = $ | |
1566 | + | let claimedAsset = $t04868748789._2 | |
1567 | + | let claimedAmount = $t04868748789._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 $t04947349571 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1593 | + | if (($t04947349571 == $t04947349571)) | |
1594 | 1594 | then { | |
1595 | - | let claimedAsset = $ | |
1596 | - | let claimedAmount = $ | |
1595 | + | let claimedAsset = $t04947349571._2 | |
1596 | + | let claimedAmount = $t04947349571._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 $t05009250186 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1615 | + | let aId = $t05009250186._1 | |
1616 | + | let bId = $t05009250186._2 | |
1617 | + | let aBal = $t05009250186._3 | |
1618 | + | let bBal = $t05009250186._4 | |
1619 | + | let shareId = $t05009250186._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 238.47 ms ◑