tx · BNCrKqrqpbVPB8r469QWPMGuPsbi2qaWVJXfVCUW7drw

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.44000000 Waves

2023.06.09 11:35 [2614902] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "BNCrKqrqpbVPB8r469QWPMGuPsbi2qaWVJXfVCUW7drw", "fee": 44000000, "feeAssetId": null, "timestamp": 1686299692564, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "SMMge3413qwW7hgLC1HcadcsTYfqYsqN1GyX7djnFTxZ7JDCFGxSesGiy3vMAJ5Xn9DkbHLEkt4qjAKoY7ZiW5c" ], "script": "base64:BgKRAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCAEIEgMKAQgSBAoCCAESBgoEAQgIARIFCgMBCAgSAwoBCBIGCgQIAQgIEgUKAwgIARIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgoKCAgIAQEBAQEBEgYKBAgICAESBAoCCAhgAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0Z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UEcG9vbAUDbmlsBQNuaWwDCQAAAgUDaW52BQNpbnYECGJhbEFmdGVyCQEOYWNjb3VudEJhbGFuY2UBBQRXWElECQCUCgIFA25pbAkAlAoCCQBlAgUIYmFsQWZ0ZXIFCWJhbEJlZm9yZQUEV1hJRAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECD1dyb25nIHBvb2wgdHlwZQECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnspQRo", "height": 2614902, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BGomtYPrV286rKrxAvuJosNMjTpJkD5ebzq4H2RxHGqb Next: 3qpmxjEJDyLxnAnwC6JH8HkcoShp1w8USfxK2td5XV7c Diff:
OldNewDifferences
895895 }
896896
897897
898+func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
899+ let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
900+ if ($isInstanceOf(@, "(Int, Int)"))
901+ then @
902+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
903+ let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
904+ if ($isInstanceOf(@, "(Int, Int)"))
905+ then @
906+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
907+ let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
908+ let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
909+ let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
910+ let $t02867528772 = if ((borrowId == aId))
911+ then $Tuple2(dPriceA, decPrA)
912+ else $Tuple2(dPriceB, decPrB)
913+ let borrowPrice = $t02867528772._1
914+ let borrowDecPr = $t02867528772._2
915+ fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
916+ }
917+
918+
898919 @Callable(i)
899-func replenishEVALONLY (pool,leverage,borrowAssetId,pmtA,pmtB) = if (if ((100 > leverage))
920+func replenishEVALONLY (pool,leverage,borrowId,pmtA,pmtB) = if (if ((100 > leverage))
900921 then true
901922 else (leverage > 300))
902923 then throw("Leverage can't be <100 and >300")
903924 else {
904925 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
905- let $t02850128591 = getPoolData(Address(fromBase58String(pool)), pType)
906- let AId = $t02850128591._1
907- let BId = $t02850128591._2
908- let balA = $t02850128591._3
909- let balB = $t02850128591._4
910- let shareId = $t02850128591._5
926+ let $t02918429274 = getPoolData(Address(fromBase58String(pool)), pType)
927+ let AId = $t02918429274._1
928+ let BId = $t02918429274._2
929+ let balA = $t02918429274._3
930+ let balB = $t02918429274._4
931+ let shareId = $t02918429274._5
911932 let borrowAmount = if ((leverage > 100))
912- then {
913- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [AId, false], nil)
914- if ($isInstanceOf(@, "(Int, Int)"))
915- then @
916- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
917- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [BId, false], nil)
918- if ($isInstanceOf(@, "(Int, Int)"))
919- then @
920- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
921- let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(AId), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(BId), 0, 0, DOWN)))
922- let borrowPrice = if ((borrowAssetId == AId))
923- then dPriceA
924- else dPriceB
925- (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice)
926- }
933+ then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
927934 else 0
928- let $t02916029272 = if ((borrowAssetId == AId))
935+ let $t02940929516 = if ((borrowId == AId))
929936 then $Tuple2((pmtA + borrowAmount), pmtB)
930937 else $Tuple2(pmtA, (pmtB + borrowAmount))
931- let payInA = $t02916029272._1
932- let payInB = $t02916029272._2
938+ let payInA = $t02940929516._1
939+ let payInB = $t02940929516._2
933940 let lpAmount = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
934941 let newBalA = (balA + payInA)
935942 let newBalB = (balB + payInB)
936- let $t02942929570 = calcWithdrawLPVirt(pType, pool, lpAmount, shareId, AId, BId, newBalA, newBalB, borrowAmount, borrowAssetId)
937- if (($t02942929570 == $t02942929570))
943+ let $t02967329809 = calcWithdrawLPVirt(pType, pool, lpAmount, shareId, AId, BId, newBalA, newBalB, borrowAmount, borrowId)
944+ if (($t02967329809 == $t02967329809))
938945 then {
939- let amountGetB = $t02942929570._2
940- let amountGetA = $t02942929570._1
946+ let amountGetB = $t02967329809._2
947+ let amountGetA = $t02967329809._1
941948 let ratioBefore = fraction(balB, SCALE8, balA)
942949 let ratioAfter = fraction((newBalB - amountGetB), SCALE8, (newBalA - amountGetA))
943950 let impact = (SCALE8 - fraction(ratioBefore, SCALE8, ratioAfter))
970977
971978
972979 @Callable(i)
973-func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
980+func replenish (pool,leverage,borrowId) = if (if ((100 > leverage))
974981 then true
975982 else (leverage > 300))
976983 then throw("Leverage can't be <100 and >300")
977984 else {
978985 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
979- let $t03072430814 = getPoolData(Address(fromBase58String(pool)), pType)
980- let AId = $t03072430814._1
981- let BId = $t03072430814._2
982- let balA = $t03072430814._3
983- let balB = $t03072430814._4
984- let shareId = $t03072430814._5
985- let $t03081731454 = if ((size(i.payments) == 2))
986+ let $t03095831048 = getPoolData(Address(fromBase58String(pool)), pType)
987+ let AId = $t03095831048._1
988+ let BId = $t03095831048._2
989+ let balA = $t03095831048._3
990+ let balB = $t03095831048._4
991+ let shareId = $t03095831048._5
992+ let $t03105131688 = if ((size(i.payments) == 2))
986993 then if ((assetIdToStr(i.payments[0].assetId) != AId))
987994 then throw("Wrong payment asset A")
988995 else if ((assetIdToStr(i.payments[1].assetId) != BId))
9951002 then $Tuple4(0, AId, i.payments[0].amount, BId)
9961003 else throw("Wrong payment")
9971004 else throw("One or two payments expected")
998- let pmtA = $t03081731454._1
999- let pmtAssetA = $t03081731454._2
1000- let pmtB = $t03081731454._3
1001- let pmtAssetB = $t03081731454._4
1005+ let pmtA = $t03105131688._1
1006+ let pmtAssetA = $t03105131688._2
1007+ let pmtB = $t03105131688._3
1008+ let pmtAssetB = $t03105131688._4
10021009 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
10031010 if ((leverage > 100))
10041011 then {
1005- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
1006- if ($isInstanceOf(@, "(Int, Int)"))
1007- then @
1008- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
1009- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
1010- if ($isInstanceOf(@, "(Int, Int)"))
1011- then @
1012- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
1013- let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
1014- let borrowPrice = if ((borrowAssetId == AId))
1015- then dPriceA
1016- else dPriceB
1017- let borrowAmount = fraction(fraction(paydInDollar, (leverage - 100), 100), pow(10, 0, getAssetDecimals(borrowAssetId), 0, 0, DOWN), borrowPrice)
1018- let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
1012+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1013+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
10191014 let newRequestId = {
10201015 let @ = invoke(this, "createNewRequest", [request], nil)
10211016 if ($isInstanceOf(@, "Int"))
10241019 }
10251020 if ((newRequestId == newRequestId))
10261021 then {
1027- let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1022+ let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
10281023 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
10291024 if ((inv == inv))
10301025 then nil
10331028 else throw("Strict value is not equal to itself.")
10341029 }
10351030 else {
1036- let $t03290433016 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1037- let userStaked = $t03290433016._1
1038- let axlyFee = $t03290433016._2
1031+ let $t03262232734 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1032+ let userStaked = $t03262232734._1
1033+ let axlyFee = $t03262232734._2
10391034 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
10401035 }
10411036 }
10441039
10451040 @Callable(i)
10461041 func replenishFromLand (requestId) = {
1047- let $t03322733331 = parseRequest(requestId)
1048- let user = $t03322733331._1
1049- let pool = $t03322733331._2
1050- let pmtA = $t03322733331._3
1051- let AId = $t03322733331._4
1052- let pmtB = $t03322733331._5
1053- let BId = $t03322733331._6
1054- let balA = $t03322733331._7
1055- let balB = $t03322733331._8
1056- let shareId = $t03322733331._9
1057- let bwAsset = $t03322733331._10
1058- let bwAmount = $t03322733331._11
1042+ let $t03294533049 = parseRequest(requestId)
1043+ let user = $t03294533049._1
1044+ let pool = $t03294533049._2
1045+ let pmtA = $t03294533049._3
1046+ let AId = $t03294533049._4
1047+ let pmtB = $t03294533049._5
1048+ let BId = $t03294533049._6
1049+ let balA = $t03294533049._7
1050+ let balB = $t03294533049._8
1051+ let shareId = $t03294533049._9
1052+ let bwAsset = $t03294533049._10
1053+ let bwAmount = $t03294533049._11
10591054 if ((size(i.payments) != 1))
10601055 then throw("Wrong payment size")
10611056 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
10631058 else (i.payments[0].amount != bwAmount))
10641059 then throw("Wrong payment")
10651060 else {
1066- let $t03352133645 = if ((AId == bwAsset))
1061+ let $t03323933363 = if ((AId == bwAsset))
10671062 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
10681063 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1069- let pmtAllA = $t03352133645._1
1070- let pmtAllB = $t03352133645._2
1064+ let pmtAllA = $t03323933363._1
1065+ let pmtAllB = $t03323933363._2
10711066 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1072- let $t03372733836 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1073- let userStaked = $t03372733836._1
1074- let axlyFee = $t03372733836._2
1067+ let $t03344533554 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1068+ let userStaked = $t03344533554._1
1069+ let axlyFee = $t03344533554._2
10751070 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
10761071 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
10771072 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
11351130 func liquidate (user,posId,liquidateAmount) = {
11361131 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
11371132 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1138- let $t03661936709 = getPoolData(Address(fromBase58String(pool)), pType)
1139- let AId = $t03661936709._1
1140- let BId = $t03661936709._2
1141- let balA = $t03661936709._3
1142- let balB = $t03661936709._4
1143- let shareId = $t03661936709._5
1133+ let $t03633736427 = getPoolData(Address(fromBase58String(pool)), pType)
1134+ let AId = $t03633736427._1
1135+ let BId = $t03633736427._2
1136+ let balA = $t03633736427._3
1137+ let balB = $t03633736427._4
1138+ let shareId = $t03633736427._5
11441139 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
11451140 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
11461141 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
11541149
11551150 @Callable(i)
11561151 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
1157- let $t03794438138 = if (claim)
1152+ let $t03766237856 = if (claim)
11581153 then claimFarmed(type, pool)
11591154 else {
11601155 let claimedAsset = if ((type == SF_POOL))
11621157 else WXID
11631158 $Tuple2(amountToExchange, claimedAsset)
11641159 }
1165- let claimedAmount = $t03794438138._1
1166- let claimedAsset = $t03794438138._2
1160+ let claimedAmount = $t03766237856._1
1161+ let claimedAsset = $t03766237856._2
11671162 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
11681163 let change = (claimedAmount - amountToExchange)
11691164 let changeEntry = if ((change > 0))
11761171
11771172 @Callable(i)
11781173 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
1179- let $t03879538989 = if (claim)
1174+ let $t03851338707 = if (claim)
11801175 then claimFarmed(type, pool)
11811176 else {
11821177 let claimedAsset = if ((type == SF_POOL))
11841179 else WXID
11851180 $Tuple2(amountToExchange, claimedAsset)
11861181 }
1187- let claimedAmount = $t03879538989._1
1188- let claimedAsset = $t03879538989._2
1182+ let claimedAmount = $t03851338707._1
1183+ let claimedAsset = $t03851338707._2
11891184 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
11901185 let change = (claimedAmount - amountToExchange)
11911186 let changeEntry = if ((change > 0))
11981193
11991194 @Callable(i)
12001195 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
1201- let $t03971239906 = if (claim)
1196+ let $t03943039624 = if (claim)
12021197 then claimFarmed(type, pool)
12031198 else {
12041199 let claimedAsset = if ((type == SF_POOL))
12061201 else WXID
12071202 $Tuple2(amountToExchange, claimedAsset)
12081203 }
1209- let claimedAmount = $t03971239906._1
1210- let claimedAsset = $t03971239906._2
1204+ let claimedAmount = $t03943039624._1
1205+ let claimedAsset = $t03943039624._2
12111206 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
12121207 let change = (claimedAmount - amountToExchange)
12131208 let changeEntry = if ((change > 0))
12241219 else false)
12251220 then throw("Wrong type")
12261221 else {
1227- let $t04059940693 = getPoolData(Address(fromBase58String(poolAddr)), type)
1228- let aId = $t04059940693._1
1229- let bId = $t04059940693._2
1230- let aBal = $t04059940693._3
1231- let bBal = $t04059940693._4
1232- let shareId = $t04059940693._5
1222+ let $t04031740411 = getPoolData(Address(fromBase58String(poolAddr)), type)
1223+ let aId = $t04031740411._1
1224+ let bId = $t04031740411._2
1225+ let aBal = $t04031740411._3
1226+ let bBal = $t04031740411._4
1227+ let shareId = $t04031740411._5
12331228 [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)]
12341229 }
12351230
12381233 @Callable(i)
12391234 func capitalizeTest (pool,pType,tokenId,tokenAmount) = {
12401235 let poolAddr = Address(fromBase58String(pool))
1241- let $t04148941568 = getPoolData(poolAddr, pType)
1242- let AId = $t04148941568._1
1243- let BId = $t04148941568._2
1244- let balA = $t04148941568._3
1245- let balB = $t04148941568._4
1246- let shareId = $t04148941568._5
1247- let $t04157141651 = if ((tokenId == AId))
1236+ let $t04120741286 = getPoolData(poolAddr, pType)
1237+ let AId = $t04120741286._1
1238+ let BId = $t04120741286._2
1239+ let balA = $t04120741286._3
1240+ let balB = $t04120741286._4
1241+ let shareId = $t04120741286._5
1242+ let $t04128941369 = if ((tokenId == AId))
12481243 then $Tuple2(tokenAmount, 0)
12491244 else $Tuple2(0, tokenAmount)
1250- let pmtA = $t04157141651._1
1251- let pmtB = $t04157141651._2
1252- let $t04165441758 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1253- let stakedAmount = $t04165441758._1
1254- let nf = $t04165441758._2
1245+ let pmtA = $t04128941369._1
1246+ let pmtB = $t04128941369._2
1247+ let $t04137241476 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1248+ let stakedAmount = $t04137241476._1
1249+ let nf = $t04137241476._2
12551250 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
12561251 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
12571252 let totalShareAmount = getPoolTotalShare(pool)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SF_POOL = "SF"
55
66 let WX_POOL = "WX"
77
88 let CAP_FEE_NO_LOAN = "capNoLoan"
99
1010 let CAP_FEE_LOAN = "capLoan"
1111
1212 let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan"
1313
1414 let STOPLOSS_LOAN = "stopLossLoan"
1515
1616 let LOAN_FEE = "loan"
1717
1818 let NO_LOAN_FEE = "noLoan"
1919
2020 let NO_FEE = "noFee"
2121
2222 let SCALE8 = 100000000
2323
2424 let SCALE10 = 10000000000
2525
2626 let FEE_SCALE6 = 1000000
2727
2828 let kSFPoolAAssetBalance = "A_asset_balance"
2929
3030 let kSFPoolBAssetBalance = "B_asset_balance"
3131
3232 let kSFPoolAAssetId = "A_asset_id"
3333
3434 let kSFPoolBAssetId = "B_asset_id"
3535
3636 let kSFPoolShareId = "share_asset_id"
3737
3838 let kSFPoolShareSupply = "share_asset_supply"
3939
4040 let kSFPoolFee = "commission"
4141
4242 let kUserPosition = "_user_position"
4343
4444 let kUserPositionPool = "_user_position_pool"
4545
4646 let kUserBorrowAmount = "_user_position_borrow_amount"
4747
4848 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
4949
5050 let kUserPositionNum = "_user_position_number"
5151
5252 let kUserPositionInterest = "_user_position_interest"
5353
5454 let kPoolTotal = "_pool_total"
5555
5656 let kPoolTotalLoan = "_pool_total_loan"
5757
5858 let kPoolInterestLoan = "_pool_interest_loan"
5959
6060 let kPoolInterestNoLoan = "_pool_interest_no_loan"
6161
6262 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
6363
6464 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
6565
6666 let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
6767
6868 let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
6969
7070 let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan"
7171
7272 let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan"
7373
7474 let kRequestId = "_request_id"
7575
7676 let kRequestIter = "requests_iter"
7777
7878 let kPool = "pool_"
7979
8080 let kSharePool = "_pool_share_id"
8181
8282 let kPoolCapChange = "_pool_cap_change"
8383
8484 let kTokenLastPrice = "last_price"
8585
8686 let kUserStopLoss = "_stop_loss"
8787
8888 let kMoneyBox = "axly_money_box"
8989
9090 let kSFFarmingAddr = "swopfi_farming_addr"
9191
9292 let kLendService = "lend_service_addr"
9393
9494 let kPriceOracle = "price_oracle"
9595
9696 let kExContract = "exchange_contract"
9797
9898 let kWxSwapContract = "wx_swap_contract"
9999
100100 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
101101
102102 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
103103
104104 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
105105
106106 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
107107
108108 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
109109
110110 let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
111111
112112 func isSelfCall (i) = if ((i.caller == this))
113113 then unit
114114 else throw("Only contract itself can call this function")
115115
116116
117117 func accountBalance (assetId) = match assetId {
118118 case id: ByteVector =>
119119 assetBalance(this, id)
120120 case waves: Unit =>
121121 wavesBalance(this).available
122122 case _ =>
123123 throw("Match error")
124124 }
125125
126126
127127 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"))
128128
129129
130130 func getWXPoolData (poolAddr) = {
131131 let cfg = {
132132 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
133133 if ($isInstanceOf(@, "List[Any]"))
134134 then @
135135 else throw(($getType(@) + " couldn't be cast to List[Any]"))
136136 }
137137 if ((cfg == cfg))
138138 then {
139139 let aId = valueOrErrorMessage({
140140 let @ = cfg[4]
141141 if ($isInstanceOf(@, "String"))
142142 then @
143143 else unit
144144 }, "Can't get pool A asset id")
145145 let bId = valueOrErrorMessage({
146146 let @ = cfg[5]
147147 if ($isInstanceOf(@, "String"))
148148 then @
149149 else unit
150150 }, "Can't get pool B asset id")
151151 let shareId = valueOrErrorMessage({
152152 let @ = cfg[3]
153153 if ($isInstanceOf(@, "String"))
154154 then @
155155 else unit
156156 }, "Can't get pool LP asset id")
157157 let balA = {
158158 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
159159 if ($isInstanceOf(@, "Int"))
160160 then @
161161 else throw(($getType(@) + " couldn't be cast to Int"))
162162 }
163163 if ((balA == balA))
164164 then {
165165 let balB = {
166166 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
167167 if ($isInstanceOf(@, "Int"))
168168 then @
169169 else throw(($getType(@) + " couldn't be cast to Int"))
170170 }
171171 if ((balB == balB))
172172 then $Tuple5(aId, bId, balA, balB, shareId)
173173 else throw("Strict value is not equal to itself.")
174174 }
175175 else throw("Strict value is not equal to itself.")
176176 }
177177 else throw("Strict value is not equal to itself.")
178178 }
179179
180180
181181 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
182182 then getSFPoolData(poolAddr)
183183 else if ((type == WX_POOL))
184184 then getWXPoolData(poolAddr)
185185 else throw("Wrong pool type")
186186
187187
188188 func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
189189 then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
190190 else if ((type == WX_POOL))
191191 then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
192192 else throw("Wrong pool type")
193193
194194
195195 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
196196
197197
198198 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
199199
200200
201201 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1)
202202
203203
204204 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
205205 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
206206 else if ((feeType == CAP_FEE_NO_LOAN))
207207 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
208208 else if ((feeType == LOAN_FEE))
209209 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
210210 else if ((feeType == NO_LOAN_FEE))
211211 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
212212 else if ((feeType == NO_FEE))
213213 then 0
214214 else throw("Wrong fee type")
215215
216216
217217 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
218218
219219
220220 func getWXFarmingAddr (poolAddr) = {
221221 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
222222 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
223223 Address(fromBase58String(factroyCfg[1]))
224224 }
225225
226226
227227 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
228228
229229
230230 func assetIdToStr (assetId) = match assetId {
231231 case id: ByteVector =>
232232 toBase58String(id)
233233 case waves: Unit =>
234234 "WAVES"
235235 case _ =>
236236 throw("Match error")
237237 }
238238
239239
240240 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
241241 then unit
242242 else fromBase58String(assetId)
243243
244244
245245 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
246246 then 8
247247 else match assetInfo(fromBase58String(assetId)) {
248248 case asset: Asset =>
249249 asset.decimals
250250 case _ =>
251251 throw("Can't find asset")
252252 }
253253
254254
255255 func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
256256
257257
258258 func getAssetsPrice (assetIds) = {
259259 func getPrices (a,assetId) = {
260260 let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
261261 if ($isInstanceOf(@, "(Int, Int)"))
262262 then @
263263 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
264264 (a :+ assetPrice)
265265 }
266266
267267 let $l = assetIds
268268 let $s = size($l)
269269 let $acc0 = nil
270270 func $f0_1 ($a,$i) = if (($i >= $s))
271271 then $a
272272 else getPrices($a, $l[$i])
273273
274274 func $f0_2 ($a,$i) = if (($i >= $s))
275275 then $a
276276 else throw("List size exceeds 100")
277277
278278 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
279279 }
280280
281281
282282 func getSharePrice (shareIds) = {
283283 func getPrices (a,shareId) = {
284284 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
285285 let poolAddr = Address(fromBase58String(pool))
286286 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
287287 let $t084288493 = getPoolData(poolAddr, pType)
288288 let aId = $t084288493._1
289289 let bId = $t084288493._2
290290 let aBalance = $t084288493._3
291291 let bBalance = $t084288493._4
292292 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
293293 if ($isInstanceOf(@, "(Int, Int)"))
294294 then @
295295 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
296296 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
297297 if ($isInstanceOf(@, "(Int, Int)"))
298298 then @
299299 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
300300 let shareSupply = getShareSupply(poolAddr, pType, shareId)
301301 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
302302 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
303303 let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
304304 let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
305305 let sharePrice = fraction(sum, sharePrecision, shareSupply)
306306 (a :+ sharePrice)
307307 }
308308
309309 let $l = shareIds
310310 let $s = size($l)
311311 let $acc0 = nil
312312 func $f0_1 ($a,$i) = if (($i >= $s))
313313 then $a
314314 else getPrices($a, $l[$i])
315315
316316 func $f0_2 ($a,$i) = if (($i >= $s))
317317 then $a
318318 else throw("List size exceeds 50")
319319
320320 $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)
321321 }
322322
323323
324324 func getCursEntries (aId,bId,shareId) = {
325325 let assetsPrices = getAssetsPrice([aId, bId])
326326 let sharePrice = getSharePrice([shareId])
327327 let prices = [toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice[0])]
328328 [StringEntry(kTokenLastPrice, makeString(prices, ","))]
329329 }
330330
331331
332332 func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = {
333333 let $t096459950 = if ((pType == SF_POOL))
334334 then $Tuple2(nil, nil)
335335 else $Tuple2(split({
336336 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
337337 if ($isInstanceOf(@, "String"))
338338 then @
339339 else throw(($getType(@) + " couldn't be cast to String"))
340340 }, "__"), split({
341341 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
342342 if ($isInstanceOf(@, "String"))
343343 then @
344344 else throw(($getType(@) + " couldn't be cast to String"))
345345 }, "__"))
346346 if (($t096459950 == $t096459950))
347347 then {
348348 let evalPutInB = $t096459950._2
349349 let evalPutInA = $t096459950._1
350350 let $t0996010156 = if ((pType == SF_POOL))
351351 then $Tuple2(fraction(SCALE8, pmtA, balA), fraction(SCALE8, pmtB, balB))
352352 else $Tuple2(parseIntValue(evalPutInA[1]), parseIntValue(evalPutInB[1]))
353353 let ratioA = $t0996010156._1
354354 let ratioB = $t0996010156._2
355355 let $t01016210644 = if ((ratioB > ratioA))
356356 then {
357357 let pmt = if ((pType == SF_POOL))
358358 then fraction(balB, ratioA, SCALE8, CEILING)
359359 else parseIntValue(evalPutInA[8])
360360 $Tuple5(pmtA, pmt, (pmtB - pmt), bId, ratioB)
361361 }
362362 else {
363363 let pmt = if ((pType == SF_POOL))
364364 then fraction(balA, ratioB, SCALE8, CEILING)
365365 else parseIntValue(evalPutInB[7])
366366 $Tuple5(pmt, pmtB, (pmtA - pmt), aId, ratioA)
367367 }
368368 let pmtInA = $t01016210644._1
369369 let pmtInB = $t01016210644._2
370370 let change = $t01016210644._3
371371 let changeAssetId = $t01016210644._4
372372 let lp = $t01016210644._5
373373 $Tuple5(pmtInA, pmtInB, change, changeAssetId, lp)
374374 }
375375 else throw("Strict value is not equal to itself.")
376376 }
377377
378378
379379 func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
380380 let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
381381 if ((pType == SF_POOL))
382382 then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
383383 else invoke(poolAddr, "put", [1000000, false], payments)
384384 }
385385
386386
387387 func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
388388 let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
389389 if ((pType == SF_POOL))
390390 then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
391391 else invoke(poolAddr, "putOneTkn", [0, false], payments)
392392 }
393393
394394
395395 func stakeLP (pool,pType,shareId,amount) = {
396396 let payments = [AttachedPayment(fromBase58String(shareId), amount)]
397397 if ((pType == SF_POOL))
398398 then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
399399 else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
400400 }
401401
402402
403403 func unstakeLP (pool,pType,shareId,amount) = {
404404 let $t01187412231 = if ((pType == SF_POOL))
405405 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
406406 else if ((pType == WX_POOL))
407407 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
408408 else throw("Wrong pool type")
409409 let farmAddr = $t01187412231._1
410410 let fName = $t01187412231._2
411411 let params = $t01187412231._3
412412 let inv = invoke(farmAddr, fName, params, nil)
413413 if ((inv == inv))
414414 then amount
415415 else throw("Strict value is not equal to itself.")
416416 }
417417
418418
419419 func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
420420 let poolAddr = Address(fromBase58String(pool))
421421 let feeScale6 = 1000000
422422 let fee = getIntegerValue(poolAddr, kSFPoolFee)
423423 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
424424 let $t01264412932 = if ((assetTokenToGet == assetIdA))
425425 then {
426426 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
427427 $Tuple2(amountToPay, assetIdB)
428428 }
429429 else {
430430 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
431431 $Tuple2(amountToPay, assetIdA)
432432 }
433433 let amountToPay = $t01264412932._1
434434 let assetToPay = $t01264412932._2
435435 $Tuple2(assetToPay, amountToPay)
436436 }
437437
438438
439439 func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
440440 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
441441 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
442442 let feeScale = toBigInt(100000000)
443443 let $t01327113579 = if ((assetTokenToGet == assetIdA))
444444 then {
445445 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
446446 $Tuple2(amountToPay, assetIdB)
447447 }
448448 else {
449449 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
450450 $Tuple2(amountToPay, assetIdA)
451451 }
452452 let amountToPay = $t01327113579._1
453453 let assetToPay = $t01327113579._2
454454 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
455455 $Tuple2(assetToPay, amountToPayWithFee)
456456 }
457457
458458
459459 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
460460 then {
461461 let $t01391714039 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
462462 let assetToPay = $t01391714039._1
463463 let amountToPay = $t01391714039._2
464464 invoke(addressFromStringValue(pool), "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
465465 }
466466 else {
467467 let $t01419014312 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
468468 let assetToPay = $t01419014312._1
469469 let amountToPay = $t01419014312._2
470470 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
471471 }
472472
473473
474474 func calcReplenishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = {
475475 let poolAddr = addressFromStringValue(pool)
476476 if ((pType == SF_POOL))
477477 then {
478478 let inv = {
479479 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(pmtA), toString(pmtB), "0"]], nil)
480480 if ($isInstanceOf(@, "List[Any]"))
481481 then @
482482 else throw(($getType(@) + " couldn't be cast to List[Any]"))
483483 }
484484 if ((inv == inv))
485485 then {
486486 let @ = inv[0]
487487 if ($isInstanceOf(@, "Int"))
488488 then @
489489 else throw(($getType(@) + " couldn't be cast to Int"))
490490 }
491491 else throw("Strict value is not equal to itself.")
492492 }
493493 else if ((pType == WX_POOL))
494494 then {
495495 let $t01487715218 = if (if ((pmtA > 0))
496496 then (pmtB > 0)
497497 else false)
498498 then {
499499 let $t01495815084 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
500500 let pmtInA = $t01495815084._1
501501 let pmtInB = $t01495815084._2
502502 let change = $t01495815084._3
503503 let changeId = $t01495815084._4
504504 let lpAmount = $t01495815084._5
505505 $Tuple3(change, changeId, lpAmount)
506506 }
507507 else if ((pmtA > 0))
508508 then $Tuple3(pmtA, aId, 0)
509509 else $Tuple3(pmtB, bId, 0)
510510 let change = $t01487715218._1
511511 let changeId = $t01487715218._2
512512 let lpTwo = $t01487715218._3
513513 let lpOne = if ((change > 0))
514514 then {
515515 let inv = {
516516 let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil)
517517 if ($isInstanceOf(@, "(Int, Int, Int)"))
518518 then @
519519 else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)"))
520520 }
521521 if ((inv == inv))
522522 then inv._1
523523 else throw("Strict value is not equal to itself.")
524524 }
525525 else 0
526526 (lpTwo + lpOne)
527527 }
528528 else throw("Wrong pool type")
529529 }
530530
531531
532532 func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = {
533533 let poolAddr = addressFromStringValue(pool)
534534 let $t01570416170 = if ((pType == SF_POOL))
535535 then {
536536 let inv = {
537537 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount)]], nil)
538538 if ($isInstanceOf(@, "List[Any]"))
539539 then @
540540 else throw(($getType(@) + " couldn't be cast to List[Any]"))
541541 }
542542 if ((inv == inv))
543543 then $Tuple2({
544544 let @ = inv[0]
545545 if ($isInstanceOf(@, "Int"))
546546 then @
547547 else throw(($getType(@) + " couldn't be cast to Int"))
548548 }, {
549549 let @ = inv[1]
550550 if ($isInstanceOf(@, "Int"))
551551 then @
552552 else throw(($getType(@) + " couldn't be cast to Int"))
553553 })
554554 else throw("Strict value is not equal to itself.")
555555 }
556556 else if ((pType == WX_POOL))
557557 then {
558558 let get = split({
559559 let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, lpAmount], nil)
560560 if ($isInstanceOf(@, "String"))
561561 then @
562562 else throw(($getType(@) + " couldn't be cast to String"))
563563 }, "__")
564564 if ((get == get))
565565 then $Tuple2(parseIntValue(get[1]), parseIntValue(get[2]))
566566 else throw("Strict value is not equal to itself.")
567567 }
568568 else throw("Wrong pool type")
569569 let getAmountA = $t01570416170._1
570570 let getAmountB = $t01570416170._2
571571 if ((borrowAmount > 0))
572572 then {
573573 let amountToGetEx = if (if ((borrowAssetId == aId))
574574 then (borrowAmount > getAmountA)
575575 else false)
576576 then (borrowAmount - getAmountA)
577577 else if (if ((borrowAssetId == bId))
578578 then (borrowAmount > getAmountB)
579579 else false)
580580 then (borrowAmount - getAmountB)
581581 else 0
582582 let $t01647316788 = if ((amountToGetEx > 0))
583583 then if ((pType == SF_POOL))
584584 then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
585585 else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
586586 else $Tuple2("", 0)
587587 let assetToPay = $t01647316788._1
588588 let amountToPay = $t01647316788._2
589589 if ((borrowAssetId == aId))
590590 then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay))
591591 else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount))
592592 }
593593 else $Tuple2(getAmountA, getAmountB)
594594 }
595595
596596
597597 func claimFarmed (type,pool) = if ((type == SF_POOL))
598598 then {
599599 let balBefore = accountBalance(SWOPID)
600600 if ((balBefore == balBefore))
601601 then {
602602 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
603603 if ((inv == inv))
604604 then {
605605 let balAfter = accountBalance(SWOPID)
606606 $Tuple2((balAfter - balBefore), SWOPID)
607607 }
608608 else throw("Strict value is not equal to itself.")
609609 }
610610 else throw("Strict value is not equal to itself.")
611611 }
612612 else if ((type == WX_POOL))
613613 then {
614614 let balBefore = accountBalance(WXID)
615615 if ((balBefore == balBefore))
616616 then {
617617 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
618618 if ((inv == inv))
619619 then {
620620 let balAfter = accountBalance(WXID)
621621 $Tuple2((balAfter - balBefore), WXID)
622622 }
623623 else throw("Strict value is not equal to itself.")
624624 }
625625 else throw("Strict value is not equal to itself.")
626626 }
627627 else throw("Wrong pool type")
628628
629629
630630 func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
631631 let lpBalanceBefore = accountBalance(fromBase58String(LPId))
632632 if ((lpBalanceBefore == lpBalanceBefore))
633633 then {
634634 let poolAddr = addressFromStringValue(pool)
635635 let $t01799718413 = if (if ((pmtA > 0))
636636 then (pmtB > 0)
637637 else false)
638638 then {
639639 let $t01806318179 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
640640 let pmtInA = $t01806318179._1
641641 let pmtInB = $t01806318179._2
642642 let change = $t01806318179._3
643643 let changeId = $t01806318179._4
644644 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
645645 if ((inv == inv))
646646 then $Tuple2(change, changeId)
647647 else throw("Strict value is not equal to itself.")
648648 }
649649 else if ((pmtA > 0))
650650 then $Tuple2(pmtA, aId)
651651 else if ((pmtB > 0))
652652 then $Tuple2(pmtB, bId)
653653 else throw("pmts must be > 0")
654654 let change = $t01799718413._1
655655 let changeId = $t01799718413._2
656656 let inv = if ((change > 0))
657657 then replenishOneTokenByType(poolAddr, pType, change, changeId)
658658 else nil
659659 if ((inv == inv))
660660 then {
661661 let lpBalanceAfter = accountBalance(fromBase58String(LPId))
662662 let totalStaked = (lpBalanceAfter - lpBalanceBefore)
663663 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
664664 let userShareForStake = (totalStaked - axlyFeeAmount)
665665 if ((0 >= userShareForStake))
666666 then throw("amount of staked sharetokens must be > 0")
667667 else {
668668 let invLP = stakeLP(pool, pType, LPId, userShareForStake)
669669 if ((invLP == invLP))
670670 then $Tuple2(userShareForStake, axlyFeeAmount)
671671 else throw("Strict value is not equal to itself.")
672672 }
673673 }
674674 else throw("Strict value is not equal to itself.")
675675 }
676676 else throw("Strict value is not equal to itself.")
677677 }
678678
679679
680680 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
681681 let totalAmount = getPoolTotalShare(pool)
682682 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
683683 let $t01927119509 = if (withLoan)
684684 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
685685 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
686686 let curPoolInterest = $t01927119509._1
687687 let totalStakedWithLoan = $t01927119509._2
688688 [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))]
689689 }
690690
691691
692692 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
693693 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
694694 if ((tokenBalanceBefore == tokenBalanceBefore))
695695 then {
696696 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
697697 if ((inv == inv))
698698 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
699699 else throw("Strict value is not equal to itself.")
700700 }
701701 else throw("Strict value is not equal to itself.")
702702 }
703703
704704
705705 func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
706706 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
707707 if ((tokenBalanceBefore == tokenBalanceBefore))
708708 then {
709709 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
710710 if ((inv == inv))
711711 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
712712 else throw("Strict value is not equal to itself.")
713713 }
714714 else throw("Strict value is not equal to itself.")
715715 }
716716
717717
718718 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
719719 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
720720 if ((tokenBalanceBefore == tokenBalanceBefore))
721721 then {
722722 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
723723 if ((inv == inv))
724724 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
725725 else throw("Strict value is not equal to itself.")
726726 }
727727 else throw("Strict value is not equal to itself.")
728728 }
729729
730730
731731 func capitalize (pool,pType,tokenId,tokenAmount) = {
732732 let poolAddr = Address(fromBase58String(pool))
733733 let $t02186021939 = getPoolData(poolAddr, pType)
734734 let AId = $t02186021939._1
735735 let BId = $t02186021939._2
736736 let balA = $t02186021939._3
737737 let balB = $t02186021939._4
738738 let shareId = $t02186021939._5
739739 let $t02194222022 = if ((tokenId == AId))
740740 then $Tuple2(tokenAmount, 0)
741741 else $Tuple2(0, tokenAmount)
742742 let pmtA = $t02194222022._1
743743 let pmtB = $t02194222022._2
744744 let $t02202522129 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
745745 let stakedAmount = $t02202522129._1
746746 let nf = $t02202522129._2
747747 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
748748 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
749749 let totalShareAmount = getPoolTotalShare(pool)
750750 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
751751 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
752752 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
753753 let stakedNoLoan = (stakedAmount - stakedLoan)
754754 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
755755 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
756756 else 0
757757 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
758758 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
759759 else 0
760760 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
761761 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
762762 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
763763 if ((axlyFee == axlyFee))
764764 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))
765765 else throw("Strict value is not equal to itself.")
766766 }
767767
768768
769769 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
770770 let poolAddr = Address(fromBase58String(pool))
771771 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
772772 let $t02389723973 = getPoolData(poolAddr, pType)
773773 let assetIdA = $t02389723973._1
774774 let assetIdB = $t02389723973._2
775775 let balA = $t02389723973._3
776776 let balB = $t02389723973._4
777777 let shareId = $t02389723973._5
778778 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
779779 if ((cBalABefore == cBalABefore))
780780 then {
781781 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
782782 if ((cBalBBefore == cBalBBefore))
783783 then {
784784 let inv = if ((pType == SF_POOL))
785785 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
786786 else {
787787 let inv = unstakeLP(pool, pType, shareId, userCanWithdraw)
788788 if ((inv == inv))
789789 then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)])
790790 else throw("Strict value is not equal to itself.")
791791 }
792792 if ((inv == inv))
793793 then {
794794 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
795795 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
796796 let $t02453624625 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
797797 let tokensAmountA = $t02453624625._1
798798 let tokensAmountB = $t02453624625._2
799799 let $t02462825324 = if ((debt > 0))
800800 then {
801801 let amountToGetEx = if (if ((borrowAsset == assetIdA))
802802 then (debt > tokensAmountA)
803803 else false)
804804 then (debt - tokensAmountA)
805805 else if (if ((borrowAsset == assetIdB))
806806 then (debt > tokensAmountB)
807807 else false)
808808 then (debt - tokensAmountB)
809809 else 0
810810 let exInv = if ((amountToGetEx > 0))
811811 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
812812 else 0
813813 if ((exInv == exInv))
814814 then {
815815 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
816816 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
817817 $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore))
818818 }
819819 else throw("Strict value is not equal to itself.")
820820 }
821821 else $Tuple2(tokensAmountA, tokensAmountB)
822822 let toUserAmountA = $t02462825324._1
823823 let toUserAmountB = $t02462825324._2
824824 $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId)
825825 }
826826 else throw("Strict value is not equal to itself.")
827827 }
828828 else throw("Strict value is not equal to itself.")
829829 }
830830 else throw("Strict value is not equal to itself.")
831831 }
832832
833833
834834 func userCanWithdrawShareCalc (user,pool,posId,borrowed) = {
835835 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
836836 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
837837 let poolInterest = if (borrowed)
838838 then getIntegerValue(this, (pool + kPoolInterestLoan))
839839 else getIntegerValue(this, (pool + kPoolInterestNoLoan))
840840 (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10))
841841 }
842842
843843
844844 func withdrawToUser (user,pool,posId,stopLoss) = {
845845 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
846846 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
847847 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0)
848848 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
849849 let poolTotalShare = getPoolTotalShare(pool)
850850 let userAddr = Address(fromBase58String(user))
851851 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
852852 let debt = if ((borrowAmount > 0))
853853 then {
854854 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + posId), borrowAsset], nil)
855855 if ($isInstanceOf(@, "Int"))
856856 then @
857857 else throw(($getType(@) + " couldn't be cast to Int"))
858858 }
859859 else 0
860860 let $t02683626989 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
861861 if (($t02683626989 == $t02683626989))
862862 then {
863863 let shareId = $t02683626989._7
864864 let cBalBAfter = $t02683626989._6
865865 let cBalAAfter = $t02683626989._5
866866 let assetIdB = $t02683626989._4
867867 let toUserAmountB = $t02683626989._3
868868 let assetIdA = $t02683626989._2
869869 let toUserAmountA = $t02683626989._1
870870 let closeDbtInv = if ((debt > 0))
871871 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
872872 else 0
873873 if ((closeDbtInv == closeDbtInv))
874874 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))
875875 else throw("Strict value is not equal to itself.")
876876 }
877877 else throw("Strict value is not equal to itself.")
878878 }
879879
880880
881881 func parseRequest (requestId) = {
882882 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
883883 let user = request[0]
884884 let pool = request[1]
885885 let pmtA = parseIntValue(request[2])
886886 let AId = request[3]
887887 let pmtB = parseIntValue(request[4])
888888 let BId = request[5]
889889 let balA = parseIntValue(request[6])
890890 let balB = parseIntValue(request[7])
891891 let shareId = request[8]
892892 let bwAsset = request[9]
893893 let bwAmount = parseIntValue(request[10])
894894 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
895895 }
896896
897897
898+func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
899+ let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
900+ if ($isInstanceOf(@, "(Int, Int)"))
901+ then @
902+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
903+ let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
904+ if ($isInstanceOf(@, "(Int, Int)"))
905+ then @
906+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
907+ let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
908+ let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
909+ let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
910+ let $t02867528772 = if ((borrowId == aId))
911+ then $Tuple2(dPriceA, decPrA)
912+ else $Tuple2(dPriceB, decPrB)
913+ let borrowPrice = $t02867528772._1
914+ let borrowDecPr = $t02867528772._2
915+ fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
916+ }
917+
918+
898919 @Callable(i)
899-func replenishEVALONLY (pool,leverage,borrowAssetId,pmtA,pmtB) = if (if ((100 > leverage))
920+func replenishEVALONLY (pool,leverage,borrowId,pmtA,pmtB) = if (if ((100 > leverage))
900921 then true
901922 else (leverage > 300))
902923 then throw("Leverage can't be <100 and >300")
903924 else {
904925 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
905- let $t02850128591 = getPoolData(Address(fromBase58String(pool)), pType)
906- let AId = $t02850128591._1
907- let BId = $t02850128591._2
908- let balA = $t02850128591._3
909- let balB = $t02850128591._4
910- let shareId = $t02850128591._5
926+ let $t02918429274 = getPoolData(Address(fromBase58String(pool)), pType)
927+ let AId = $t02918429274._1
928+ let BId = $t02918429274._2
929+ let balA = $t02918429274._3
930+ let balB = $t02918429274._4
931+ let shareId = $t02918429274._5
911932 let borrowAmount = if ((leverage > 100))
912- then {
913- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [AId, false], nil)
914- if ($isInstanceOf(@, "(Int, Int)"))
915- then @
916- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
917- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [BId, false], nil)
918- if ($isInstanceOf(@, "(Int, Int)"))
919- then @
920- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
921- let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(AId), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(BId), 0, 0, DOWN)))
922- let borrowPrice = if ((borrowAssetId == AId))
923- then dPriceA
924- else dPriceB
925- (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice)
926- }
933+ then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
927934 else 0
928- let $t02916029272 = if ((borrowAssetId == AId))
935+ let $t02940929516 = if ((borrowId == AId))
929936 then $Tuple2((pmtA + borrowAmount), pmtB)
930937 else $Tuple2(pmtA, (pmtB + borrowAmount))
931- let payInA = $t02916029272._1
932- let payInB = $t02916029272._2
938+ let payInA = $t02940929516._1
939+ let payInB = $t02940929516._2
933940 let lpAmount = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
934941 let newBalA = (balA + payInA)
935942 let newBalB = (balB + payInB)
936- let $t02942929570 = calcWithdrawLPVirt(pType, pool, lpAmount, shareId, AId, BId, newBalA, newBalB, borrowAmount, borrowAssetId)
937- if (($t02942929570 == $t02942929570))
943+ let $t02967329809 = calcWithdrawLPVirt(pType, pool, lpAmount, shareId, AId, BId, newBalA, newBalB, borrowAmount, borrowId)
944+ if (($t02967329809 == $t02967329809))
938945 then {
939- let amountGetB = $t02942929570._2
940- let amountGetA = $t02942929570._1
946+ let amountGetB = $t02967329809._2
947+ let amountGetA = $t02967329809._1
941948 let ratioBefore = fraction(balB, SCALE8, balA)
942949 let ratioAfter = fraction((newBalB - amountGetB), SCALE8, (newBalA - amountGetA))
943950 let impact = (SCALE8 - fraction(ratioBefore, SCALE8, ratioAfter))
944951 let impactMod = if ((0 > impact))
945952 then (impact * -1)
946953 else impact
947954 $Tuple2(nil, [amountGetA, amountGetB, impactMod])
948955 }
949956 else throw("Strict value is not equal to itself.")
950957 }
951958
952959
953960
954961 @Callable(i)
955962 func getShareAssetPriceREADONLY (shareId) = {
956963 let sharePrices = getSharePrice([shareId])
957964 $Tuple2(nil, sharePrices[0])
958965 }
959966
960967
961968
962969 @Callable(i)
963970 func getUserPositionShareAmountREADONLY (user,posNum) = {
964971 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position")
965972 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount))
966973 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0))
967974 $Tuple2(nil, userCanWithdraw)
968975 }
969976
970977
971978
972979 @Callable(i)
973-func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
980+func replenish (pool,leverage,borrowId) = if (if ((100 > leverage))
974981 then true
975982 else (leverage > 300))
976983 then throw("Leverage can't be <100 and >300")
977984 else {
978985 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
979- let $t03072430814 = getPoolData(Address(fromBase58String(pool)), pType)
980- let AId = $t03072430814._1
981- let BId = $t03072430814._2
982- let balA = $t03072430814._3
983- let balB = $t03072430814._4
984- let shareId = $t03072430814._5
985- let $t03081731454 = if ((size(i.payments) == 2))
986+ let $t03095831048 = getPoolData(Address(fromBase58String(pool)), pType)
987+ let AId = $t03095831048._1
988+ let BId = $t03095831048._2
989+ let balA = $t03095831048._3
990+ let balB = $t03095831048._4
991+ let shareId = $t03095831048._5
992+ let $t03105131688 = if ((size(i.payments) == 2))
986993 then if ((assetIdToStr(i.payments[0].assetId) != AId))
987994 then throw("Wrong payment asset A")
988995 else if ((assetIdToStr(i.payments[1].assetId) != BId))
989996 then throw("Wrong payment asset B")
990997 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
991998 else if ((size(i.payments) == 1))
992999 then if ((assetIdToStr(i.payments[0].assetId) == AId))
9931000 then $Tuple4(i.payments[0].amount, AId, 0, BId)
9941001 else if ((assetIdToStr(i.payments[0].assetId) == BId))
9951002 then $Tuple4(0, AId, i.payments[0].amount, BId)
9961003 else throw("Wrong payment")
9971004 else throw("One or two payments expected")
998- let pmtA = $t03081731454._1
999- let pmtAssetA = $t03081731454._2
1000- let pmtB = $t03081731454._3
1001- let pmtAssetB = $t03081731454._4
1005+ let pmtA = $t03105131688._1
1006+ let pmtAssetA = $t03105131688._2
1007+ let pmtB = $t03105131688._3
1008+ let pmtAssetB = $t03105131688._4
10021009 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
10031010 if ((leverage > 100))
10041011 then {
1005- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
1006- if ($isInstanceOf(@, "(Int, Int)"))
1007- then @
1008- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
1009- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
1010- if ($isInstanceOf(@, "(Int, Int)"))
1011- then @
1012- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
1013- let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
1014- let borrowPrice = if ((borrowAssetId == AId))
1015- then dPriceA
1016- else dPriceB
1017- let borrowAmount = fraction(fraction(paydInDollar, (leverage - 100), 100), pow(10, 0, getAssetDecimals(borrowAssetId), 0, 0, DOWN), borrowPrice)
1018- let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
1012+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1013+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
10191014 let newRequestId = {
10201015 let @ = invoke(this, "createNewRequest", [request], nil)
10211016 if ($isInstanceOf(@, "Int"))
10221017 then @
10231018 else throw(($getType(@) + " couldn't be cast to Int"))
10241019 }
10251020 if ((newRequestId == newRequestId))
10261021 then {
1027- let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1022+ let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
10281023 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
10291024 if ((inv == inv))
10301025 then nil
10311026 else throw("Strict value is not equal to itself.")
10321027 }
10331028 else throw("Strict value is not equal to itself.")
10341029 }
10351030 else {
1036- let $t03290433016 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1037- let userStaked = $t03290433016._1
1038- let axlyFee = $t03290433016._2
1031+ let $t03262232734 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1032+ let userStaked = $t03262232734._1
1033+ let axlyFee = $t03262232734._2
10391034 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
10401035 }
10411036 }
10421037
10431038
10441039
10451040 @Callable(i)
10461041 func replenishFromLand (requestId) = {
1047- let $t03322733331 = parseRequest(requestId)
1048- let user = $t03322733331._1
1049- let pool = $t03322733331._2
1050- let pmtA = $t03322733331._3
1051- let AId = $t03322733331._4
1052- let pmtB = $t03322733331._5
1053- let BId = $t03322733331._6
1054- let balA = $t03322733331._7
1055- let balB = $t03322733331._8
1056- let shareId = $t03322733331._9
1057- let bwAsset = $t03322733331._10
1058- let bwAmount = $t03322733331._11
1042+ let $t03294533049 = parseRequest(requestId)
1043+ let user = $t03294533049._1
1044+ let pool = $t03294533049._2
1045+ let pmtA = $t03294533049._3
1046+ let AId = $t03294533049._4
1047+ let pmtB = $t03294533049._5
1048+ let BId = $t03294533049._6
1049+ let balA = $t03294533049._7
1050+ let balB = $t03294533049._8
1051+ let shareId = $t03294533049._9
1052+ let bwAsset = $t03294533049._10
1053+ let bwAmount = $t03294533049._11
10591054 if ((size(i.payments) != 1))
10601055 then throw("Wrong payment size")
10611056 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
10621057 then true
10631058 else (i.payments[0].amount != bwAmount))
10641059 then throw("Wrong payment")
10651060 else {
1066- let $t03352133645 = if ((AId == bwAsset))
1061+ let $t03323933363 = if ((AId == bwAsset))
10671062 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
10681063 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1069- let pmtAllA = $t03352133645._1
1070- let pmtAllB = $t03352133645._2
1064+ let pmtAllA = $t03323933363._1
1065+ let pmtAllB = $t03323933363._2
10711066 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1072- let $t03372733836 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1073- let userStaked = $t03372733836._1
1074- let axlyFee = $t03372733836._2
1067+ let $t03344533554 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1068+ let userStaked = $t03344533554._1
1069+ let axlyFee = $t03344533554._2
10751070 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
10761071 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
10771072 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
10781073 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
10791074 }
10801075 }
10811076
10821077
10831078
10841079 @Callable(i)
10851080 func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false)
10861081
10871082
10881083
10891084 @Callable(i)
10901085 func createUpdateStopLoss (posId,poolId,assetId,price) = {
10911086 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
10921087 if ($isInstanceOf(@, "(Int, Int)"))
10931088 then @
10941089 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
10951090 if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
10961091 then throw("There are no user position")
10971092 else if ((0 >= price))
10981093 then throw("Price must be greater than 0")
10991094 else if ((price > tokenOraclePrice))
11001095 then throw("Price must be less than current token price")
11011096 else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
11021097 }
11031098
11041099
11051100
11061101 @Callable(i)
11071102 func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
11081103 then throw("No entry")
11091104 else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
11101105
11111106
11121107
11131108 @Callable(i)
11141109 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
11151110 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
11161111 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
11171112 })
11181113
11191114
11201115
11211116 @Callable(i)
11221117 func stopLoss (user,posId,pool,assetId) = {
11231118 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
11241119 if ($isInstanceOf(@, "(Int, Int)"))
11251120 then @
11261121 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
11271122 if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
11281123 then throw("No entry")
11291124 else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))
11301125 }
11311126
11321127
11331128
11341129 @Callable(i)
11351130 func liquidate (user,posId,liquidateAmount) = {
11361131 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
11371132 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1138- let $t03661936709 = getPoolData(Address(fromBase58String(pool)), pType)
1139- let AId = $t03661936709._1
1140- let BId = $t03661936709._2
1141- let balA = $t03661936709._3
1142- let balB = $t03661936709._4
1143- let shareId = $t03661936709._5
1133+ let $t03633736427 = getPoolData(Address(fromBase58String(pool)), pType)
1134+ let AId = $t03633736427._1
1135+ let BId = $t03633736427._2
1136+ let balA = $t03633736427._3
1137+ let balB = $t03633736427._4
1138+ let shareId = $t03633736427._5
11441139 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
11451140 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
11461141 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
11471142 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
11481143 if ((borrowAmount == 0))
11491144 then throw("You can't liquidate position without borrow")
11501145 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))]
11511146 }
11521147
11531148
11541149
11551150 @Callable(i)
11561151 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
1157- let $t03794438138 = if (claim)
1152+ let $t03766237856 = if (claim)
11581153 then claimFarmed(type, pool)
11591154 else {
11601155 let claimedAsset = if ((type == SF_POOL))
11611156 then SWOPID
11621157 else WXID
11631158 $Tuple2(amountToExchange, claimedAsset)
11641159 }
1165- let claimedAmount = $t03794438138._1
1166- let claimedAsset = $t03794438138._2
1160+ let claimedAmount = $t03766237856._1
1161+ let claimedAsset = $t03766237856._2
11671162 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
11681163 let change = (claimedAmount - amountToExchange)
11691164 let changeEntry = if ((change > 0))
11701165 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
11711166 else nil
11721167 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
11731168 }
11741169
11751170
11761171
11771172 @Callable(i)
11781173 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
1179- let $t03879538989 = if (claim)
1174+ let $t03851338707 = if (claim)
11801175 then claimFarmed(type, pool)
11811176 else {
11821177 let claimedAsset = if ((type == SF_POOL))
11831178 then SWOPID
11841179 else WXID
11851180 $Tuple2(amountToExchange, claimedAsset)
11861181 }
1187- let claimedAmount = $t03879538989._1
1188- let claimedAsset = $t03879538989._2
1182+ let claimedAmount = $t03851338707._1
1183+ let claimedAsset = $t03851338707._2
11891184 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
11901185 let change = (claimedAmount - amountToExchange)
11911186 let changeEntry = if ((change > 0))
11921187 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
11931188 else nil
11941189 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
11951190 }
11961191
11971192
11981193
11991194 @Callable(i)
12001195 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
1201- let $t03971239906 = if (claim)
1196+ let $t03943039624 = if (claim)
12021197 then claimFarmed(type, pool)
12031198 else {
12041199 let claimedAsset = if ((type == SF_POOL))
12051200 then SWOPID
12061201 else WXID
12071202 $Tuple2(amountToExchange, claimedAsset)
12081203 }
1209- let claimedAmount = $t03971239906._1
1210- let claimedAsset = $t03971239906._2
1204+ let claimedAmount = $t03943039624._1
1205+ let claimedAsset = $t03943039624._2
12111206 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
12121207 let change = (claimedAmount - amountToExchange)
12131208 let changeEntry = if ((change > 0))
12141209 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12151210 else nil
12161211 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
12171212 }
12181213
12191214
12201215
12211216 @Callable(i)
12221217 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = if (if ((type != SF_POOL))
12231218 then (type != WX_POOL)
12241219 else false)
12251220 then throw("Wrong type")
12261221 else {
1227- let $t04059940693 = getPoolData(Address(fromBase58String(poolAddr)), type)
1228- let aId = $t04059940693._1
1229- let bId = $t04059940693._2
1230- let aBal = $t04059940693._3
1231- let bBal = $t04059940693._4
1232- let shareId = $t04059940693._5
1222+ let $t04031740411 = getPoolData(Address(fromBase58String(poolAddr)), type)
1223+ let aId = $t04031740411._1
1224+ let bId = $t04031740411._2
1225+ let aBal = $t04031740411._3
1226+ let bBal = $t04031740411._4
1227+ let shareId = $t04031740411._5
12331228 [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)]
12341229 }
12351230
12361231
12371232
12381233 @Callable(i)
12391234 func capitalizeTest (pool,pType,tokenId,tokenAmount) = {
12401235 let poolAddr = Address(fromBase58String(pool))
1241- let $t04148941568 = getPoolData(poolAddr, pType)
1242- let AId = $t04148941568._1
1243- let BId = $t04148941568._2
1244- let balA = $t04148941568._3
1245- let balB = $t04148941568._4
1246- let shareId = $t04148941568._5
1247- let $t04157141651 = if ((tokenId == AId))
1236+ let $t04120741286 = getPoolData(poolAddr, pType)
1237+ let AId = $t04120741286._1
1238+ let BId = $t04120741286._2
1239+ let balA = $t04120741286._3
1240+ let balB = $t04120741286._4
1241+ let shareId = $t04120741286._5
1242+ let $t04128941369 = if ((tokenId == AId))
12481243 then $Tuple2(tokenAmount, 0)
12491244 else $Tuple2(0, tokenAmount)
1250- let pmtA = $t04157141651._1
1251- let pmtB = $t04157141651._2
1252- let $t04165441758 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1253- let stakedAmount = $t04165441758._1
1254- let nf = $t04165441758._2
1245+ let pmtA = $t04128941369._1
1246+ let pmtB = $t04128941369._2
1247+ let $t04137241476 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1248+ let stakedAmount = $t04137241476._1
1249+ let nf = $t04137241476._2
12551250 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
12561251 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
12571252 let totalShareAmount = getPoolTotalShare(pool)
12581253 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
12591254 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
12601255 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
12611256 let stakedNoLoan = (stakedAmount - stakedLoan)
12621257 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
12631258 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
12641259 else 0
12651260 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
12661261 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
12671262 else 0
12681263 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
12691264 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
12701265 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
12711266 if ((axlyFee == axlyFee))
12721267 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))
12731268 else throw("Strict value is not equal to itself.")
12741269 }
12751270
12761271
12771272
12781273 @Callable(i)
12791274 func claimFarmedTest (type,pool) = if ((type == SF_POOL))
12801275 then {
12811276 let balBefore = accountBalance(SWOPID)
12821277 if ((balBefore == balBefore))
12831278 then {
12841279 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
12851280 if ((inv == inv))
12861281 then {
12871282 let balAfter = accountBalance(SWOPID)
12881283 $Tuple2(nil, $Tuple2((balAfter - balBefore), SWOPID))
12891284 }
12901285 else throw("Strict value is not equal to itself.")
12911286 }
12921287 else throw("Strict value is not equal to itself.")
12931288 }
12941289 else if ((type == WX_POOL))
12951290 then {
12961291 let balBefore = accountBalance(WXID)
12971292 if ((balBefore == balBefore))
12981293 then {
12991294 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
13001295 if ((inv == inv))
13011296 then {
13021297 let balAfter = accountBalance(WXID)
13031298 $Tuple2(nil, $Tuple2((balAfter - balBefore), WXID))
13041299 }
13051300 else throw("Strict value is not equal to itself.")
13061301 }
13071302 else throw("Strict value is not equal to itself.")
13081303 }
13091304 else throw("Wrong pool type")
13101305
13111306
13121307 @Verifier(tx)
13131308 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
13141309

github/deemru/w8io/026f985 
156.86 ms