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