tx · GE8Q5syFYAaH7jxsXH1nNjEXFaFLCaZwEFRzJUEiB4U5

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.04400000 Waves

2023.07.19 15:05 [2672716] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "GE8Q5syFYAaH7jxsXH1nNjEXFaFLCaZwEFRzJUEiB4U5", "fee": 4400000, "feeAssetId": null, "timestamp": 1689768354615, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "wnJ45KLjMY5S9mmtmGV1jrHndby5WZGiueJgdJE59uiwp7HFsqDRkfhKrUFa6dvrfn2qTximq4pF5WwjpU2xmW1" ], "script": "base64:BgKMAQgCEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg0KCwgIAQQRGBgRAQEYEgkKBwgIAQQIARgSDQoLCAgBBBgYGBgYARgSCwoJCAgBAQEBAQEEbwAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAA9DQVBfRkVFX05PX0xPQU4CCWNhcE5vTG9hbgAMQ0FQX0ZFRV9MT0FOAgdjYXBMb2FuABRTVE9QTE9TU19GRUVfTk9fTE9BTgIOc3RvcExvc3NOb0xvYW4ADVNUT1BMT1NTX0xPQU4CDHN0b3BMb3NzTG9hbgAITE9BTl9GRUUCBGxvYW4AC05PX0xPQU5fRkVFAgZub0xvYW4ABk5PX0ZFRQIFbm9GZWUABlNDQUxFOACAwtcvAAdTQ0FMRTEwAIDIr6AlAAdTQ0FMRTE2CQC2AgEAgICE/qbe4REACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQ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ZXN0TG9hbgAACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRNrUG9vbEludGVyZXN0Tm9Mb2FuAAAJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQVrUG9vbAUIcG9vbEFkZHIFBHR5cGUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQdzaGFyZUlkBQprU2hhcmVQb29sBQhwb29sQWRkcgkAzAgCCQEMQm9vbGVhbkVudHJ5AgkArAICBQhwb29sQWRkcgUOa1Bvb2xDYW5Cb3Jyb3cFCWNhbkJvcnJvdwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleeUVxIg=", "height": 2672716, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4kDj884iCvd4ktETz2jmJpahH5QGtZSiNvwzrQYLCXaY Next: AyWWFYgP6wkUM1FC3xCMC9HYJ2goDhJSBVwsX2YoLdb9 Diff:
OldNewDifferences
814814 else $Tuple2(tokensAmountA, tokensAmountB)
815815 let toUserA = $t02454025394._1
816816 let toUserB = $t02454025394._2
817- $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
817+ $Tuple5(toUserA, assetIdA, toUserB, assetIdB, shareId)
818818 }
819819 else throw("Strict value is not equal to itself.")
820820 }
841841 let poolTotalShare = getPoolTotalShare(pool)
842842 let userAddr = Address(fromBase58String(user))
843843 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
844- let $t02661626850 = if ((borrowAmount > 0))
844+ let $t02659226826 = if ((borrowAmount > 0))
845845 then $Tuple2({
846846 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil)
847847 if ($isInstanceOf(@, "Int"))
849849 else throw(($getType(@) + " couldn't be cast to Int"))
850850 }, STOPLOSS_LOAN)
851851 else $Tuple2(0, STOPLOSS_FEE_NO_LOAN)
852- let debt = $t02661626850._1
853- let feeType = $t02661626850._2
852+ let debt = $t02659226826._1
853+ let feeType = $t02659226826._2
854854 let stopLossFee = if (stopLoss)
855855 then fraction(userCanWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6)
856856 else 0
857- let $t02696727147 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
858- if (($t02696727147 == $t02696727147))
857+ let $t02694327099 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
858+ if (($t02694327099 == $t02694327099))
859859 then {
860- let shareId = $t02696727147._7
861- let cBalBAfter = $t02696727147._6
862- let cBalAAfter = $t02696727147._5
863- let assetIdB = $t02696727147._4
864- let toUserAmountB = $t02696727147._3
865- let assetIdA = $t02696727147._2
866- let toUserAmountA = $t02696727147._1
860+ let shareId = $t02694327099._5
861+ let assetIdB = $t02694327099._4
862+ let toUserAmountB = $t02694327099._3
863+ let assetIdA = $t02694327099._2
864+ let toUserAmountA = $t02694327099._1
867865 let closeDbtInv = if ((debt > 0))
868866 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
869867 else 0
870868 if ((closeDbtInv == closeDbtInv))
871- then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil))
869+ then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil))
872870 else throw("Strict value is not equal to itself.")
873871 }
874872 else throw("Strict value is not equal to itself.")
892890 }
893891
894892
895-func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
896- let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
897- let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
898- let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
899- let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
900- let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
901- let $t02887628973 = if ((borrowId == aId))
902- then $Tuple2(dPriceA, decPrA)
903- else $Tuple2(dPriceB, decPrB)
904- let borrowPrice = $t02887628973._1
905- let borrowDecPr = $t02887628973._2
906- fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
907- }
893+func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = if (if ((borrowId != aId))
894+ then (borrowId != bId)
895+ else false)
896+ then throw("Wrong borrow asset")
897+ else {
898+ let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
899+ let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
900+ let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
901+ let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
902+ let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
903+ let $t02910429201 = if ((borrowId == aId))
904+ then $Tuple2(dPriceA, decPrA)
905+ else $Tuple2(dPriceB, decPrB)
906+ let borrowPrice = $t02910429201._1
907+ let borrowDecPr = $t02910429201._2
908+ fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
909+ }
908910
909911
910912 func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2))
912914 then throw("Wrong payment asset A")
913915 else if ((assetIdToStr(pmts[1].assetId) != BId))
914916 then throw("Wrong payment asset B")
915- else $Tuple4(pmts[0].amount, AId, pmts[1].amount, BId)
917+ else $Tuple2(pmts[0].amount, pmts[1].amount)
916918 else if ((size(pmts) == 1))
917919 then if ((assetIdToStr(pmts[0].assetId) == AId))
918- then $Tuple4(pmts[0].amount, AId, 0, BId)
920+ then $Tuple2(pmts[0].amount, 0)
919921 else if ((assetIdToStr(pmts[0].assetId) == BId))
920- then $Tuple4(0, AId, pmts[0].amount, BId)
922+ then $Tuple2(0, pmts[0].amount)
921923 else throw("Wrong payment")
922924 else throw("One or two payments expected")
923925
951953 @Callable(i)
952954 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
953955 func userPos (a,pool) = {
954- let $t03067230706 = a
955- let totalPos = $t03067230706._1
956- let posDebt = $t03067230706._2
957- let index = $t03067230706._3
956+ let $t03087130905 = a
957+ let totalPos = $t03087130905._1
958+ let posDebt = $t03087130905._2
959+ let index = $t03087130905._3
958960 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
959- let $t03079830888 = getPoolData(Address(fromBase58String(pool)), pType)
960- let AId = $t03079830888._1
961- let BId = $t03079830888._2
962- let balA = $t03079830888._3
963- let balB = $t03079830888._4
964- let shareId = $t03079830888._5
961+ let $t03099731087 = getPoolData(Address(fromBase58String(pool)), pType)
962+ let AId = $t03099731087._1
963+ let BId = $t03099731087._2
964+ let balA = $t03099731087._3
965+ let balB = $t03099731087._4
966+ let shareId = $t03099731087._5
965967 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
966968 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
967969 let sharePrices = getSharePrice(shareId)
984986 }
985987 }
986988
987- let $t03190831963 = {
989+ let $t03210732162 = {
988990 let $l = pools
989991 let $s = size($l)
990992 let $acc0 = $Tuple3(nil, nil, 0)
9981000
9991001 $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)
10001002 }
1001- let pos = $t03190831963._1
1002- let debt = $t03190831963._2
1003+ let pos = $t03210732162._1
1004+ let debt = $t03210732162._2
10031005 $Tuple2(nil, $Tuple2(pos, debt))
10041006 }
10051007
10161018 then throw("You can't borrow in this pool")
10171019 else {
10181020 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1019- let $t03240332493 = getPoolData(Address(fromBase58String(pool)), pType)
1020- let AId = $t03240332493._1
1021- let BId = $t03240332493._2
1022- let balA = $t03240332493._3
1023- let balB = $t03240332493._4
1024- let shareId = $t03240332493._5
1025- let $t03249632577 = parseReplenishPmts(i.payments, AId, BId)
1026- let pmtA = $t03249632577._1
1027- let pmtAssetA = $t03249632577._2
1028- let pmtB = $t03249632577._3
1029- let pmtAssetB = $t03249632577._4
1030- let user = toString(i.caller)
1031- let newPosNum = getNewUserPositionNumber(user)
1032- if ((leverage > 100))
1033- then {
1034- let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1035- let request = makeString([user, pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1036- let newRequestId = {
1037- let @ = invoke(this, "createNewRequest", [request], nil)
1038- if ($isInstanceOf(@, "Int"))
1039- then @
1040- else throw(($getType(@) + " couldn't be cast to Int"))
1041- }
1042- if ((newRequestId == newRequestId))
1021+ let $t03260232692 = getPoolData(Address(fromBase58String(pool)), pType)
1022+ let AId = $t03260232692._1
1023+ let BId = $t03260232692._2
1024+ let balA = $t03260232692._3
1025+ let balB = $t03260232692._4
1026+ let shareId = $t03260232692._5
1027+ if (if ((borrowId != AId))
1028+ then (borrowId != BId)
1029+ else false)
1030+ then throw("Wrong borrow asset")
1031+ else {
1032+ let $t03277332832 = parseReplenishPmts(i.payments, AId, BId)
1033+ let pmtA = $t03277332832._1
1034+ let pmtB = $t03277332832._2
1035+ let user = toString(i.caller)
1036+ let newPosNum = getNewUserPositionNumber(user)
1037+ if ((leverage > 100))
10431038 then {
1044- let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1045- let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1046- if ((inv == inv))
1039+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
1040+ let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1041+ let newRequestId = {
1042+ let @ = invoke(this, "createNewRequest", [request], nil)
1043+ if ($isInstanceOf(@, "Int"))
1044+ then @
1045+ else throw(($getType(@) + " couldn't be cast to Int"))
1046+ }
1047+ if ((newRequestId == newRequestId))
10471048 then {
1048- let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1049- let $t03359033684 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1050- if (($t03359033684 == $t03359033684))
1049+ let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1050+ let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1051+ if ((inv == inv))
10511052 then {
1052- let newBalB = $t03359033684._2
1053- let newBalA = $t03359033684._1
1054- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1055- let $t03375433869 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1056- let wAmountA = $t03375433869._1
1057- let wAmountB = $t03375433869._2
1058- $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1053+ let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1054+ let $t03382133915 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1055+ if (($t03382133915 == $t03382133915))
1056+ then {
1057+ let newBalB = $t03382133915._2
1058+ let newBalA = $t03382133915._1
1059+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1060+ let $t03398534100 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1061+ let wAmountA = $t03398534100._1
1062+ let wAmountB = $t03398534100._2
1063+ $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1064+ }
1065+ else throw("Strict value is not equal to itself.")
10591066 }
10601067 else throw("Strict value is not equal to itself.")
10611068 }
10621069 else throw("Strict value is not equal to itself.")
10631070 }
1064- else throw("Strict value is not equal to itself.")
1065- }
1066- else {
1067- let $t03392234034 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1068- let userStaked = $t03392234034._1
1069- let axlyFee = $t03392234034._2
1070- let $t03404034134 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1071- if (($t03404034134 == $t03404034134))
1072- then {
1073- let newBalB = $t03404034134._2
1074- let newBalA = $t03404034134._1
1075- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1076- let $t03420434319 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1077- let wAmountA = $t03420434319._1
1078- let wAmountB = $t03420434319._2
1079- $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1071+ else {
1072+ let $t03415334268 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1073+ if (($t03415334268 == $t03415334268))
1074+ then {
1075+ let axlyFee = $t03415334268._2
1076+ let userStaked = $t03415334268._1
1077+ let $t03427434368 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1078+ if (($t03427434368 == $t03427434368))
1079+ then {
1080+ let newBalB = $t03427434368._2
1081+ let newBalA = $t03427434368._1
1082+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1083+ let $t03443834553 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1084+ let wAmountA = $t03443834553._1
1085+ let wAmountB = $t03443834553._2
1086+ $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1087+ }
1088+ else throw("Strict value is not equal to itself.")
1089+ }
1090+ else throw("Strict value is not equal to itself.")
10801091 }
1081- else throw("Strict value is not equal to itself.")
10821092 }
10831093 }
10841094
11111121
11121122
11131123 @Callable(i)
1114-func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox)))
1115- then throw("Already inited")
1116- 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)]
1124+func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if ((toString(i.caller) != "3PG42y6FgT8zM3uX5tEDxJF5rqX8AKGJRAR"))
1125+ then throw("Only admin can call this function")
1126+ else if (isDefined(getString(kAdminCallPK)))
1127+ then throw("Already inited")
1128+ 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)]
11171129
11181130
11191131
11271139
11281140 @Callable(i)
11291141 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
1130- let $t03684536949 = parseRequest(requestId)
1131- let user = $t03684536949._1
1132- let pool = $t03684536949._2
1133- let pmtA = $t03684536949._3
1134- let AId = $t03684536949._4
1135- let pmtB = $t03684536949._5
1136- let BId = $t03684536949._6
1137- let balA = $t03684536949._7
1138- let balB = $t03684536949._8
1139- let shareId = $t03684536949._9
1140- let bwAsset = $t03684536949._10
1141- let bwAmount = $t03684536949._11
1142+ let $t03720037304 = parseRequest(requestId)
1143+ let user = $t03720037304._1
1144+ let pool = $t03720037304._2
1145+ let pmtA = $t03720037304._3
1146+ let AId = $t03720037304._4
1147+ let pmtB = $t03720037304._5
1148+ let BId = $t03720037304._6
1149+ let balA = $t03720037304._7
1150+ let balB = $t03720037304._8
1151+ let shareId = $t03720037304._9
1152+ let bwAsset = $t03720037304._10
1153+ let bwAmount = $t03720037304._11
11421154 if ((size(i.payments) != 1))
11431155 then throw("Wrong payment size")
11441156 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
11461158 else (i.payments[0].amount != bwAmount))
11471159 then throw("Wrong payment")
11481160 else {
1149- let $t03713937263 = if ((AId == bwAsset))
1150- then $Tuple2((pmtA + i.payments[0].amount), pmtB)
1151- else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1152- let pmtAllA = $t03713937263._1
1153- let pmtAllB = $t03713937263._2
1161+ let $t03749437594 = if ((AId == bwAsset))
1162+ then $Tuple2((pmtA + bwAmount), pmtB)
1163+ else $Tuple2(pmtA, (pmtB + bwAmount))
1164+ let pmtAllA = $t03749437594._1
1165+ let pmtAllB = $t03749437594._2
11541166 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1155- let $t03734537460 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1156- let userStaked = $t03734537460._1
1157- let axlyFee = $t03734537460._2
1167+ let $t03767637791 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1168+ let userStaked = $t03767637791._1
1169+ let axlyFee = $t03767637791._2
11581170 let posNum = getNewUserPositionNumber(user)
11591171 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
11601172 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
1161- let $t03782037935 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1162- let wAmountA = $t03782037935._1
1163- let wAmountB = $t03782037935._2
1173+ let $t03815138266 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1174+ let wAmountA = $t03815138266._1
1175+ let wAmountB = $t03815138266._2
11641176 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
11651177 }
11661178 })
11711183 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
11721184 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
11731185 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1174- let $t03843038520 = getPoolData(Address(fromBase58String(pool)), pType)
1175- let AId = $t03843038520._1
1176- let BId = $t03843038520._2
1177- let balA = $t03843038520._3
1178- let balB = $t03843038520._4
1179- let shareId = $t03843038520._5
1186+ let $t03876138851 = getPoolData(Address(fromBase58String(pool)), pType)
1187+ let AId = $t03876138851._1
1188+ let BId = $t03876138851._2
1189+ let balA = $t03876138851._3
1190+ let balB = $t03876138851._4
1191+ let shareId = $t03876138851._5
11801192 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
11811193 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
11821194 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12051217 @Callable(i)
12061218 func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
12071219 let pType = getStringValue(this, (kPool + pool))
1208- let $t04049340784 = if (claim)
1220+ let $t04082441115 = if (claim)
12091221 then claimFarmed(pType, pool)
12101222 else {
12111223 let claimedAsset = if ((pType == SF_POOL))
12151227 else unknownPoolType()
12161228 $Tuple2(amountToExchange, claimedAsset)
12171229 }
1218- let claimedAmount = $t04049340784._1
1219- let claimedAsset = $t04049340784._2
1230+ let claimedAmount = $t04082441115._1
1231+ let claimedAsset = $t04082441115._2
12201232 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12211233 let change = (claimedAmount - amountToExchange)
12221234 let changeEntry = if ((change > 0))
12301242 @Callable(i)
12311243 func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
12321244 let pType = getStringValue(this, (kPool + pool))
1233- let $t04150141792 = if (claim)
1245+ let $t04183242123 = if (claim)
12341246 then claimFarmed(pType, pool)
12351247 else {
12361248 let claimedAsset = if ((pType == SF_POOL))
12401252 else unknownPoolType()
12411253 $Tuple2(amountToExchange, claimedAsset)
12421254 }
1243- let claimedAmount = $t04150141792._1
1244- let claimedAsset = $t04150141792._2
1255+ let claimedAmount = $t04183242123._1
1256+ let claimedAsset = $t04183242123._2
12451257 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
12461258 let change = (claimedAmount - amountToExchange)
12471259 let changeEntry = if ((change > 0))
12551267 @Callable(i)
12561268 func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
12571269 let pType = getStringValue(this, (kPool + pool))
1258- let $t04257642867 = if (claim)
1270+ let $t04290743198 = if (claim)
12591271 then claimFarmed(pType, pool)
12601272 else {
12611273 let claimedAsset = if ((pType == SF_POOL))
12651277 else unknownPoolType()
12661278 $Tuple2(amountToExchange, claimedAsset)
12671279 }
1268- let claimedAmount = $t04257642867._1
1269- let claimedAsset = $t04257642867._2
1280+ let claimedAmount = $t04290743198._1
1281+ let claimedAsset = $t04290743198._2
12701282 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
12711283 let change = (claimedAmount - amountToExchange)
12721284 let changeEntry = if ((change > 0))
12831295 else false)
12841296 then throw("Wrong type")
12851297 else {
1286- let $t04360943703 = getPoolData(Address(fromBase58String(poolAddr)), type)
1287- let aId = $t04360943703._1
1288- let bId = $t04360943703._2
1289- let aBal = $t04360943703._3
1290- let bBal = $t04360943703._4
1291- let shareId = $t04360943703._5
1292-[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)]
1298+ let $t04394044034 = getPoolData(Address(fromBase58String(poolAddr)), type)
1299+ let aId = $t04394044034._1
1300+ let bId = $t04394044034._2
1301+ let aBal = $t04394044034._3
1302+ let bBal = $t04394044034._4
1303+ let shareId = $t04394044034._5
1304+ if ((0 > inFeeNoLoan))
1305+ then throw("inFeeNoLoan must be greater than 0")
1306+ else if ((0 > inFeeLoan))
1307+ then throw("inFeeLoan must be greater than 0")
1308+ else if ((0 > capFeeNoLoan))
1309+ then throw("capFeeNoLoan must be greater than 0")
1310+ else if ((0 > capFeeWithLoan))
1311+ then throw("capFeeWithLoan must be greater than 0")
1312+ else if ((0 > stoplossFeeNoLoan))
1313+ then throw("stoplossFeeNoLoan must be greater than 0")
1314+ else if ((0 > stoplossFeeWithLoan))
1315+ then throw("stoplossFeeWithLoan must be greater than 0")
1316+ else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)]
12931317 })
12941318
12951319
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 SCALE16 = toBigInt(10000000000000000)
2727
2828 let FEE_SCALE6 = 1000000
2929
3030 let kSFPoolAAssetBalance = "A_asset_balance"
3131
3232 let kSFPoolBAssetBalance = "B_asset_balance"
3333
3434 let kSFPoolAAssetId = "A_asset_id"
3535
3636 let kSFPoolBAssetId = "B_asset_id"
3737
3838 let kSFPoolShareId = "share_asset_id"
3939
4040 let kSFPoolShareSupply = "share_asset_supply"
4141
4242 let kSFPoolFee = "commission"
4343
4444 let kUserPosition = "_userPosition"
4545
4646 let kUserPositionPool = "_userPositionPool"
4747
4848 let kUserBorrowAmount = "_userPositionBorrowAmount"
4949
5050 let kUserBorrowAssetId = "_userPositionBorrowAssetId"
5151
5252 let kUserPositionNum = "_userPositionNumber"
5353
5454 let kUserPositionInterest = "_userPositionInterest"
5555
5656 let kPoolTotal = "_poolTotal"
5757
5858 let kPoolTotalLoan = "_poolTotalLoan"
5959
6060 let kPoolInterestLoan = "_poolInterestLoan"
6161
6262 let kPoolInterestNoLoan = "_poolInterestNoLoan"
6363
6464 let kPoolCanBorrow = "_poolCanBorrow"
6565
6666 let kAxlyInFeeWithoutLoan = "_axlyFeeNoLoan"
6767
6868 let kAxlyInFeeWithLoan = "_axlyFeeWithLoan"
6969
7070 let kAxlyNoLoanCapFee = "_axlyFeeCapWithLoan"
7171
7272 let kAxlyWithLoanCapFee = "_axlyFeeCapNoLoan"
7373
7474 let kAxlyStopLossNoLoanFee = "_axlyFeeStoplossWithLoan"
7575
7676 let kAxlyStopLossLoanFee = "_axlyFeeStoplossNoLoan"
7777
7878 let kRequestId = "_request_id"
7979
8080 let kRequestIter = "requests_iter"
8181
8282 let kPool = "pool_"
8383
8484 let kSharePool = "_poolShareId"
8585
8686 let kPoolCapChange = "_poolCapChange"
8787
8888 let kTokenLastPrice = "last_price"
8989
9090 let kPriceInOracle = "_twap5B"
9191
9292 let kUserStopLoss = "_stopLoss"
9393
9494 let kMoneyBox = "axly_money_box"
9595
9696 let kSFFarmingAddr = "swopfi_farming_addr"
9797
9898 let kLendService = "lend_service_addr"
9999
100100 let kAdminCallPK = "admin_call_pub_key"
101101
102102 let kPriceOracle = "price_oracle"
103103
104104 let kExContract = "exchange_contract"
105105
106106 let kWxSwapContract = "wx_swap_contract"
107107
108108 let kSwopId = "swop_id"
109109
110110 let kWxId = "wx_id"
111111
112112 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
113113
114114 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
115115
116116 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
117117
118118 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
119119
120120 let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id"))
121121
122122 let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id"))
123123
124124 func unknownPoolType () = throw("Wrong pool type")
125125
126126
127127 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
128128
129129
130130 func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr")))
131131
132132
133133 func isAdminCall (i) = if ((i.caller == getAdminCallAddr()))
134134 then unit
135135 else throw("Only admin can call this function")
136136
137137
138138 func isSelfCall (i) = if ((i.caller == this))
139139 then unit
140140 else throw("Only contract itself can call this function")
141141
142142
143143 func isLandCall (i) = if ((i.caller == getLendSrvAddr()))
144144 then unit
145145 else throw("Only land contract can call this function")
146146
147147
148148 func accountBalance (assetId) = match assetId {
149149 case id: ByteVector =>
150150 assetBalance(this, id)
151151 case waves: Unit =>
152152 wavesBalance(this).available
153153 case _ =>
154154 throw("Match error")
155155 }
156156
157157
158158 func getSFPoolBalances (poolAddr) = $Tuple2(valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance"))
159159
160160
161161 func getWXPoolBalances (poolAddr,aId,bId) = $Tuple2({
162162 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
163163 if ($isInstanceOf(@, "Int"))
164164 then @
165165 else throw(($getType(@) + " couldn't be cast to Int"))
166166 }, {
167167 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
168168 if ($isInstanceOf(@, "Int"))
169169 then @
170170 else throw(($getType(@) + " couldn't be cast to Int"))
171171 })
172172
173173
174174 func getPoolBalances (poolAddr,type,aId,bId) = if ((type == SF_POOL))
175175 then getSFPoolBalances(poolAddr)
176176 else if ((type == WX_POOL))
177177 then getWXPoolBalances(poolAddr, aId, bId)
178178 else unknownPoolType()
179179
180180
181181 func getSFPoolData (poolAddr) = {
182182 let $t061796228 = getSFPoolBalances(poolAddr)
183183 if (($t061796228 == $t061796228))
184184 then {
185185 let balB = $t061796228._2
186186 let balA = $t061796228._1
187187 $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), balA, balB, valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id"))
188188 }
189189 else throw("Strict value is not equal to itself.")
190190 }
191191
192192
193193 func getWXPoolData (poolAddr) = {
194194 let cfg = {
195195 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
196196 if ($isInstanceOf(@, "List[Any]"))
197197 then @
198198 else throw(($getType(@) + " couldn't be cast to List[Any]"))
199199 }
200200 if ((cfg == cfg))
201201 then {
202202 let aId = valueOrErrorMessage({
203203 let @ = cfg[4]
204204 if ($isInstanceOf(@, "String"))
205205 then @
206206 else unit
207207 }, "Can't get pool A asset id")
208208 let bId = valueOrErrorMessage({
209209 let @ = cfg[5]
210210 if ($isInstanceOf(@, "String"))
211211 then @
212212 else unit
213213 }, "Can't get pool B asset id")
214214 let shareId = valueOrErrorMessage({
215215 let @ = cfg[3]
216216 if ($isInstanceOf(@, "String"))
217217 then @
218218 else unit
219219 }, "Can't get pool LP asset id")
220220 let $t069256984 = getWXPoolBalances(poolAddr, aId, bId)
221221 if (($t069256984 == $t069256984))
222222 then {
223223 let balB = $t069256984._2
224224 let balA = $t069256984._1
225225 $Tuple5(aId, bId, balA, balB, shareId)
226226 }
227227 else throw("Strict value is not equal to itself.")
228228 }
229229 else throw("Strict value is not equal to itself.")
230230 }
231231
232232
233233 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
234234 then getSFPoolData(poolAddr)
235235 else if ((type == WX_POOL))
236236 then getWXPoolData(poolAddr)
237237 else unknownPoolType()
238238
239239
240240 func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
241241 then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
242242 else if ((type == WX_POOL))
243243 then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
244244 else unknownPoolType()
245245
246246
247247 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
248248
249249
250250 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
251251
252252
253253 func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1)
254254
255255
256256 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
257257 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
258258 else if ((feeType == CAP_FEE_NO_LOAN))
259259 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
260260 else if ((feeType == LOAN_FEE))
261261 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
262262 else if ((feeType == NO_LOAN_FEE))
263263 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
264264 else if ((feeType == NO_FEE))
265265 then 0
266266 else throw("Wrong fee type")
267267
268268
269269 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
270270
271271
272272 func getWXFarmingAddr (poolAddr) = {
273273 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
274274 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
275275 Address(fromBase58String(factroyCfg[1]))
276276 }
277277
278278
279279 func assetIdToStr (assetId) = match assetId {
280280 case id: ByteVector =>
281281 toBase58String(id)
282282 case waves: Unit =>
283283 "WAVES"
284284 case _ =>
285285 throw("Not Asset id")
286286 }
287287
288288
289289 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
290290 then unit
291291 else fromBase58String(assetId)
292292
293293
294294 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
295295 then 8
296296 else match assetInfo(fromBase58String(assetId)) {
297297 case asset: Asset =>
298298 asset.decimals
299299 case _ =>
300300 throw("Can't find asset")
301301 }
302302
303303
304304 func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
305305
306306
307307 func getAssetsPrice (assetIds) = {
308308 func getPrices (a,assetId) = {
309309 let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
310310 (a :+ assetPrice)
311311 }
312312
313313 let $l = assetIds
314314 let $s = size($l)
315315 let $acc0 = nil
316316 func $f0_1 ($a,$i) = if (($i >= $s))
317317 then $a
318318 else getPrices($a, $l[$i])
319319
320320 func $f0_2 ($a,$i) = if (($i >= $s))
321321 then $a
322322 else throw("List size exceeds 50")
323323
324324 $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)
325325 }
326326
327327
328328 func getSharePrice (shareId) = {
329329 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
330330 let poolAddr = Address(fromBase58String(pool))
331331 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
332332 let $t0996210027 = getPoolData(poolAddr, pType)
333333 let aId = $t0996210027._1
334334 let bId = $t0996210027._2
335335 let aBalance = $t0996210027._3
336336 let bBalance = $t0996210027._4
337337 let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
338338 let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
339339 let shareSupply = getShareSupply(poolAddr, pType, shareId)
340340 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
341341 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
342342 let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
343343 let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
344344 fraction(sum, sharePrecision, shareSupply)
345345 }
346346
347347
348348 func getSharePrices (shareIds) = {
349349 func getPrices (a,shareId) = (a :+ getSharePrice(shareId))
350350
351351 let $l = shareIds
352352 let $s = size($l)
353353 let $acc0 = nil
354354 func $f0_1 ($a,$i) = if (($i >= $s))
355355 then $a
356356 else getPrices($a, $l[$i])
357357
358358 func $f0_2 ($a,$i) = if (($i >= $s))
359359 then $a
360360 else throw("List size exceeds 20")
361361
362362 $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)
363363 }
364364
365365
366366 func getCursEntries (aId,bId,shareId,wAmounts) = {
367367 let assetsPrices = getAssetsPrice([aId, bId])
368368 let sharePrice = getSharePrice(shareId)
369369 let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts)
370370 [StringEntry(kTokenLastPrice, makeString(prices, ","))]
371371 }
372372
373373
374374 func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL))
375375 then {
376376 let repl = {
377377 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil)
378378 if ($isInstanceOf(@, "List[Any]"))
379379 then @
380380 else throw(($getType(@) + " couldn't be cast to List[Any]"))
381381 }
382382 if ((repl == repl))
383383 then $Tuple5({
384384 let @ = repl[3]
385385 if ($isInstanceOf(@, "Int"))
386386 then @
387387 else throw(($getType(@) + " couldn't be cast to Int"))
388388 }, {
389389 let @ = repl[4]
390390 if ($isInstanceOf(@, "Int"))
391391 then @
392392 else throw(($getType(@) + " couldn't be cast to Int"))
393393 }, {
394394 let @ = repl[1]
395395 if ($isInstanceOf(@, "Int"))
396396 then @
397397 else throw(($getType(@) + " couldn't be cast to Int"))
398398 }, assetIdToStr(repl[2]), {
399399 let @ = repl[0]
400400 if ($isInstanceOf(@, "Int"))
401401 then @
402402 else throw(($getType(@) + " couldn't be cast to Int"))
403403 })
404404 else throw("Strict value is not equal to itself.")
405405 }
406406 else if ((pType == WX_POOL))
407407 then {
408408 let $t01157211822 = $Tuple2(split({
409409 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
410410 if ($isInstanceOf(@, "String"))
411411 then @
412412 else throw(($getType(@) + " couldn't be cast to String"))
413413 }, "__"), split({
414414 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
415415 if ($isInstanceOf(@, "String"))
416416 then @
417417 else throw(($getType(@) + " couldn't be cast to String"))
418418 }, "__"))
419419 if (($t01157211822 == $t01157211822))
420420 then {
421421 let evalPutInB = $t01157211822._2
422422 let evalPutInA = $t01157211822._1
423423 let lpInA = parseIntValue(evalPutInA[1])
424424 let lpInB = parseIntValue(evalPutInB[1])
425425 if ((lpInB > lpInA))
426426 then {
427427 let pmt = parseIntValue(evalPutInA[8])
428428 $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB)
429429 }
430430 else {
431431 let pmt = parseIntValue(evalPutInB[7])
432432 $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA)
433433 }
434434 }
435435 else throw("Strict value is not equal to itself.")
436436 }
437437 else unknownPoolType()
438438
439439
440440 func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
441441 let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
442442 if ((pType == SF_POOL))
443443 then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
444444 else if ((pType == WX_POOL))
445445 then invoke(poolAddr, "put", [1000000, false], payments)
446446 else unknownPoolType()
447447 }
448448
449449
450450 func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
451451 let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
452452 if ((pType == SF_POOL))
453453 then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
454454 else if ((pType == WX_POOL))
455455 then invoke(poolAddr, "putOneTkn", [0, false], payments)
456456 else unknownPoolType()
457457 }
458458
459459
460460 func stakeLP (pool,pType,shareId,amount) = {
461461 let payments = [AttachedPayment(fromBase58String(shareId), amount)]
462462 if ((pType == SF_POOL))
463463 then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
464464 else if ((pType == WX_POOL))
465465 then invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
466466 else unknownPoolType()
467467 }
468468
469469
470470 func unstakeLP (pool,pType,shareId,amount) = {
471471 let $t01348113831 = if ((pType == SF_POOL))
472472 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
473473 else if ((pType == WX_POOL))
474474 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
475475 else unknownPoolType()
476476 let farmAddr = $t01348113831._1
477477 let fName = $t01348113831._2
478478 let params = $t01348113831._3
479479 let inv = invoke(farmAddr, fName, params, nil)
480480 if ((inv == inv))
481481 then amount
482482 else throw("Strict value is not equal to itself.")
483483 }
484484
485485
486486 func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
487487 let poolAddr = Address(fromBase58String(pool))
488488 let feeScale6 = 1000000
489489 let fee = getIntegerValue(poolAddr, kSFPoolFee)
490490 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING)
491491 let $t01425314559 = if ((assetTokenToGet == assetIdA))
492492 then {
493493 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING)
494494 $Tuple2(amountToPay, assetIdB)
495495 }
496496 else {
497497 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING)
498498 $Tuple2(amountToPay, assetIdA)
499499 }
500500 let amountToPay = $t01425314559._1
501501 let assetToPay = $t01425314559._2
502502 $Tuple2(assetToPay, amountToPay)
503503 }
504504
505505
506506 func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
507507 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
508508 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
509509 let feeScale = toBigInt(100000000)
510510 let $t01489815206 = if ((assetTokenToGet == assetIdA))
511511 then {
512512 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
513513 $Tuple2(amountToPay, assetIdB)
514514 }
515515 else {
516516 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
517517 $Tuple2(amountToPay, assetIdA)
518518 }
519519 let amountToPay = $t01489815206._1
520520 let assetToPay = $t01489815206._2
521521 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
522522 $Tuple2(assetToPay, amountToPayWithFee)
523523 }
524524
525525
526526 func exchangeDirectly (pType,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((pType == SF_POOL))
527527 then {
528528 let $t01555315675 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
529529 let assetToPay = $t01555315675._1
530530 let amountToPay = $t01555315675._2
531531 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
532532 }
533533 else if ((pType == WX_POOL))
534534 then {
535535 let $t01587515997 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
536536 let assetToPay = $t01587515997._1
537537 let amountToPay = $t01587515997._2
538538 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
539539 }
540540 else unknownPoolType()
541541
542542
543543 func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = {
544544 let $t01628416723 = if ((pType == SF_POOL))
545545 then {
546546 let inv = {
547547 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil)
548548 if ($isInstanceOf(@, "(Int, Int)"))
549549 then @
550550 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
551551 }
552552 if ((inv == inv))
553553 then $Tuple2(inv._1, inv._2)
554554 else throw("Strict value is not equal to itself.")
555555 }
556556 else if ((pType == WX_POOL))
557557 then {
558558 let inv = split({
559559 let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil)
560560 if ($isInstanceOf(@, "String"))
561561 then @
562562 else throw(($getType(@) + " couldn't be cast to String"))
563563 }, "__")
564564 if ((inv == inv))
565565 then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2]))
566566 else throw("Strict value is not equal to itself.")
567567 }
568568 else unknownPoolType()
569569 let amountA = $t01628416723._1
570570 let amountB = $t01628416723._2
571571 $Tuple2(amountA, amountB)
572572 }
573573
574574
575575 func claimFarmed (pType,pool) = if ((pType == SF_POOL))
576576 then {
577577 let balBefore = accountBalance(SWOPID)
578578 if ((balBefore == balBefore))
579579 then {
580580 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
581581 if ((inv == inv))
582582 then {
583583 let balAfter = accountBalance(SWOPID)
584584 $Tuple2((balAfter - balBefore), SWOPID)
585585 }
586586 else throw("Strict value is not equal to itself.")
587587 }
588588 else throw("Strict value is not equal to itself.")
589589 }
590590 else if ((pType == WX_POOL))
591591 then {
592592 let balBefore = accountBalance(WXID)
593593 if ((balBefore == balBefore))
594594 then {
595595 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
596596 if ((inv == inv))
597597 then {
598598 let balAfter = accountBalance(WXID)
599599 $Tuple2((balAfter - balBefore), WXID)
600600 }
601601 else throw("Strict value is not equal to itself.")
602602 }
603603 else throw("Strict value is not equal to itself.")
604604 }
605605 else unknownPoolType()
606606
607607
608608 func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
609609 let lpBalanceBefore = accountBalance(fromBase58String(LPId))
610610 if ((lpBalanceBefore == lpBalanceBefore))
611611 then {
612612 let poolAddr = addressFromStringValue(pool)
613613 let $t01768818104 = if (if ((pmtA > 0))
614614 then (pmtB > 0)
615615 else false)
616616 then {
617617 let $t01775417870 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
618618 let pmtInA = $t01775417870._1
619619 let pmtInB = $t01775417870._2
620620 let change = $t01775417870._3
621621 let changeId = $t01775417870._4
622622 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
623623 if ((inv == inv))
624624 then $Tuple2(change, changeId)
625625 else throw("Strict value is not equal to itself.")
626626 }
627627 else if ((pmtA > 0))
628628 then $Tuple2(pmtA, aId)
629629 else if ((pmtB > 0))
630630 then $Tuple2(pmtB, bId)
631631 else throw("pmts must be > 0")
632632 let change = $t01768818104._1
633633 let changeId = $t01768818104._2
634634 let inv = if ((change > 0))
635635 then replenishOneTokenByType(poolAddr, pType, change, changeId)
636636 else nil
637637 if ((inv == inv))
638638 then {
639639 let lpBalanceAfter = accountBalance(fromBase58String(LPId))
640640 let totalStaked = (lpBalanceAfter - lpBalanceBefore)
641641 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
642642 let userShareForStake = (totalStaked - axlyFeeAmount)
643643 if ((0 >= userShareForStake))
644644 then throw("amount of staked sharetokens must be > 0")
645645 else {
646646 let invLP = stakeLP(pool, pType, LPId, userShareForStake)
647647 if ((invLP == invLP))
648648 then $Tuple2(userShareForStake, axlyFeeAmount)
649649 else throw("Strict value is not equal to itself.")
650650 }
651651 }
652652 else throw("Strict value is not equal to itself.")
653653 }
654654 else throw("Strict value is not equal to itself.")
655655 }
656656
657657
658658 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
659659 let totalAmount = getPoolTotalShare(pool)
660660 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
661661 let $t01896219200 = if (withLoan)
662662 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
663663 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
664664 let curPoolInterest = $t01896219200._1
665665 let totalStakedWithLoan = $t01896219200._2
666666 [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))]
667667 }
668668
669669
670670 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
671671 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
672672 if ((tokenBalanceBefore == tokenBalanceBefore))
673673 then {
674674 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
675675 if ((inv == inv))
676676 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
677677 else throw("Strict value is not equal to itself.")
678678 }
679679 else throw("Strict value is not equal to itself.")
680680 }
681681
682682
683683 func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
684684 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
685685 if ((tokenBalanceBefore == tokenBalanceBefore))
686686 then {
687687 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
688688 if ((inv == inv))
689689 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
690690 else throw("Strict value is not equal to itself.")
691691 }
692692 else throw("Strict value is not equal to itself.")
693693 }
694694
695695
696696 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
697697 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
698698 if ((tokenBalanceBefore == tokenBalanceBefore))
699699 then {
700700 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
701701 if ((inv == inv))
702702 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
703703 else throw("Strict value is not equal to itself.")
704704 }
705705 else throw("Strict value is not equal to itself.")
706706 }
707707
708708
709709 func capitalize (pool,pType,tokenId,tokenAmount) = {
710710 let poolAddr = Address(fromBase58String(pool))
711711 let $t02155121617 = getPoolData(poolAddr, pType)
712712 let AId = $t02155121617._1
713713 let BId = $t02155121617._2
714714 let balA = $t02155121617._3
715715 let balB = $t02155121617._4
716716 let shareId = $t02155121617._5
717717 if (if ((tokenId != AId))
718718 then (tokenId != BId)
719719 else false)
720720 then throw("Wrong asset")
721721 else {
722722 let $t02170221782 = if ((tokenId == AId))
723723 then $Tuple2(tokenAmount, 0)
724724 else $Tuple2(0, tokenAmount)
725725 let pmtA = $t02170221782._1
726726 let pmtB = $t02170221782._2
727727 let $t02178521889 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
728728 let stakedAmount = $t02178521889._1
729729 let nf = $t02178521889._2
730730 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
731731 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
732732 let totalShareAmount = getPoolTotalShare(pool)
733733 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
734734 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
735735 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
736736 let stakedNoLoan = (stakedAmount - stakedLoan)
737737 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
738738 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
739739 else 0
740740 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
741741 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
742742 else 0
743743 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
744744 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
745745 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
746746 if ((axlyFee == axlyFee))
747747 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, nil))
748748 else throw("Strict value is not equal to itself.")
749749 }
750750 }
751751
752752
753753 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset,stopLossFee) = {
754754 let poolAddr = Address(fromBase58String(pool))
755755 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
756756 let $t02367923755 = getPoolData(poolAddr, pType)
757757 let assetIdA = $t02367923755._1
758758 let assetIdB = $t02367923755._2
759759 let balA = $t02367923755._3
760760 let balB = $t02367923755._4
761761 let shareId = $t02367923755._5
762762 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
763763 if ((cBalABefore == cBalABefore))
764764 then {
765765 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
766766 if ((cBalBBefore == cBalBBefore))
767767 then {
768768 let inv = if ((pType == SF_POOL))
769769 then {
770770 let inv = unstakeLP(pool, pType, shareId, stopLossFee)
771771 if ((inv == inv))
772772 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
773773 else throw("Strict value is not equal to itself.")
774774 }
775775 else if ((pType == WX_POOL))
776776 then {
777777 let inv = unstakeLP(pool, pType, shareId, (userCanWithdraw + stopLossFee))
778778 if ((inv == inv))
779779 then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)])
780780 else throw("Strict value is not equal to itself.")
781781 }
782782 else unknownPoolType()
783783 if ((inv == inv))
784784 then {
785785 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
786786 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
787787 let $t02444824537 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
788788 let tokensAmountA = $t02444824537._1
789789 let tokensAmountB = $t02444824537._2
790790 let $t02454025394 = if ((debt > 0))
791791 then {
792792 let amountToGetEx = if (if ((borrowAsset == assetIdA))
793793 then (debt > tokensAmountA)
794794 else false)
795795 then (debt - tokensAmountA)
796796 else if (if ((borrowAsset == assetIdB))
797797 then (debt > tokensAmountB)
798798 else false)
799799 then (debt - tokensAmountB)
800800 else 0
801801 let exInv = if ((amountToGetEx > 0))
802802 then exchangeDirectly(pType, pool, assetIdA, assetIdB, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset)
803803 else nil
804804 if ((exInv == exInv))
805805 then {
806806 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
807807 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
808808 if ((borrowAsset == assetIdA))
809809 then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore))
810810 else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt))
811811 }
812812 else throw("Strict value is not equal to itself.")
813813 }
814814 else $Tuple2(tokensAmountA, tokensAmountB)
815815 let toUserA = $t02454025394._1
816816 let toUserB = $t02454025394._2
817- $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
817+ $Tuple5(toUserA, assetIdA, toUserB, assetIdB, shareId)
818818 }
819819 else throw("Strict value is not equal to itself.")
820820 }
821821 else throw("Strict value is not equal to itself.")
822822 }
823823 else throw("Strict value is not equal to itself.")
824824 }
825825
826826
827827 func userCanWithdrawShareCalc (user,pool,posId,borrowed) = {
828828 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
829829 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
830830 let poolInterest = if (borrowed)
831831 then getIntegerValue(this, (pool + kPoolInterestLoan))
832832 else getIntegerValue(this, (pool + kPoolInterestNoLoan))
833833 (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10))
834834 }
835835
836836
837837 func withdrawToUser (user,pool,posId,stopLoss) = {
838838 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
839839 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0)
840840 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
841841 let poolTotalShare = getPoolTotalShare(pool)
842842 let userAddr = Address(fromBase58String(user))
843843 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
844- let $t02661626850 = if ((borrowAmount > 0))
844+ let $t02659226826 = if ((borrowAmount > 0))
845845 then $Tuple2({
846846 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil)
847847 if ($isInstanceOf(@, "Int"))
848848 then @
849849 else throw(($getType(@) + " couldn't be cast to Int"))
850850 }, STOPLOSS_LOAN)
851851 else $Tuple2(0, STOPLOSS_FEE_NO_LOAN)
852- let debt = $t02661626850._1
853- let feeType = $t02661626850._2
852+ let debt = $t02659226826._1
853+ let feeType = $t02659226826._2
854854 let stopLossFee = if (stopLoss)
855855 then fraction(userCanWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6)
856856 else 0
857- let $t02696727147 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
858- if (($t02696727147 == $t02696727147))
857+ let $t02694327099 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
858+ if (($t02694327099 == $t02694327099))
859859 then {
860- let shareId = $t02696727147._7
861- let cBalBAfter = $t02696727147._6
862- let cBalAAfter = $t02696727147._5
863- let assetIdB = $t02696727147._4
864- let toUserAmountB = $t02696727147._3
865- let assetIdA = $t02696727147._2
866- let toUserAmountA = $t02696727147._1
860+ let shareId = $t02694327099._5
861+ let assetIdB = $t02694327099._4
862+ let toUserAmountB = $t02694327099._3
863+ let assetIdA = $t02694327099._2
864+ let toUserAmountA = $t02694327099._1
867865 let closeDbtInv = if ((debt > 0))
868866 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
869867 else 0
870868 if ((closeDbtInv == closeDbtInv))
871- then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil))
869+ then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil))
872870 else throw("Strict value is not equal to itself.")
873871 }
874872 else throw("Strict value is not equal to itself.")
875873 }
876874
877875
878876 func parseRequest (requestId) = {
879877 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
880878 let user = request[0]
881879 let pool = request[1]
882880 let pmtA = parseIntValue(request[2])
883881 let AId = request[3]
884882 let pmtB = parseIntValue(request[4])
885883 let BId = request[5]
886884 let balA = parseIntValue(request[6])
887885 let balB = parseIntValue(request[7])
888886 let shareId = request[8]
889887 let bwAsset = request[9]
890888 let bwAmount = parseIntValue(request[10])
891889 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
892890 }
893891
894892
895-func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
896- let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
897- let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
898- let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
899- let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
900- let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
901- let $t02887628973 = if ((borrowId == aId))
902- then $Tuple2(dPriceA, decPrA)
903- else $Tuple2(dPriceB, decPrB)
904- let borrowPrice = $t02887628973._1
905- let borrowDecPr = $t02887628973._2
906- fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
907- }
893+func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = if (if ((borrowId != aId))
894+ then (borrowId != bId)
895+ else false)
896+ then throw("Wrong borrow asset")
897+ else {
898+ let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
899+ let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
900+ let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
901+ let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
902+ let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
903+ let $t02910429201 = if ((borrowId == aId))
904+ then $Tuple2(dPriceA, decPrA)
905+ else $Tuple2(dPriceB, decPrB)
906+ let borrowPrice = $t02910429201._1
907+ let borrowDecPr = $t02910429201._2
908+ fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
909+ }
908910
909911
910912 func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2))
911913 then if ((assetIdToStr(pmts[0].assetId) != AId))
912914 then throw("Wrong payment asset A")
913915 else if ((assetIdToStr(pmts[1].assetId) != BId))
914916 then throw("Wrong payment asset B")
915- else $Tuple4(pmts[0].amount, AId, pmts[1].amount, BId)
917+ else $Tuple2(pmts[0].amount, pmts[1].amount)
916918 else if ((size(pmts) == 1))
917919 then if ((assetIdToStr(pmts[0].assetId) == AId))
918- then $Tuple4(pmts[0].amount, AId, 0, BId)
920+ then $Tuple2(pmts[0].amount, 0)
919921 else if ((assetIdToStr(pmts[0].assetId) == BId))
920- then $Tuple4(0, AId, pmts[0].amount, BId)
922+ then $Tuple2(0, pmts[0].amount)
921923 else throw("Wrong payment")
922924 else throw("One or two payments expected")
923925
924926
925927 func calcPriceImpact (balA,balB,newBalA,newBalB) = {
926928 let pri = ((SCALE8 - fraction(fraction(balB, SCALE8, balA), SCALE8, fraction(newBalB, SCALE8, newBalA))) * 100)
927929 if ((0 > pri))
928930 then (pri * -1)
929931 else pri
930932 }
931933
932934
933935 @Callable(i)
934936 func getShareAssetPriceREADONLY (shareId) = {
935937 let sharePrices = getSharePrice(shareId)
936938 $Tuple2(nil, sharePrices)
937939 }
938940
939941
940942
941943 @Callable(i)
942944 func getUserPositionShareAmountREADONLY (user,posNum) = {
943945 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position")
944946 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount))
945947 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0))
946948 $Tuple2(nil, userCanWithdraw)
947949 }
948950
949951
950952
951953 @Callable(i)
952954 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
953955 func userPos (a,pool) = {
954- let $t03067230706 = a
955- let totalPos = $t03067230706._1
956- let posDebt = $t03067230706._2
957- let index = $t03067230706._3
956+ let $t03087130905 = a
957+ let totalPos = $t03087130905._1
958+ let posDebt = $t03087130905._2
959+ let index = $t03087130905._3
958960 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
959- let $t03079830888 = getPoolData(Address(fromBase58String(pool)), pType)
960- let AId = $t03079830888._1
961- let BId = $t03079830888._2
962- let balA = $t03079830888._3
963- let balB = $t03079830888._4
964- let shareId = $t03079830888._5
961+ let $t03099731087 = getPoolData(Address(fromBase58String(pool)), pType)
962+ let AId = $t03099731087._1
963+ let BId = $t03099731087._2
964+ let balA = $t03099731087._3
965+ let balB = $t03099731087._4
966+ let shareId = $t03099731087._5
965967 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
966968 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
967969 let sharePrices = getSharePrice(shareId)
968970 let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
969971 let shareD = fraction(userCanWithdraw, sharePrices, decPrShare)
970972 if ((borrowAmount == 0))
971973 then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1))
972974 else {
973975 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId))
974976 let debt = {
975977 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil)
976978 if ($isInstanceOf(@, "Int"))
977979 then @
978980 else throw(($getType(@) + " couldn't be cast to Int"))
979981 }
980982 let borrowAssetPrice = getIntegerValue(priceOracleAddr, (borrowAsset + kPriceInOracle))
981983 let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN)
982984 let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId)
983985 $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1))
984986 }
985987 }
986988
987- let $t03190831963 = {
989+ let $t03210732162 = {
988990 let $l = pools
989991 let $s = size($l)
990992 let $acc0 = $Tuple3(nil, nil, 0)
991993 func $f0_1 ($a,$i) = if (($i >= $s))
992994 then $a
993995 else userPos($a, $l[$i])
994996
995997 func $f0_2 ($a,$i) = if (($i >= $s))
996998 then $a
997999 else throw("List size exceeds 20")
9981000
9991001 $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)
10001002 }
1001- let pos = $t03190831963._1
1002- let debt = $t03190831963._2
1003+ let pos = $t03210732162._1
1004+ let debt = $t03210732162._2
10031005 $Tuple2(nil, $Tuple2(pos, debt))
10041006 }
10051007
10061008
10071009
10081010 @Callable(i)
10091011 func replenish (pool,leverage,borrowId) = if (if ((100 > leverage))
10101012 then true
10111013 else (leverage > 300))
10121014 then throw("Leverage can't be <100 and >300")
10131015 else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
10141016 then (leverage > 100)
10151017 else false)
10161018 then throw("You can't borrow in this pool")
10171019 else {
10181020 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1019- let $t03240332493 = getPoolData(Address(fromBase58String(pool)), pType)
1020- let AId = $t03240332493._1
1021- let BId = $t03240332493._2
1022- let balA = $t03240332493._3
1023- let balB = $t03240332493._4
1024- let shareId = $t03240332493._5
1025- let $t03249632577 = parseReplenishPmts(i.payments, AId, BId)
1026- let pmtA = $t03249632577._1
1027- let pmtAssetA = $t03249632577._2
1028- let pmtB = $t03249632577._3
1029- let pmtAssetB = $t03249632577._4
1030- let user = toString(i.caller)
1031- let newPosNum = getNewUserPositionNumber(user)
1032- if ((leverage > 100))
1033- then {
1034- let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1035- let request = makeString([user, pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1036- let newRequestId = {
1037- let @ = invoke(this, "createNewRequest", [request], nil)
1038- if ($isInstanceOf(@, "Int"))
1039- then @
1040- else throw(($getType(@) + " couldn't be cast to Int"))
1041- }
1042- if ((newRequestId == newRequestId))
1021+ let $t03260232692 = getPoolData(Address(fromBase58String(pool)), pType)
1022+ let AId = $t03260232692._1
1023+ let BId = $t03260232692._2
1024+ let balA = $t03260232692._3
1025+ let balB = $t03260232692._4
1026+ let shareId = $t03260232692._5
1027+ if (if ((borrowId != AId))
1028+ then (borrowId != BId)
1029+ else false)
1030+ then throw("Wrong borrow asset")
1031+ else {
1032+ let $t03277332832 = parseReplenishPmts(i.payments, AId, BId)
1033+ let pmtA = $t03277332832._1
1034+ let pmtB = $t03277332832._2
1035+ let user = toString(i.caller)
1036+ let newPosNum = getNewUserPositionNumber(user)
1037+ if ((leverage > 100))
10431038 then {
1044- let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1045- let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1046- if ((inv == inv))
1039+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
1040+ let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1041+ let newRequestId = {
1042+ let @ = invoke(this, "createNewRequest", [request], nil)
1043+ if ($isInstanceOf(@, "Int"))
1044+ then @
1045+ else throw(($getType(@) + " couldn't be cast to Int"))
1046+ }
1047+ if ((newRequestId == newRequestId))
10471048 then {
1048- let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1049- let $t03359033684 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1050- if (($t03359033684 == $t03359033684))
1049+ let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1050+ let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1051+ if ((inv == inv))
10511052 then {
1052- let newBalB = $t03359033684._2
1053- let newBalA = $t03359033684._1
1054- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1055- let $t03375433869 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1056- let wAmountA = $t03375433869._1
1057- let wAmountB = $t03375433869._2
1058- $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1053+ let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1054+ let $t03382133915 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1055+ if (($t03382133915 == $t03382133915))
1056+ then {
1057+ let newBalB = $t03382133915._2
1058+ let newBalA = $t03382133915._1
1059+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1060+ let $t03398534100 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1061+ let wAmountA = $t03398534100._1
1062+ let wAmountB = $t03398534100._2
1063+ $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1064+ }
1065+ else throw("Strict value is not equal to itself.")
10591066 }
10601067 else throw("Strict value is not equal to itself.")
10611068 }
10621069 else throw("Strict value is not equal to itself.")
10631070 }
1064- else throw("Strict value is not equal to itself.")
1065- }
1066- else {
1067- let $t03392234034 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1068- let userStaked = $t03392234034._1
1069- let axlyFee = $t03392234034._2
1070- let $t03404034134 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1071- if (($t03404034134 == $t03404034134))
1072- then {
1073- let newBalB = $t03404034134._2
1074- let newBalA = $t03404034134._1
1075- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1076- let $t03420434319 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1077- let wAmountA = $t03420434319._1
1078- let wAmountB = $t03420434319._2
1079- $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1071+ else {
1072+ let $t03415334268 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1073+ if (($t03415334268 == $t03415334268))
1074+ then {
1075+ let axlyFee = $t03415334268._2
1076+ let userStaked = $t03415334268._1
1077+ let $t03427434368 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1078+ if (($t03427434368 == $t03427434368))
1079+ then {
1080+ let newBalB = $t03427434368._2
1081+ let newBalA = $t03427434368._1
1082+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1083+ let $t03443834553 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1084+ let wAmountA = $t03443834553._1
1085+ let wAmountB = $t03443834553._2
1086+ $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1087+ }
1088+ else throw("Strict value is not equal to itself.")
1089+ }
1090+ else throw("Strict value is not equal to itself.")
10801091 }
1081- else throw("Strict value is not equal to itself.")
10821092 }
10831093 }
10841094
10851095
10861096
10871097 @Callable(i)
10881098 func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false)
10891099
10901100
10911101
10921102 @Callable(i)
10931103 func createUpdateStopLoss (posId,poolId,assetId,price) = {
10941104 let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
10951105 if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
10961106 then throw("There are no user position")
10971107 else if ((0 >= price))
10981108 then throw("Price must be greater than 0")
10991109 else if ((price > tokenOraclePrice))
11001110 then throw("Price must be less than current token price")
11011111 else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
11021112 }
11031113
11041114
11051115
11061116 @Callable(i)
11071117 func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
11081118 then throw("No entry")
11091119 else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
11101120
11111121
11121122
11131123 @Callable(i)
1114-func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox)))
1115- then throw("Already inited")
1116- 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)]
1124+func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if ((toString(i.caller) != "3PG42y6FgT8zM3uX5tEDxJF5rqX8AKGJRAR"))
1125+ then throw("Only admin can call this function")
1126+ else if (isDefined(getString(kAdminCallPK)))
1127+ then throw("Already inited")
1128+ 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)]
11171129
11181130
11191131
11201132 @Callable(i)
11211133 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
11221134 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
11231135 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
11241136 })
11251137
11261138
11271139
11281140 @Callable(i)
11291141 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
1130- let $t03684536949 = parseRequest(requestId)
1131- let user = $t03684536949._1
1132- let pool = $t03684536949._2
1133- let pmtA = $t03684536949._3
1134- let AId = $t03684536949._4
1135- let pmtB = $t03684536949._5
1136- let BId = $t03684536949._6
1137- let balA = $t03684536949._7
1138- let balB = $t03684536949._8
1139- let shareId = $t03684536949._9
1140- let bwAsset = $t03684536949._10
1141- let bwAmount = $t03684536949._11
1142+ let $t03720037304 = parseRequest(requestId)
1143+ let user = $t03720037304._1
1144+ let pool = $t03720037304._2
1145+ let pmtA = $t03720037304._3
1146+ let AId = $t03720037304._4
1147+ let pmtB = $t03720037304._5
1148+ let BId = $t03720037304._6
1149+ let balA = $t03720037304._7
1150+ let balB = $t03720037304._8
1151+ let shareId = $t03720037304._9
1152+ let bwAsset = $t03720037304._10
1153+ let bwAmount = $t03720037304._11
11421154 if ((size(i.payments) != 1))
11431155 then throw("Wrong payment size")
11441156 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
11451157 then true
11461158 else (i.payments[0].amount != bwAmount))
11471159 then throw("Wrong payment")
11481160 else {
1149- let $t03713937263 = if ((AId == bwAsset))
1150- then $Tuple2((pmtA + i.payments[0].amount), pmtB)
1151- else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1152- let pmtAllA = $t03713937263._1
1153- let pmtAllB = $t03713937263._2
1161+ let $t03749437594 = if ((AId == bwAsset))
1162+ then $Tuple2((pmtA + bwAmount), pmtB)
1163+ else $Tuple2(pmtA, (pmtB + bwAmount))
1164+ let pmtAllA = $t03749437594._1
1165+ let pmtAllB = $t03749437594._2
11541166 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1155- let $t03734537460 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1156- let userStaked = $t03734537460._1
1157- let axlyFee = $t03734537460._2
1167+ let $t03767637791 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1168+ let userStaked = $t03767637791._1
1169+ let axlyFee = $t03767637791._2
11581170 let posNum = getNewUserPositionNumber(user)
11591171 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
11601172 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
1161- let $t03782037935 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1162- let wAmountA = $t03782037935._1
1163- let wAmountB = $t03782037935._2
1173+ let $t03815138266 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1174+ let wAmountA = $t03815138266._1
1175+ let wAmountB = $t03815138266._2
11641176 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
11651177 }
11661178 })
11671179
11681180
11691181
11701182 @Callable(i)
11711183 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
11721184 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
11731185 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1174- let $t03843038520 = getPoolData(Address(fromBase58String(pool)), pType)
1175- let AId = $t03843038520._1
1176- let BId = $t03843038520._2
1177- let balA = $t03843038520._3
1178- let balB = $t03843038520._4
1179- let shareId = $t03843038520._5
1186+ let $t03876138851 = getPoolData(Address(fromBase58String(pool)), pType)
1187+ let AId = $t03876138851._1
1188+ let BId = $t03876138851._2
1189+ let balA = $t03876138851._3
1190+ let balB = $t03876138851._4
1191+ let shareId = $t03876138851._5
11801192 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
11811193 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
11821194 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
11831195 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
11841196 if ((liquidateAmount > userCanWithdraw))
11851197 then throw("You can't liquidate more than user have")
11861198 else if ((borrowAmount == 0))
11871199 then throw("You can't liquidate position without borrow")
11881200 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))]
11891201 })
11901202
11911203
11921204
11931205 @Callable(i)
11941206 func stopLoss (user,posId,pool,assetId) = valueOrElse(isAdminCall(i), {
11951207 let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
11961208 if ((tokenOraclePrice > tokenOraclePrice))
11971209 then throw("Token price greater stop loss price")
11981210 else if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
11991211 then throw("No entry")
12001212 else (withdrawToUser(user, pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))
12011213 })
12021214
12031215
12041216
12051217 @Callable(i)
12061218 func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
12071219 let pType = getStringValue(this, (kPool + pool))
1208- let $t04049340784 = if (claim)
1220+ let $t04082441115 = if (claim)
12091221 then claimFarmed(pType, pool)
12101222 else {
12111223 let claimedAsset = if ((pType == SF_POOL))
12121224 then SWOPID
12131225 else if ((pType == WX_POOL))
12141226 then WXID
12151227 else unknownPoolType()
12161228 $Tuple2(amountToExchange, claimedAsset)
12171229 }
1218- let claimedAmount = $t04049340784._1
1219- let claimedAsset = $t04049340784._2
1230+ let claimedAmount = $t04082441115._1
1231+ let claimedAsset = $t04082441115._2
12201232 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12211233 let change = (claimedAmount - amountToExchange)
12221234 let changeEntry = if ((change > 0))
12231235 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12241236 else nil
12251237 (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry)
12261238 })
12271239
12281240
12291241
12301242 @Callable(i)
12311243 func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
12321244 let pType = getStringValue(this, (kPool + pool))
1233- let $t04150141792 = if (claim)
1245+ let $t04183242123 = if (claim)
12341246 then claimFarmed(pType, pool)
12351247 else {
12361248 let claimedAsset = if ((pType == SF_POOL))
12371249 then SWOPID
12381250 else if ((pType == WX_POOL))
12391251 then WXID
12401252 else unknownPoolType()
12411253 $Tuple2(amountToExchange, claimedAsset)
12421254 }
1243- let claimedAmount = $t04150141792._1
1244- let claimedAsset = $t04150141792._2
1255+ let claimedAmount = $t04183242123._1
1256+ let claimedAsset = $t04183242123._2
12451257 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
12461258 let change = (claimedAmount - amountToExchange)
12471259 let changeEntry = if ((change > 0))
12481260 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12491261 else nil
12501262 (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry)
12511263 })
12521264
12531265
12541266
12551267 @Callable(i)
12561268 func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
12571269 let pType = getStringValue(this, (kPool + pool))
1258- let $t04257642867 = if (claim)
1270+ let $t04290743198 = if (claim)
12591271 then claimFarmed(pType, pool)
12601272 else {
12611273 let claimedAsset = if ((pType == SF_POOL))
12621274 then SWOPID
12631275 else if ((pType == WX_POOL))
12641276 then WXID
12651277 else unknownPoolType()
12661278 $Tuple2(amountToExchange, claimedAsset)
12671279 }
1268- let claimedAmount = $t04257642867._1
1269- let claimedAsset = $t04257642867._2
1280+ let claimedAmount = $t04290743198._1
1281+ let claimedAsset = $t04290743198._2
12701282 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
12711283 let change = (claimedAmount - amountToExchange)
12721284 let changeEntry = if ((change > 0))
12731285 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12741286 else nil
12751287 (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry)
12761288 })
12771289
12781290
12791291
12801292 @Callable(i)
12811293 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
12821294 then (type != WX_POOL)
12831295 else false)
12841296 then throw("Wrong type")
12851297 else {
1286- let $t04360943703 = getPoolData(Address(fromBase58String(poolAddr)), type)
1287- let aId = $t04360943703._1
1288- let bId = $t04360943703._2
1289- let aBal = $t04360943703._3
1290- let bBal = $t04360943703._4
1291- let shareId = $t04360943703._5
1292-[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)]
1298+ let $t04394044034 = getPoolData(Address(fromBase58String(poolAddr)), type)
1299+ let aId = $t04394044034._1
1300+ let bId = $t04394044034._2
1301+ let aBal = $t04394044034._3
1302+ let bBal = $t04394044034._4
1303+ let shareId = $t04394044034._5
1304+ if ((0 > inFeeNoLoan))
1305+ then throw("inFeeNoLoan must be greater than 0")
1306+ else if ((0 > inFeeLoan))
1307+ then throw("inFeeLoan must be greater than 0")
1308+ else if ((0 > capFeeNoLoan))
1309+ then throw("capFeeNoLoan must be greater than 0")
1310+ else if ((0 > capFeeWithLoan))
1311+ then throw("capFeeWithLoan must be greater than 0")
1312+ else if ((0 > stoplossFeeNoLoan))
1313+ then throw("stoplossFeeNoLoan must be greater than 0")
1314+ else if ((0 > stoplossFeeWithLoan))
1315+ then throw("stoplossFeeWithLoan must be greater than 0")
1316+ else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)]
12931317 })
12941318
12951319
12961320 @Verifier(tx)
12971321 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
12981322

github/deemru/w8io/026f985 
145.59 ms