tx · FxVCrpoJFb2gwrAJBhMAeUvSjuGMv8pTNvFKARVw2ixj

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.04900000 Waves

2023.07.26 14:15 [2682754] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "FxVCrpoJFb2gwrAJBhMAeUvSjuGMv8pTNvFKARVw2ixj", "fee": 4900000, "feeAssetId": null, "timestamp": 1690370123672, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "48mSuPxuJ2EKhM6FyZRq4FuG9sPAh4TNBfsTeuBMwDgYG4PJMX9cRpk326Grexo3ftQz7ZX8S7utVs6QzC6tyfFo" ], "script": "base64:BgKmAQgCEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg0KCwgIAQQRGBgRAQEYEgkKBwgIAQQIARgSDQoLCAgBBBgYGBgYARgSCwoJCAgBAQEBAQEEEgASABIAEgASABIAEgASABIDCgEIEgMKAQh4AAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUAB1NDQUxFMTYJALYCAQCAgIT+pt7hEQAKRkVFX1NDQUxFNgDAhD0AFGt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Rwb29sCQELdmFsdWVPckVsc2UCCQELaXNBZG1pbkNhbGwBBQFpAwkBASEBCQEJaXNEZWZpbmVkAQkAnQgCBQR0aGlzCQCsAgIFBWtQb29sBQRwb29sCQACAQIMVW5rbm93biBwb29sAwkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzCQCsAgIFBHBvb2wFC2tQb29sQWN0aXZlBgkAAgECE1Bvb2wgYWxyZWFkeSBhY3RpdmUJAMwIAgkBDEJvb2xlYW5FbnRyeQIJAKwCAgUEcG9vbAULa1Bvb2xBY3RpdmUGBQNuaWwBaQEMc2h1dGRvd25Qb29sAQRwb29sCQELdmFsdWVPckVsc2UCCQELaXNBZG1pbkNhbGwBBQFpAwkBASEBCQEJaXNEZWZpbmVkAQkAnQgCBQR0aGlzCQCsAgIFBWtQb29sBQRwb29sCQACAQIMVW5rbm93biBwb29sAwkBASEBCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMJAKwCAgUEcG9vbAULa1Bvb2xBY3RpdmUGCQACAQIVUG9vbCBhbHJlYWR5IHNodXRkb3duCQDMCAIJAQxCb29sZWFuRW50cnkCCQCsAgIFBHBvb2wFC2tQb29sQWN0aXZlBwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleRJCVT4=", "height": 2682754, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D97jizeEhZxPwBSwduiLFhDvKB5FZPNXe86phef7QfcF Next: 4opCmweNFJvfGjV1kBC5K5Kgyr2up5W19rX3J8B4rERv Diff:
OldNewDifferences
534534 }
535535
536536
537+func getWXSwapFees (pool) = {
538+ let poolAddr = addressFromStringValue(pool)
539+ let fContract = addressFromStringValue(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))
540+ let poolFeeDefault = value(getInteger(wxSwapContract, "%s__poolFee"))
541+ let protocolFeeDefault = value(getInteger(wxSwapContract, "%s__protocolFee"))
542+ match invoke(fContract, "getSwapFeeREADONLY", [toString(poolAddr)], nil) {
543+ case fees: (Int, Int) =>
544+ $Tuple2(fees._1, fees._2)
545+ case _ =>
546+ $Tuple2(poolFeeDefault, protocolFeeDefault)
547+ }
548+ }
549+
550+
537551 func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
538- let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
539- let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
552+ let $t01618416223 = getWXSwapFees(pool)
553+ let pFee = $t01618416223._1
554+ let prFee = $t01618416223._2
540555 let feeScale = toBigInt(100000000)
541- let $t01578316091 = if ((assetTokenToGet == assetIdA))
556+ let $t01626316571 = if ((assetTokenToGet == assetIdA))
542557 then {
543558 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
544559 $Tuple2(amountToPay, assetIdB)
547562 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
548563 $Tuple2(amountToPay, assetIdA)
549564 }
550- let amountToPay = $t01578316091._1
551- let assetToPay = $t01578316091._2
565+ let amountToPay = $t01626316571._1
566+ let assetToPay = $t01626316571._2
552567 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
553568 $Tuple2(assetToPay, amountToPayWithFee)
554569 }
556571
557572 func exchangeDirectly (pType,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((pType == SF_POOL))
558573 then {
559- let $t01643816560 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
560- let assetToPay = $t01643816560._1
561- let amountToPay = $t01643816560._2
574+ let $t01691817040 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
575+ let assetToPay = $t01691817040._1
576+ let amountToPay = $t01691817040._2
562577 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
563578 }
564579 else if ((pType == WX_POOL))
565580 then {
566- let $t01676016882 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
567- let assetToPay = $t01676016882._1
568- let amountToPay = $t01676016882._2
581+ let $t01724017362 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
582+ let assetToPay = $t01724017362._1
583+ let amountToPay = $t01724017362._2
569584 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
570585 }
571586 else unknownPoolType()
572587
573588
574589 func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = {
575- let $t01716917633 = if ((pType == SF_POOL))
590+ let $t01764918113 = if ((pType == SF_POOL))
576591 then {
577592 let inv = {
578593 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil)
607622 else throw("Strict value is not equal to itself.")
608623 }
609624 else unknownPoolType()
610- let amountA = $t01716917633._1
611- let amountB = $t01716917633._2
625+ let amountA = $t01764918113._1
626+ let amountB = $t01764918113._2
612627 $Tuple2(amountA, amountB)
613628 }
614629
651666 if ((lpBalanceBefore == lpBalanceBefore))
652667 then {
653668 let poolAddr = addressFromStringValue(pool)
654- let $t01859819014 = if (if ((pmtA > 0))
669+ let $t01907819494 = if (if ((pmtA > 0))
655670 then (pmtB > 0)
656671 else false)
657672 then {
658- let $t01866418780 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
659- let pmtInA = $t01866418780._1
660- let pmtInB = $t01866418780._2
661- let change = $t01866418780._3
662- let changeId = $t01866418780._4
673+ let $t01914419260 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
674+ let pmtInA = $t01914419260._1
675+ let pmtInB = $t01914419260._2
676+ let change = $t01914419260._3
677+ let changeId = $t01914419260._4
663678 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
664679 if ((inv == inv))
665680 then $Tuple2(change, changeId)
670685 else if ((pmtB > 0))
671686 then $Tuple2(pmtB, bId)
672687 else throw("pmts must be > 0")
673- let change = $t01859819014._1
674- let changeId = $t01859819014._2
688+ let change = $t01907819494._1
689+ let changeId = $t01907819494._2
675690 let inv = if ((change > 0))
676691 then replenishOneTokenByType(poolAddr, pType, change, changeId)
677692 else nil
699714 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
700715 let totalAmount = getPoolTotalShare(pool)
701716 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
702- let $t01987220110 = if (withLoan)
717+ let $t02035220590 = if (withLoan)
703718 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
704719 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
705- let curPoolInterest = $t01987220110._1
706- let totalStakedWithLoan = $t01987220110._2
720+ let curPoolInterest = $t02035220590._1
721+ let totalStakedWithLoan = $t02035220590._2
707722 [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))]
708723 }
709724
749764
750765 func capitalize (pool,pType,tokenId,tokenAmount) = {
751766 let poolAddr = Address(fromBase58String(pool))
752- let $t02246122527 = getPoolData(poolAddr, pType)
753- let AId = $t02246122527._1
754- let BId = $t02246122527._2
755- let balA = $t02246122527._3
756- let balB = $t02246122527._4
757- let shareId = $t02246122527._5
767+ let $t02294123007 = getPoolData(poolAddr, pType)
768+ let AId = $t02294123007._1
769+ let BId = $t02294123007._2
770+ let balA = $t02294123007._3
771+ let balB = $t02294123007._4
772+ let shareId = $t02294123007._5
758773 if (if ((tokenId != AId))
759774 then (tokenId != BId)
760775 else false)
761776 then throw("Wrong asset")
762777 else {
763- let $t02261222692 = if ((tokenId == AId))
778+ let $t02309223172 = if ((tokenId == AId))
764779 then $Tuple2(tokenAmount, 0)
765780 else $Tuple2(0, tokenAmount)
766- let pmtA = $t02261222692._1
767- let pmtB = $t02261222692._2
768- let $t02269522799 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
769- let stakedAmount = $t02269522799._1
770- let nf = $t02269522799._2
781+ let pmtA = $t02309223172._1
782+ let pmtB = $t02309223172._2
783+ let $t02317523279 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
784+ let stakedAmount = $t02317523279._1
785+ let nf = $t02317523279._2
771786 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
772787 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
773788 let totalShareAmount = getPoolTotalShare(pool)
794809 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset,stopLossFee) = {
795810 let poolAddr = Address(fromBase58String(pool))
796811 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
797- let $t02458924665 = getPoolData(poolAddr, pType)
798- let assetIdA = $t02458924665._1
799- let assetIdB = $t02458924665._2
800- let balA = $t02458924665._3
801- let balB = $t02458924665._4
802- let shareId = $t02458924665._5
812+ let $t02506925145 = getPoolData(poolAddr, pType)
813+ let assetIdA = $t02506925145._1
814+ let assetIdB = $t02506925145._2
815+ let balA = $t02506925145._3
816+ let balB = $t02506925145._4
817+ let shareId = $t02506925145._5
803818 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
804819 if ((cBalABefore == cBalABefore))
805820 then {
825840 then {
826841 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
827842 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
828- let $t02535825447 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
829- let tokensAmountA = $t02535825447._1
830- let tokensAmountB = $t02535825447._2
831- let $t02545026304 = if ((debt > 0))
843+ let $t02583825927 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
844+ let tokensAmountA = $t02583825927._1
845+ let tokensAmountB = $t02583825927._2
846+ let $t02593026784 = if ((debt > 0))
832847 then {
833848 let amountToGetEx = if (if ((borrowAsset == assetIdA))
834849 then (debt > tokensAmountA)
853868 else throw("Strict value is not equal to itself.")
854869 }
855870 else $Tuple2(tokensAmountA, tokensAmountB)
856- let toUserA = $t02545026304._1
857- let toUserB = $t02545026304._2
871+ let toUserA = $t02593026784._1
872+ let toUserB = $t02593026784._2
858873 $Tuple5(toUserA, assetIdA, toUserB, assetIdB, shareId)
859874 }
860875 else throw("Strict value is not equal to itself.")
882897 let poolTotalShare = getPoolTotalShare(pool)
883898 let userAddr = Address(fromBase58String(user))
884899 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
885- let $t02750227736 = if ((borrowAmount > 0))
900+ let $t02798228216 = if ((borrowAmount > 0))
886901 then $Tuple2({
887902 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil)
888903 if ($isInstanceOf(@, "Int"))
890905 else throw(($getType(@) + " couldn't be cast to Int"))
891906 }, STOPLOSS_LOAN)
892907 else $Tuple2(0, STOPLOSS_FEE_NO_LOAN)
893- let debt = $t02750227736._1
894- let feeType = $t02750227736._2
908+ let debt = $t02798228216._1
909+ let feeType = $t02798228216._2
895910 let stopLossFee = if (stopLoss)
896911 then fraction(userCanWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6)
897912 else 0
898- let $t02785328009 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
899- if (($t02785328009 == $t02785328009))
913+ let $t02833328489 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
914+ if (($t02833328489 == $t02833328489))
900915 then {
901- let shareId = $t02785328009._5
902- let assetIdB = $t02785328009._4
903- let toUserAmountB = $t02785328009._3
904- let assetIdA = $t02785328009._2
905- let toUserAmountA = $t02785328009._1
916+ let shareId = $t02833328489._5
917+ let assetIdB = $t02833328489._4
918+ let toUserAmountB = $t02833328489._3
919+ let assetIdA = $t02833328489._2
920+ let toUserAmountA = $t02833328489._1
906921 let closeDbtInv = if ((debt > 0))
907922 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
908923 else 0
944959 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
945960 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
946961 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
947- let $t03007230169 = if ((borrowId == aId))
962+ let $t03055230649 = if ((borrowId == aId))
948963 then $Tuple2(dPriceA, decPrA)
949964 else $Tuple2(dPriceB, decPrB)
950- let borrowPrice = $t03007230169._1
951- let borrowDecPr = $t03007230169._2
965+ let borrowPrice = $t03055230649._1
966+ let borrowDecPr = $t03055230649._2
952967 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
953968 }
954969
977992
978993
979994 func claimAndCheckAmntEx (pool,pType,claim,amountToExchange,change) = {
980- let $t03118331470 = if (claim)
995+ let $t03166331950 = if (claim)
981996 then claimFarmed(pType, pool)
982997 else {
983998 let claimedAsset = if ((pType == SF_POOL))
9871002 else unknownPoolType()
9881003 $Tuple2(amountToExchange, claimedAsset)
9891004 }
990- let claimAmount = $t03118331470._1
991- let claimAsset = $t03118331470._2
1005+ let claimAmount = $t03166331950._1
1006+ let claimAsset = $t03166331950._2
9921007 let bal = accountBalance(claimAsset)
9931008 if (if ((amountToExchange > (claimAmount + change)))
9941009 then true
10191034 @Callable(i)
10201035 func getUserPositionREADONLY (user,pools,posNum) = {
10211036 func userPos (a,pool) = {
1022- let $t03243632480 = a
1023- let wAmountsA = $t03243632480._1
1024- let wAmountsB = $t03243632480._2
1025- let debts = $t03243632480._3
1026- let index = $t03243632480._4
1027- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1028- let $t03257232662 = getPoolData(Address(fromBase58String(pool)), pType)
1029- let AId = $t03257232662._1
1030- let BId = $t03257232662._2
1031- let balA = $t03257232662._3
1032- let balB = $t03257232662._4
1033- let shareId = $t03257232662._5
1034- let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
1037+ let $t03293833008 = a
1038+ let wAmountsA = $t03293833008._1
1039+ let wAmountsB = $t03293833008._2
1040+ let debts = $t03293833008._3
1041+ let eqWAmountsA = $t03293833008._4
1042+ let eqWAmountsB = $t03293833008._5
1043+ let index = $t03293833008._6
10351044 if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition)))))
1036- then $Tuple3((wAmountsA :+ 0), (wAmountsB :+ 0), (index + 1))
1045+ then $Tuple6((wAmountsA :+ 0), (wAmountsB :+ 0), (debts :+ 0), (eqWAmountsA :+ 0), (eqWAmountsB :+ 0), (index + 1))
10371046 else {
1047+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1048+ let $t03328733377 = getPoolData(Address(fromBase58String(pool)), pType)
1049+ let AId = $t03328733377._1
1050+ let BId = $t03328733377._2
1051+ let balA = $t03328733377._3
1052+ let balB = $t03328733377._4
1053+ let shareId = $t03328733377._5
1054+ let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10381055 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
1039- let $t03302333143 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw)
1040- let wAmountA = $t03302333143._1
1041- let wAmountB = $t03302333143._2
1056+ let $t03359333713 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw)
1057+ let wAmountA = $t03359333713._1
1058+ let wAmountB = $t03359333713._2
10421059 if ((borrowAmount > 0))
10431060 then {
10441061 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId))
10491066 else throw(($getType(@) + " couldn't be cast to Int"))
10501067 }
10511068 if ((debt == debt))
1052- then $Tuple4((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (index + 1))
1069+ then {
1070+ let $t03399734281 = if ((pType == SF_POOL))
1071+ then calcAmountToPaySF(pool, AId, BId, balA, balB, debt, borrowAsset)
1072+ else if ((pType == WX_POOL))
1073+ then calcAmountToPayWX(pool, AId, BId, balA, balB, debt, borrowAsset)
1074+ else unknownPoolType()
1075+ let assetToPay = $t03399734281._1
1076+ let amountToPay = $t03399734281._2
1077+ let $t03428834434 = if ((assetToPay == BId))
1078+ then $Tuple2((wAmountA - debt), (wAmountB - amountToPay))
1079+ else $Tuple2((wAmountA - amountToPay), (wAmountB - debt))
1080+ let eqWAmountA = $t03428834434._1
1081+ let eqWAmountB = $t03428834434._2
1082+ $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (eqWAmountsA :+ eqWAmountA), (eqWAmountsB :+ eqWAmountB), (index + 1))
1083+ }
10531084 else throw("Strict value is not equal to itself.")
10541085 }
1055- else $Tuple3((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1))
1086+ else $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), debts, (wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1))
10561087 }
10571088 }
10581089
1059- let $t03356033637 = {
1090+ let $t03468934800 = {
10601091 let $l = pools
10611092 let $s = size($l)
1062- let $acc0 = $Tuple4(nil, nil, nil, 0)
1093+ let $acc0 = $Tuple6(nil, nil, nil, nil, nil, 0)
10631094 func $f0_1 ($a,$i) = if (($i >= $s))
10641095 then $a
10651096 else userPos($a, $l[$i])
10701101
10711102 $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)
10721103 }
1073- let wAmountsA = $t03356033637._1
1074- let wAmountsB = $t03356033637._2
1075- let debts = $t03356033637._3
1076- $Tuple2(nil, $Tuple3(wAmountsA, wAmountsB, debts))
1104+ let wAmountsA = $t03468934800._1
1105+ let wAmountsB = $t03468934800._2
1106+ let debts = $t03468934800._3
1107+ let eqWAmountsA = $t03468934800._4
1108+ let eqWAmountsB = $t03468934800._5
1109+ $Tuple2(nil, $Tuple5(wAmountsA, wAmountsB, debts, eqWAmountsA, eqWAmountsB))
10771110 }
10781111
10791112
10801113
10811114 @Callable(i)
1082-func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), if (if ((100 > leverage))
1083- then true
1084- else (leverage > 300))
1085- then throw("Leverage can't be <100 and >300")
1086- else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
1087- then (leverage > 100)
1088- else false)
1089- then throw("You can't borrow in this pool")
1090- else {
1091- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1092- let $t03412634216 = getPoolData(Address(fromBase58String(pool)), pType)
1093- let AId = $t03412634216._1
1094- let BId = $t03412634216._2
1095- let balA = $t03412634216._3
1096- let balB = $t03412634216._4
1097- let shareId = $t03412634216._5
1098- if (if ((borrowId != AId))
1099- then (borrowId != BId)
1115+func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), {
1116+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1117+ if (!(isPoolActive(pool, pType)))
1118+ then throw("Pool not active at this moment")
1119+ else if (if ((100 > leverage))
1120+ then true
1121+ else (leverage > 300))
1122+ then throw("Leverage can't be <100 and >300")
1123+ else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
1124+ then (leverage > 100)
11001125 else false)
1101- then throw("Wrong borrow asset")
1126+ then throw("You can't borrow in this pool")
11021127 else {
1103- let $t03429734356 = parseReplenishPmts(i.payments, AId, BId)
1104- let pmtA = $t03429734356._1
1105- let pmtB = $t03429734356._2
1106- let user = toString(i.caller)
1107- let newPosNum = getNewUserPositionNumber(user)
1108- if ((leverage > 100))
1109- then {
1110- let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
1111- let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1112- let newRequestId = {
1113- let @ = invoke(this, "createNewRequest", [request], nil)
1114- if ($isInstanceOf(@, "Int"))
1115- then @
1116- else throw(($getType(@) + " couldn't be cast to Int"))
1117- }
1118- if ((newRequestId == newRequestId))
1128+ let $t03539835488 = getPoolData(Address(fromBase58String(pool)), pType)
1129+ let AId = $t03539835488._1
1130+ let BId = $t03539835488._2
1131+ let balA = $t03539835488._3
1132+ let balB = $t03539835488._4
1133+ let shareId = $t03539835488._5
1134+ if (if ((borrowId != AId))
1135+ then (borrowId != BId)
1136+ else false)
1137+ then throw("Wrong borrow asset")
1138+ else {
1139+ let $t03556935628 = parseReplenishPmts(i.payments, AId, BId)
1140+ let pmtA = $t03556935628._1
1141+ let pmtB = $t03556935628._2
1142+ let user = toString(i.caller)
1143+ let newPosNum = getNewUserPositionNumber(user)
1144+ if ((leverage > 100))
11191145 then {
1120- let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1121- let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1122- if ((inv == inv))
1146+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
1147+ let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1148+ let newRequestId = {
1149+ let @ = invoke(this, "createNewRequest", [request], nil)
1150+ if ($isInstanceOf(@, "Int"))
1151+ then @
1152+ else throw(($getType(@) + " couldn't be cast to Int"))
1153+ }
1154+ if ((newRequestId == newRequestId))
11231155 then {
1124- let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1125- let $t03534535439 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1126- if (($t03534535439 == $t03534535439))
1156+ let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1157+ let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1158+ if ((inv == inv))
11271159 then {
1128- let newBalB = $t03534535439._2
1129- let newBalA = $t03534535439._1
1130- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1131- let $t03550935624 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1132- let wAmountA = $t03550935624._1
1133- let wAmountB = $t03550935624._2
1134- $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1160+ let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1161+ let $t03661736711 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1162+ if (($t03661736711 == $t03661736711))
1163+ then {
1164+ let newBalB = $t03661736711._2
1165+ let newBalA = $t03661736711._1
1166+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1167+ let $t03678136896 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1168+ let wAmountA = $t03678136896._1
1169+ let wAmountB = $t03678136896._2
1170+ $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1171+ }
1172+ else throw("Strict value is not equal to itself.")
11351173 }
11361174 else throw("Strict value is not equal to itself.")
11371175 }
11381176 else throw("Strict value is not equal to itself.")
11391177 }
1140- else throw("Strict value is not equal to itself.")
1141- }
1142- else {
1143- let $t03567735792 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1144- if (($t03567735792 == $t03567735792))
1145- then {
1146- let axlyFee = $t03567735792._2
1147- let userStaked = $t03567735792._1
1148- let $t03579835892 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1149- if (($t03579835892 == $t03579835892))
1178+ else {
1179+ let $t03694937064 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1180+ if (($t03694937064 == $t03694937064))
11501181 then {
1151- let newBalB = $t03579835892._2
1152- let newBalA = $t03579835892._1
1153- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1154- let $t03596236077 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1155- let wAmountA = $t03596236077._1
1156- let wAmountB = $t03596236077._2
1157- $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1182+ let axlyFee = $t03694937064._2
1183+ let userStaked = $t03694937064._1
1184+ let $t03707037164 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1185+ if (($t03707037164 == $t03707037164))
1186+ then {
1187+ let newBalB = $t03707037164._2
1188+ let newBalA = $t03707037164._1
1189+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1190+ let $t03723437349 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1191+ let wAmountA = $t03723437349._1
1192+ let wAmountB = $t03723437349._2
1193+ $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1194+ }
1195+ else throw("Strict value is not equal to itself.")
11581196 }
11591197 else throw("Strict value is not equal to itself.")
11601198 }
1161- else throw("Strict value is not equal to itself.")
11621199 }
11631200 }
1164- })
1201+ })
11651202
11661203
11671204
11681205 @Callable(i)
1169-func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), withdrawToUser(toString(i.caller), pool, toString(posId), false))
1206+func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), {
1207+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1208+ if (!(isPoolActive(pool, pType)))
1209+ then throw("Pool not active at this moment")
1210+ else withdrawToUser(toString(i.caller), pool, toString(posId), false)
1211+ })
11701212
11711213
11721214
11731215 @Callable(i)
11741216 func createUpdateStopLoss (posId,poolId,assetId,price) = valueOrElse(isActiveForUsers(), {
11751217 let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
1176- if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
1177- then throw("There are no user position")
1178- else if ((0 >= price))
1179- then throw("Price must be greater than 0")
1180- else if ((price > tokenOraclePrice))
1181- then throw("Price must be less than current token price")
1182- else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
1218+ let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited")
1219+ if (!(isPoolActive(poolId, pType)))
1220+ then throw("Pool not active at this moment")
1221+ else if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
1222+ then throw("There are no user position")
1223+ else if ((0 >= price))
1224+ then throw("Price must be greater than 0")
1225+ else if ((price > tokenOraclePrice))
1226+ then throw("Price must be less than current token price")
1227+ else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
11831228 })
11841229
11851230
11861231
11871232 @Callable(i)
1188-func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
1189- then throw("No entry")
1190- else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))])
1233+func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), {
1234+ let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited")
1235+ if (!(isPoolActive(poolId, pType)))
1236+ then throw("Pool not active at this moment")
1237+ else if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
1238+ then throw("No entry")
1239+ else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
1240+ })
11911241
11921242
11931243
11941244 @Callable(i)
1195-func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if ((toString(i.caller) != "3PG42y6FgT8zM3uX5tEDxJF5rqX8AKGJRAR"))
1196- then throw("Only admin can call this function")
1197- else if (isDefined(getString(kAdminCallPK)))
1198- then throw("Already inited")
1199- 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)]
1245+func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = valueOrElse(isSelfCall(i), if (isDefined(getString(kAdminCallPK)))
1246+ then throw("Already inited")
1247+ else if (!(isDefined(addressFromString(moneyBoxAddr))))
1248+ then throw("moneyBoxAddr is not correct address")
1249+ else if (!(isDefined(addressFromString(sfFarmingAddr))))
1250+ then throw("sfFarmingAddr is not correct address")
1251+ else if (!(isDefined(addressFromString(lendAddr))))
1252+ then throw("lendAddr is not correct address")
1253+ else if (!(isDefined(addressFromString(priceOracleAddr))))
1254+ then throw("priceOracleAddr is not correct address")
1255+ else if (!(isDefined(addressFromString(keeperExContract))))
1256+ then throw("keeperExContract is not correct address")
1257+ else if (!(isDefined(assetInfo(fromBase58String(swopAssetId)))))
1258+ then throw("swopAssetId is not correct asset id")
1259+ else if (!(isDefined(assetInfo(fromBase58String(wxAssetId)))))
1260+ then throw("swopAssetId is not correct asset id")
1261+ else if ((size(fromBase58String(adminPubKey)) != 32))
1262+ then throw("adminPubKey is not correct")
1263+ 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)])
12001264
12011265
12021266
12101274
12111275 @Callable(i)
12121276 func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), {
1213- let $t03884638950 = parseRequest(requestId)
1214- let user = $t03884638950._1
1215- let pool = $t03884638950._2
1216- let pmtA = $t03884638950._3
1217- let AId = $t03884638950._4
1218- let pmtB = $t03884638950._5
1219- let BId = $t03884638950._6
1220- let balA = $t03884638950._7
1221- let balB = $t03884638950._8
1222- let shareId = $t03884638950._9
1223- let bwAsset = $t03884638950._10
1224- let bwAmount = $t03884638950._11
1277+ let $t04139841502 = parseRequest(requestId)
1278+ let user = $t04139841502._1
1279+ let pool = $t04139841502._2
1280+ let pmtA = $t04139841502._3
1281+ let AId = $t04139841502._4
1282+ let pmtB = $t04139841502._5
1283+ let BId = $t04139841502._6
1284+ let balA = $t04139841502._7
1285+ let balB = $t04139841502._8
1286+ let shareId = $t04139841502._9
1287+ let bwAsset = $t04139841502._10
1288+ let bwAmount = $t04139841502._11
12251289 if ((size(i.payments) != 1))
12261290 then throw("Wrong payment size")
12271291 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
12291293 else (i.payments[0].amount != bwAmount))
12301294 then throw("Wrong payment")
12311295 else {
1232- let $t03914039240 = if ((AId == bwAsset))
1296+ let $t04169241792 = if ((AId == bwAsset))
12331297 then $Tuple2((pmtA + bwAmount), pmtB)
12341298 else $Tuple2(pmtA, (pmtB + bwAmount))
1235- let pmtAllA = $t03914039240._1
1236- let pmtAllB = $t03914039240._2
1299+ let pmtAllA = $t04169241792._1
1300+ let pmtAllB = $t04169241792._2
12371301 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1238- let $t03932239437 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1239- let userStaked = $t03932239437._1
1240- let axlyFee = $t03932239437._2
1302+ let $t04187441989 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1303+ let userStaked = $t04187441989._1
1304+ let axlyFee = $t04187441989._2
12411305 let posNum = getNewUserPositionNumber(user)
12421306 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12431307 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
1244- let $t03979739912 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1245- let wAmountA = $t03979739912._1
1246- let wAmountB = $t03979739912._2
1308+ let $t04234942464 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1309+ let wAmountA = $t04234942464._1
1310+ let wAmountB = $t04234942464._2
12471311 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
12481312 }
12491313 }))
12541318 func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), {
12551319 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12561320 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1257- let $t04043340523 = getPoolData(Address(fromBase58String(pool)), pType)
1258- let AId = $t04043340523._1
1259- let BId = $t04043340523._2
1260- let balA = $t04043340523._3
1261- let balB = $t04043340523._4
1262- let shareId = $t04043340523._5
1321+ let $t04298543075 = getPoolData(Address(fromBase58String(pool)), pType)
1322+ let AId = $t04298543075._1
1323+ let BId = $t04298543075._2
1324+ let balA = $t04298543075._3
1325+ let balB = $t04298543075._4
1326+ let shareId = $t04298543075._5
12631327 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12641328 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12651329 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12761340 @Callable(i)
12771341 func stopLoss (user,posId,pool,assetId) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
12781342 let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
1279- if ((tokenOraclePrice > tokenOraclePrice))
1343+ let stopLossPrice = valueOrErrorMessage(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)), "No entry")
1344+ if ((tokenOraclePrice > stopLossPrice))
12801345 then throw("Token price greater stop loss price")
1281- else if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
1282- then throw("No entry")
1283- else {
1284- let res = withdrawToUser(user, pool, toString(posId), true)
1285- $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2)
1286- }
1346+ else {
1347+ let res = withdrawToUser(user, pool, toString(posId), true)
1348+ $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2)
1349+ }
12871350 }))
12881351
12891352
12921355 func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
12931356 let pType = getStringValue(this, (kPool + pool))
12941357 let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)
1295- let $t04266142762 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1296- let claimedAmount = $t04266142762._1
1297- let claimedAsset = $t04266142762._2
1358+ let $t04521845319 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1359+ let claimedAmount = $t04521845319._1
1360+ let claimedAsset = $t04521845319._2
12981361 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12991362 let newChange = ((claimedAmount + change) - amountToExchange)
13001363 let changeEntry = if ((newChange >= 0))
13091372 func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
13101373 let pType = getStringValue(this, (kPool + pool))
13111374 let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)
1312- let $t04353743638 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1313- let claimedAmount = $t04353743638._1
1314- let claimedAsset = $t04353743638._2
1375+ let $t04609446195 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1376+ let claimedAmount = $t04609446195._1
1377+ let claimedAsset = $t04609446195._2
13151378 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
13161379 let newChange = ((claimedAmount + change) - amountToExchange)
13171380 let changeEntry = if ((newChange >= 0))
13261389 func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
13271390 let pType = getStringValue(this, (kPool + pool))
13281391 let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)
1329- let $t04448044581 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1330- let claimedAmount = $t04448044581._1
1331- let claimedAsset = $t04448044581._2
1392+ let $t04703747138 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1393+ let claimedAmount = $t04703747138._1
1394+ let claimedAsset = $t04703747138._2
13321395 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13331396 let newChange = ((claimedAmount + change) - amountToExchange)
13341397 let changeEntry = if ((newChange >= 0))
13451408 else false)
13461409 then throw("Wrong type")
13471410 else {
1348- let $t04531245406 = getPoolData(Address(fromBase58String(poolAddr)), type)
1349- let aId = $t04531245406._1
1350- let bId = $t04531245406._2
1351- let aBal = $t04531245406._3
1352- let bBal = $t04531245406._4
1353- let shareId = $t04531245406._5
1411+ let $t04786947963 = getPoolData(Address(fromBase58String(poolAddr)), type)
1412+ let aId = $t04786947963._1
1413+ let bId = $t04786947963._2
1414+ let aBal = $t04786947963._3
1415+ let bBal = $t04786947963._4
1416+ let shareId = $t04786947963._5
13541417 if ((0 > inFeeNoLoan))
13551418 then throw("inFeeNoLoan must be greater than 0")
13561419 else if ((0 > inFeeLoan))
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 kActive = "active"
9393
9494 let kActiveUsers = "activeUsers"
9595
9696 let kActiveSFWX = "_active"
9797
9898 let kPoolActive = "_activePool"
9999
100100 let kUserStopLoss = "_stopLoss"
101101
102102 let kMoneyBox = "axly_money_box"
103103
104104 let kSFFarmingAddr = "swopfi_farming_addr"
105105
106106 let kLendService = "lend_service_addr"
107107
108108 let kAdminCallPK = "admin_call_pub_key"
109109
110110 let kPriceOracle = "price_oracle"
111111
112112 let kExContract = "exchange_contract"
113113
114114 let kWxSwapContract = "wx_swap_contract"
115115
116116 let kSwopId = "swop_id"
117117
118118 let kWxId = "wx_id"
119119
120120 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
121121
122122 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
123123
124124 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
125125
126126 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
127127
128128 let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id"))
129129
130130 let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id"))
131131
132132 func unknownPoolType () = throw("Wrong pool type")
133133
134134
135135 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
136136
137137
138138 func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr")))
139139
140140
141141 func isAdminCall (i) = if ((i.caller == getAdminCallAddr()))
142142 then unit
143143 else throw("Only admin can call this function")
144144
145145
146146 func isSelfCall (i) = if ((i.caller == this))
147147 then unit
148148 else throw("Only contract itself can call this function")
149149
150150
151151 func isLandCall (i) = if ((i.caller == getLendSrvAddr()))
152152 then unit
153153 else throw("Only land contract can call this function")
154154
155155
156156 func isActive () = if ((valueOrElse(getBoolean(this, kActive), true) == true))
157157 then unit
158158 else throw("DApp is inactive at this moment")
159159
160160
161161 func isActiveForUsers () = if (if (valueOrElse(getBoolean(this, kActive), true))
162162 then (valueOrElse(getBoolean(this, kActiveUsers), true) == true)
163163 else false)
164164 then unit
165165 else throw("DApp is inactive for users at this moment")
166166
167167
168168 func isPoolActive (pool,type) = {
169169 let WXSFActive = valueOrElse(getBoolean(this, (type + kActiveSFWX)), true)
170170 let poolActive = valueOrElse(getBoolean(this, (pool + kPoolActive)), true)
171171 if (if (WXSFActive)
172172 then poolActive
173173 else false)
174174 then true
175175 else false
176176 }
177177
178178
179179 func accountBalance (assetId) = match assetId {
180180 case id: ByteVector =>
181181 assetBalance(this, id)
182182 case waves: Unit =>
183183 wavesBalance(this).available
184184 case _ =>
185185 throw("Match error")
186186 }
187187
188188
189189 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"))
190190
191191
192192 func getWXPoolBalances (poolAddr,aId,bId) = $Tuple2({
193193 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
194194 if ($isInstanceOf(@, "Int"))
195195 then @
196196 else throw(($getType(@) + " couldn't be cast to Int"))
197197 }, {
198198 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
199199 if ($isInstanceOf(@, "Int"))
200200 then @
201201 else throw(($getType(@) + " couldn't be cast to Int"))
202202 })
203203
204204
205205 func getPoolBalances (poolAddr,type,aId,bId) = if ((type == SF_POOL))
206206 then getSFPoolBalances(poolAddr)
207207 else if ((type == WX_POOL))
208208 then getWXPoolBalances(poolAddr, aId, bId)
209209 else unknownPoolType()
210210
211211
212212 func getSFPoolData (poolAddr) = {
213213 let $t070647113 = getSFPoolBalances(poolAddr)
214214 if (($t070647113 == $t070647113))
215215 then {
216216 let balB = $t070647113._2
217217 let balA = $t070647113._1
218218 $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"))
219219 }
220220 else throw("Strict value is not equal to itself.")
221221 }
222222
223223
224224 func getWXPoolData (poolAddr) = {
225225 let cfg = {
226226 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
227227 if ($isInstanceOf(@, "List[Any]"))
228228 then @
229229 else throw(($getType(@) + " couldn't be cast to List[Any]"))
230230 }
231231 if ((cfg == cfg))
232232 then {
233233 let aId = valueOrErrorMessage({
234234 let @ = cfg[4]
235235 if ($isInstanceOf(@, "String"))
236236 then @
237237 else unit
238238 }, "Can't get pool A asset id")
239239 let bId = valueOrErrorMessage({
240240 let @ = cfg[5]
241241 if ($isInstanceOf(@, "String"))
242242 then @
243243 else unit
244244 }, "Can't get pool B asset id")
245245 let shareId = valueOrErrorMessage({
246246 let @ = cfg[3]
247247 if ($isInstanceOf(@, "String"))
248248 then @
249249 else unit
250250 }, "Can't get pool LP asset id")
251251 let $t078107869 = getWXPoolBalances(poolAddr, aId, bId)
252252 if (($t078107869 == $t078107869))
253253 then {
254254 let balB = $t078107869._2
255255 let balA = $t078107869._1
256256 $Tuple5(aId, bId, balA, balB, shareId)
257257 }
258258 else throw("Strict value is not equal to itself.")
259259 }
260260 else throw("Strict value is not equal to itself.")
261261 }
262262
263263
264264 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
265265 then getSFPoolData(poolAddr)
266266 else if ((type == WX_POOL))
267267 then getWXPoolData(poolAddr)
268268 else unknownPoolType()
269269
270270
271271 func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
272272 then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
273273 else if ((type == WX_POOL))
274274 then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
275275 else unknownPoolType()
276276
277277
278278 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
279279
280280
281281 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
282282
283283
284284 func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1)
285285
286286
287287 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
288288 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
289289 else if ((feeType == CAP_FEE_NO_LOAN))
290290 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
291291 else if ((feeType == LOAN_FEE))
292292 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
293293 else if ((feeType == NO_LOAN_FEE))
294294 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
295295 else if ((feeType == NO_FEE))
296296 then 0
297297 else throw("Wrong fee type")
298298
299299
300300 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
301301
302302
303303 func getWXFarmingAddr (poolAddr) = {
304304 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
305305 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
306306 Address(fromBase58String(factroyCfg[1]))
307307 }
308308
309309
310310 func assetIdToStr (assetId) = match assetId {
311311 case id: ByteVector =>
312312 toBase58String(id)
313313 case waves: Unit =>
314314 "WAVES"
315315 case _ =>
316316 throw("Not Asset id")
317317 }
318318
319319
320320 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
321321 then unit
322322 else fromBase58String(assetId)
323323
324324
325325 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
326326 then 8
327327 else match assetInfo(fromBase58String(assetId)) {
328328 case asset: Asset =>
329329 asset.decimals
330330 case _ =>
331331 throw("Can't find asset")
332332 }
333333
334334
335335 func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
336336
337337
338338 func getAssetsPrice (assetIds) = {
339339 func getPrices (a,assetId) = {
340340 let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
341341 (a :+ assetPrice)
342342 }
343343
344344 let $l = assetIds
345345 let $s = size($l)
346346 let $acc0 = nil
347347 func $f0_1 ($a,$i) = if (($i >= $s))
348348 then $a
349349 else getPrices($a, $l[$i])
350350
351351 func $f0_2 ($a,$i) = if (($i >= $s))
352352 then $a
353353 else throw("List size exceeds 50")
354354
355355 $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)
356356 }
357357
358358
359359 func getSharePrice (shareId) = {
360360 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
361361 let poolAddr = Address(fromBase58String(pool))
362362 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
363363 let $t01084710912 = getPoolData(poolAddr, pType)
364364 let aId = $t01084710912._1
365365 let bId = $t01084710912._2
366366 let aBalance = $t01084710912._3
367367 let bBalance = $t01084710912._4
368368 let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
369369 let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
370370 let shareSupply = getShareSupply(poolAddr, pType, shareId)
371371 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
372372 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
373373 let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
374374 let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
375375 fraction(sum, sharePrecision, shareSupply)
376376 }
377377
378378
379379 func getSharePrices (shareIds) = {
380380 func getPrices (a,shareId) = (a :+ getSharePrice(shareId))
381381
382382 let $l = shareIds
383383 let $s = size($l)
384384 let $acc0 = nil
385385 func $f0_1 ($a,$i) = if (($i >= $s))
386386 then $a
387387 else getPrices($a, $l[$i])
388388
389389 func $f0_2 ($a,$i) = if (($i >= $s))
390390 then $a
391391 else throw("List size exceeds 20")
392392
393393 $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)
394394 }
395395
396396
397397 func getCursEntries (aId,bId,shareId,wAmounts) = {
398398 let assetsPrices = getAssetsPrice([aId, bId])
399399 let sharePrice = getSharePrice(shareId)
400400 let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts)
401401 [StringEntry(kTokenLastPrice, makeString(prices, ","))]
402402 }
403403
404404
405405 func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL))
406406 then {
407407 let repl = {
408408 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil)
409409 if ($isInstanceOf(@, "List[Any]"))
410410 then @
411411 else throw(($getType(@) + " couldn't be cast to List[Any]"))
412412 }
413413 if ((repl == repl))
414414 then $Tuple5({
415415 let @ = repl[3]
416416 if ($isInstanceOf(@, "Int"))
417417 then @
418418 else throw(($getType(@) + " couldn't be cast to Int"))
419419 }, {
420420 let @ = repl[4]
421421 if ($isInstanceOf(@, "Int"))
422422 then @
423423 else throw(($getType(@) + " couldn't be cast to Int"))
424424 }, {
425425 let @ = repl[1]
426426 if ($isInstanceOf(@, "Int"))
427427 then @
428428 else throw(($getType(@) + " couldn't be cast to Int"))
429429 }, assetIdToStr(repl[2]), {
430430 let @ = repl[0]
431431 if ($isInstanceOf(@, "Int"))
432432 then @
433433 else throw(($getType(@) + " couldn't be cast to Int"))
434434 })
435435 else throw("Strict value is not equal to itself.")
436436 }
437437 else if ((pType == WX_POOL))
438438 then {
439439 let $t01245712707 = $Tuple2(split({
440440 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
441441 if ($isInstanceOf(@, "String"))
442442 then @
443443 else throw(($getType(@) + " couldn't be cast to String"))
444444 }, "__"), split({
445445 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
446446 if ($isInstanceOf(@, "String"))
447447 then @
448448 else throw(($getType(@) + " couldn't be cast to String"))
449449 }, "__"))
450450 if (($t01245712707 == $t01245712707))
451451 then {
452452 let evalPutInB = $t01245712707._2
453453 let evalPutInA = $t01245712707._1
454454 let lpInA = parseIntValue(evalPutInA[1])
455455 let lpInB = parseIntValue(evalPutInB[1])
456456 if ((lpInB > lpInA))
457457 then {
458458 let pmt = parseIntValue(evalPutInA[8])
459459 $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB)
460460 }
461461 else {
462462 let pmt = parseIntValue(evalPutInB[7])
463463 $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA)
464464 }
465465 }
466466 else throw("Strict value is not equal to itself.")
467467 }
468468 else unknownPoolType()
469469
470470
471471 func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
472472 let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
473473 if ((pType == SF_POOL))
474474 then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
475475 else if ((pType == WX_POOL))
476476 then invoke(poolAddr, "put", [1000000, false], payments)
477477 else unknownPoolType()
478478 }
479479
480480
481481 func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
482482 let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
483483 if ((pType == SF_POOL))
484484 then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
485485 else if ((pType == WX_POOL))
486486 then invoke(poolAddr, "putOneTkn", [0, false], payments)
487487 else unknownPoolType()
488488 }
489489
490490
491491 func stakeLP (pool,pType,shareId,amount) = {
492492 let payments = [AttachedPayment(fromBase58String(shareId), amount)]
493493 if ((pType == SF_POOL))
494494 then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
495495 else if ((pType == WX_POOL))
496496 then invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
497497 else unknownPoolType()
498498 }
499499
500500
501501 func unstakeLP (pool,pType,shareId,amount) = {
502502 let $t01436614716 = if ((pType == SF_POOL))
503503 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
504504 else if ((pType == WX_POOL))
505505 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
506506 else unknownPoolType()
507507 let farmAddr = $t01436614716._1
508508 let fName = $t01436614716._2
509509 let params = $t01436614716._3
510510 let inv = invoke(farmAddr, fName, params, nil)
511511 if ((inv == inv))
512512 then amount
513513 else throw("Strict value is not equal to itself.")
514514 }
515515
516516
517517 func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
518518 let poolAddr = Address(fromBase58String(pool))
519519 let feeScale6 = 1000000
520520 let fee = getIntegerValue(poolAddr, kSFPoolFee)
521521 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING)
522522 let $t01513815444 = if ((assetTokenToGet == assetIdA))
523523 then {
524524 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING)
525525 $Tuple2(amountToPay, assetIdB)
526526 }
527527 else {
528528 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING)
529529 $Tuple2(amountToPay, assetIdA)
530530 }
531531 let amountToPay = $t01513815444._1
532532 let assetToPay = $t01513815444._2
533533 $Tuple2(assetToPay, amountToPay)
534534 }
535535
536536
537+func getWXSwapFees (pool) = {
538+ let poolAddr = addressFromStringValue(pool)
539+ let fContract = addressFromStringValue(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))
540+ let poolFeeDefault = value(getInteger(wxSwapContract, "%s__poolFee"))
541+ let protocolFeeDefault = value(getInteger(wxSwapContract, "%s__protocolFee"))
542+ match invoke(fContract, "getSwapFeeREADONLY", [toString(poolAddr)], nil) {
543+ case fees: (Int, Int) =>
544+ $Tuple2(fees._1, fees._2)
545+ case _ =>
546+ $Tuple2(poolFeeDefault, protocolFeeDefault)
547+ }
548+ }
549+
550+
537551 func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
538- let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
539- let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
552+ let $t01618416223 = getWXSwapFees(pool)
553+ let pFee = $t01618416223._1
554+ let prFee = $t01618416223._2
540555 let feeScale = toBigInt(100000000)
541- let $t01578316091 = if ((assetTokenToGet == assetIdA))
556+ let $t01626316571 = if ((assetTokenToGet == assetIdA))
542557 then {
543558 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
544559 $Tuple2(amountToPay, assetIdB)
545560 }
546561 else {
547562 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
548563 $Tuple2(amountToPay, assetIdA)
549564 }
550- let amountToPay = $t01578316091._1
551- let assetToPay = $t01578316091._2
565+ let amountToPay = $t01626316571._1
566+ let assetToPay = $t01626316571._2
552567 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
553568 $Tuple2(assetToPay, amountToPayWithFee)
554569 }
555570
556571
557572 func exchangeDirectly (pType,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((pType == SF_POOL))
558573 then {
559- let $t01643816560 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
560- let assetToPay = $t01643816560._1
561- let amountToPay = $t01643816560._2
574+ let $t01691817040 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
575+ let assetToPay = $t01691817040._1
576+ let amountToPay = $t01691817040._2
562577 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
563578 }
564579 else if ((pType == WX_POOL))
565580 then {
566- let $t01676016882 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
567- let assetToPay = $t01676016882._1
568- let amountToPay = $t01676016882._2
581+ let $t01724017362 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
582+ let assetToPay = $t01724017362._1
583+ let amountToPay = $t01724017362._2
569584 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
570585 }
571586 else unknownPoolType()
572587
573588
574589 func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = {
575- let $t01716917633 = if ((pType == SF_POOL))
590+ let $t01764918113 = if ((pType == SF_POOL))
576591 then {
577592 let inv = {
578593 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil)
579594 if ($isInstanceOf(@, "List[Any]"))
580595 then @
581596 else throw(($getType(@) + " couldn't be cast to List[Any]"))
582597 }
583598 if ((inv == inv))
584599 then $Tuple2({
585600 let @ = inv[0]
586601 if ($isInstanceOf(@, "Int"))
587602 then @
588603 else throw(($getType(@) + " couldn't be cast to Int"))
589604 }, {
590605 let @ = inv[1]
591606 if ($isInstanceOf(@, "Int"))
592607 then @
593608 else throw(($getType(@) + " couldn't be cast to Int"))
594609 })
595610 else throw("Strict value is not equal to itself.")
596611 }
597612 else if ((pType == WX_POOL))
598613 then {
599614 let inv = split({
600615 let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil)
601616 if ($isInstanceOf(@, "String"))
602617 then @
603618 else throw(($getType(@) + " couldn't be cast to String"))
604619 }, "__")
605620 if ((inv == inv))
606621 then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2]))
607622 else throw("Strict value is not equal to itself.")
608623 }
609624 else unknownPoolType()
610- let amountA = $t01716917633._1
611- let amountB = $t01716917633._2
625+ let amountA = $t01764918113._1
626+ let amountB = $t01764918113._2
612627 $Tuple2(amountA, amountB)
613628 }
614629
615630
616631 func claimFarmed (pType,pool) = if ((pType == SF_POOL))
617632 then {
618633 let balBefore = accountBalance(SWOPID)
619634 if ((balBefore == balBefore))
620635 then {
621636 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
622637 if ((inv == inv))
623638 then {
624639 let balAfter = accountBalance(SWOPID)
625640 $Tuple2((balAfter - balBefore), SWOPID)
626641 }
627642 else throw("Strict value is not equal to itself.")
628643 }
629644 else throw("Strict value is not equal to itself.")
630645 }
631646 else if ((pType == WX_POOL))
632647 then {
633648 let balBefore = accountBalance(WXID)
634649 if ((balBefore == balBefore))
635650 then {
636651 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
637652 if ((inv == inv))
638653 then {
639654 let balAfter = accountBalance(WXID)
640655 $Tuple2((balAfter - balBefore), WXID)
641656 }
642657 else throw("Strict value is not equal to itself.")
643658 }
644659 else throw("Strict value is not equal to itself.")
645660 }
646661 else unknownPoolType()
647662
648663
649664 func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
650665 let lpBalanceBefore = accountBalance(fromBase58String(LPId))
651666 if ((lpBalanceBefore == lpBalanceBefore))
652667 then {
653668 let poolAddr = addressFromStringValue(pool)
654- let $t01859819014 = if (if ((pmtA > 0))
669+ let $t01907819494 = if (if ((pmtA > 0))
655670 then (pmtB > 0)
656671 else false)
657672 then {
658- let $t01866418780 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
659- let pmtInA = $t01866418780._1
660- let pmtInB = $t01866418780._2
661- let change = $t01866418780._3
662- let changeId = $t01866418780._4
673+ let $t01914419260 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
674+ let pmtInA = $t01914419260._1
675+ let pmtInB = $t01914419260._2
676+ let change = $t01914419260._3
677+ let changeId = $t01914419260._4
663678 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
664679 if ((inv == inv))
665680 then $Tuple2(change, changeId)
666681 else throw("Strict value is not equal to itself.")
667682 }
668683 else if ((pmtA > 0))
669684 then $Tuple2(pmtA, aId)
670685 else if ((pmtB > 0))
671686 then $Tuple2(pmtB, bId)
672687 else throw("pmts must be > 0")
673- let change = $t01859819014._1
674- let changeId = $t01859819014._2
688+ let change = $t01907819494._1
689+ let changeId = $t01907819494._2
675690 let inv = if ((change > 0))
676691 then replenishOneTokenByType(poolAddr, pType, change, changeId)
677692 else nil
678693 if ((inv == inv))
679694 then {
680695 let lpBalanceAfter = accountBalance(fromBase58String(LPId))
681696 let totalStaked = (lpBalanceAfter - lpBalanceBefore)
682697 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
683698 let userShareForStake = (totalStaked - axlyFeeAmount)
684699 if ((0 >= userShareForStake))
685700 then throw("amount of staked sharetokens must be > 0")
686701 else {
687702 let invLP = stakeLP(pool, pType, LPId, userShareForStake)
688703 if ((invLP == invLP))
689704 then $Tuple2(userShareForStake, axlyFeeAmount)
690705 else throw("Strict value is not equal to itself.")
691706 }
692707 }
693708 else throw("Strict value is not equal to itself.")
694709 }
695710 else throw("Strict value is not equal to itself.")
696711 }
697712
698713
699714 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
700715 let totalAmount = getPoolTotalShare(pool)
701716 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
702- let $t01987220110 = if (withLoan)
717+ let $t02035220590 = if (withLoan)
703718 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
704719 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
705- let curPoolInterest = $t01987220110._1
706- let totalStakedWithLoan = $t01987220110._2
720+ let curPoolInterest = $t02035220590._1
721+ let totalStakedWithLoan = $t02035220590._2
707722 [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))]
708723 }
709724
710725
711726 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
712727 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
713728 if ((tokenBalanceBefore == tokenBalanceBefore))
714729 then {
715730 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
716731 if ((inv == inv))
717732 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
718733 else throw("Strict value is not equal to itself.")
719734 }
720735 else throw("Strict value is not equal to itself.")
721736 }
722737
723738
724739 func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
725740 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
726741 if ((tokenBalanceBefore == tokenBalanceBefore))
727742 then {
728743 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
729744 if ((inv == inv))
730745 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
731746 else throw("Strict value is not equal to itself.")
732747 }
733748 else throw("Strict value is not equal to itself.")
734749 }
735750
736751
737752 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
738753 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
739754 if ((tokenBalanceBefore == tokenBalanceBefore))
740755 then {
741756 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
742757 if ((inv == inv))
743758 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
744759 else throw("Strict value is not equal to itself.")
745760 }
746761 else throw("Strict value is not equal to itself.")
747762 }
748763
749764
750765 func capitalize (pool,pType,tokenId,tokenAmount) = {
751766 let poolAddr = Address(fromBase58String(pool))
752- let $t02246122527 = getPoolData(poolAddr, pType)
753- let AId = $t02246122527._1
754- let BId = $t02246122527._2
755- let balA = $t02246122527._3
756- let balB = $t02246122527._4
757- let shareId = $t02246122527._5
767+ let $t02294123007 = getPoolData(poolAddr, pType)
768+ let AId = $t02294123007._1
769+ let BId = $t02294123007._2
770+ let balA = $t02294123007._3
771+ let balB = $t02294123007._4
772+ let shareId = $t02294123007._5
758773 if (if ((tokenId != AId))
759774 then (tokenId != BId)
760775 else false)
761776 then throw("Wrong asset")
762777 else {
763- let $t02261222692 = if ((tokenId == AId))
778+ let $t02309223172 = if ((tokenId == AId))
764779 then $Tuple2(tokenAmount, 0)
765780 else $Tuple2(0, tokenAmount)
766- let pmtA = $t02261222692._1
767- let pmtB = $t02261222692._2
768- let $t02269522799 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
769- let stakedAmount = $t02269522799._1
770- let nf = $t02269522799._2
781+ let pmtA = $t02309223172._1
782+ let pmtB = $t02309223172._2
783+ let $t02317523279 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
784+ let stakedAmount = $t02317523279._1
785+ let nf = $t02317523279._2
771786 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
772787 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
773788 let totalShareAmount = getPoolTotalShare(pool)
774789 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
775790 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
776791 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
777792 let stakedNoLoan = (stakedAmount - stakedLoan)
778793 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
779794 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
780795 else 0
781796 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
782797 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
783798 else 0
784799 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
785800 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
786801 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
787802 if ((axlyFee == axlyFee))
788803 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))
789804 else throw("Strict value is not equal to itself.")
790805 }
791806 }
792807
793808
794809 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset,stopLossFee) = {
795810 let poolAddr = Address(fromBase58String(pool))
796811 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
797- let $t02458924665 = getPoolData(poolAddr, pType)
798- let assetIdA = $t02458924665._1
799- let assetIdB = $t02458924665._2
800- let balA = $t02458924665._3
801- let balB = $t02458924665._4
802- let shareId = $t02458924665._5
812+ let $t02506925145 = getPoolData(poolAddr, pType)
813+ let assetIdA = $t02506925145._1
814+ let assetIdB = $t02506925145._2
815+ let balA = $t02506925145._3
816+ let balB = $t02506925145._4
817+ let shareId = $t02506925145._5
803818 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
804819 if ((cBalABefore == cBalABefore))
805820 then {
806821 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
807822 if ((cBalBBefore == cBalBBefore))
808823 then {
809824 let inv = if ((pType == SF_POOL))
810825 then {
811826 let inv = unstakeLP(pool, pType, shareId, stopLossFee)
812827 if ((inv == inv))
813828 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
814829 else throw("Strict value is not equal to itself.")
815830 }
816831 else if ((pType == WX_POOL))
817832 then {
818833 let inv = unstakeLP(pool, pType, shareId, (userCanWithdraw + stopLossFee))
819834 if ((inv == inv))
820835 then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)])
821836 else throw("Strict value is not equal to itself.")
822837 }
823838 else unknownPoolType()
824839 if ((inv == inv))
825840 then {
826841 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
827842 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
828- let $t02535825447 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
829- let tokensAmountA = $t02535825447._1
830- let tokensAmountB = $t02535825447._2
831- let $t02545026304 = if ((debt > 0))
843+ let $t02583825927 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
844+ let tokensAmountA = $t02583825927._1
845+ let tokensAmountB = $t02583825927._2
846+ let $t02593026784 = if ((debt > 0))
832847 then {
833848 let amountToGetEx = if (if ((borrowAsset == assetIdA))
834849 then (debt > tokensAmountA)
835850 else false)
836851 then (debt - tokensAmountA)
837852 else if (if ((borrowAsset == assetIdB))
838853 then (debt > tokensAmountB)
839854 else false)
840855 then (debt - tokensAmountB)
841856 else 0
842857 let exInv = if ((amountToGetEx > 0))
843858 then exchangeDirectly(pType, pool, assetIdA, assetIdB, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset)
844859 else nil
845860 if ((exInv == exInv))
846861 then {
847862 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
848863 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
849864 if ((borrowAsset == assetIdA))
850865 then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore))
851866 else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt))
852867 }
853868 else throw("Strict value is not equal to itself.")
854869 }
855870 else $Tuple2(tokensAmountA, tokensAmountB)
856- let toUserA = $t02545026304._1
857- let toUserB = $t02545026304._2
871+ let toUserA = $t02593026784._1
872+ let toUserB = $t02593026784._2
858873 $Tuple5(toUserA, assetIdA, toUserB, assetIdB, shareId)
859874 }
860875 else throw("Strict value is not equal to itself.")
861876 }
862877 else throw("Strict value is not equal to itself.")
863878 }
864879 else throw("Strict value is not equal to itself.")
865880 }
866881
867882
868883 func userCanWithdrawShareCalc (user,pool,posId,borrowed) = {
869884 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
870885 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
871886 let poolInterest = if (borrowed)
872887 then getIntegerValue(this, (pool + kPoolInterestLoan))
873888 else getIntegerValue(this, (pool + kPoolInterestNoLoan))
874889 (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10))
875890 }
876891
877892
878893 func withdrawToUser (user,pool,posId,stopLoss) = {
879894 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
880895 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0)
881896 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
882897 let poolTotalShare = getPoolTotalShare(pool)
883898 let userAddr = Address(fromBase58String(user))
884899 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
885- let $t02750227736 = if ((borrowAmount > 0))
900+ let $t02798228216 = if ((borrowAmount > 0))
886901 then $Tuple2({
887902 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil)
888903 if ($isInstanceOf(@, "Int"))
889904 then @
890905 else throw(($getType(@) + " couldn't be cast to Int"))
891906 }, STOPLOSS_LOAN)
892907 else $Tuple2(0, STOPLOSS_FEE_NO_LOAN)
893- let debt = $t02750227736._1
894- let feeType = $t02750227736._2
908+ let debt = $t02798228216._1
909+ let feeType = $t02798228216._2
895910 let stopLossFee = if (stopLoss)
896911 then fraction(userCanWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6)
897912 else 0
898- let $t02785328009 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
899- if (($t02785328009 == $t02785328009))
913+ let $t02833328489 = withdrawAmountCalc(pool, (userCanWithdraw - stopLossFee), debt, borrowAsset, stopLossFee)
914+ if (($t02833328489 == $t02833328489))
900915 then {
901- let shareId = $t02785328009._5
902- let assetIdB = $t02785328009._4
903- let toUserAmountB = $t02785328009._3
904- let assetIdA = $t02785328009._2
905- let toUserAmountA = $t02785328009._1
916+ let shareId = $t02833328489._5
917+ let assetIdB = $t02833328489._4
918+ let toUserAmountB = $t02833328489._3
919+ let assetIdA = $t02833328489._2
920+ let toUserAmountA = $t02833328489._1
906921 let closeDbtInv = if ((debt > 0))
907922 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
908923 else 0
909924 if ((closeDbtInv == closeDbtInv))
910925 then {
911926 let entries = ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB)), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil))
912927 $Tuple2(entries, [toUserAmountA, toUserAmountB])
913928 }
914929 else throw("Strict value is not equal to itself.")
915930 }
916931 else throw("Strict value is not equal to itself.")
917932 }
918933
919934
920935 func parseRequest (requestId) = {
921936 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
922937 let user = request[0]
923938 let pool = request[1]
924939 let pmtA = parseIntValue(request[2])
925940 let AId = request[3]
926941 let pmtB = parseIntValue(request[4])
927942 let BId = request[5]
928943 let balA = parseIntValue(request[6])
929944 let balB = parseIntValue(request[7])
930945 let shareId = request[8]
931946 let bwAsset = request[9]
932947 let bwAmount = parseIntValue(request[10])
933948 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
934949 }
935950
936951
937952 func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = if (if ((borrowId != aId))
938953 then (borrowId != bId)
939954 else false)
940955 then throw("Wrong borrow asset")
941956 else {
942957 let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
943958 let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
944959 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
945960 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
946961 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
947- let $t03007230169 = if ((borrowId == aId))
962+ let $t03055230649 = if ((borrowId == aId))
948963 then $Tuple2(dPriceA, decPrA)
949964 else $Tuple2(dPriceB, decPrB)
950- let borrowPrice = $t03007230169._1
951- let borrowDecPr = $t03007230169._2
965+ let borrowPrice = $t03055230649._1
966+ let borrowDecPr = $t03055230649._2
952967 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
953968 }
954969
955970
956971 func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2))
957972 then if ((assetIdToStr(pmts[0].assetId) != AId))
958973 then throw("Wrong payment asset A")
959974 else if ((assetIdToStr(pmts[1].assetId) != BId))
960975 then throw("Wrong payment asset B")
961976 else $Tuple2(pmts[0].amount, pmts[1].amount)
962977 else if ((size(pmts) == 1))
963978 then if ((assetIdToStr(pmts[0].assetId) == AId))
964979 then $Tuple2(pmts[0].amount, 0)
965980 else if ((assetIdToStr(pmts[0].assetId) == BId))
966981 then $Tuple2(0, pmts[0].amount)
967982 else throw("Wrong payment")
968983 else throw("One or two payments expected")
969984
970985
971986 func calcPriceImpact (balA,balB,newBalA,newBalB) = {
972987 let pri = ((SCALE8 - fraction(fraction(balB, SCALE8, balA), SCALE8, fraction(newBalB, SCALE8, newBalA))) * 100)
973988 if ((0 > pri))
974989 then (pri * -1)
975990 else pri
976991 }
977992
978993
979994 func claimAndCheckAmntEx (pool,pType,claim,amountToExchange,change) = {
980- let $t03118331470 = if (claim)
995+ let $t03166331950 = if (claim)
981996 then claimFarmed(pType, pool)
982997 else {
983998 let claimedAsset = if ((pType == SF_POOL))
984999 then SWOPID
9851000 else if ((pType == WX_POOL))
9861001 then WXID
9871002 else unknownPoolType()
9881003 $Tuple2(amountToExchange, claimedAsset)
9891004 }
990- let claimAmount = $t03118331470._1
991- let claimAsset = $t03118331470._2
1005+ let claimAmount = $t03166331950._1
1006+ let claimAsset = $t03166331950._2
9921007 let bal = accountBalance(claimAsset)
9931008 if (if ((amountToExchange > (claimAmount + change)))
9941009 then true
9951010 else (amountToExchange > bal))
9961011 then throw("To big amount to exchange")
9971012 else $Tuple2(claimAmount, claimAsset)
9981013 }
9991014
10001015
10011016 @Callable(i)
10021017 func getShareAssetPriceREADONLY (shareId) = {
10031018 let sharePrices = getSharePrice(shareId)
10041019 $Tuple2(nil, sharePrices)
10051020 }
10061021
10071022
10081023
10091024 @Callable(i)
10101025 func getUserPositionShareAmountREADONLY (user,posNum) = {
10111026 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position")
10121027 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount))
10131028 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0))
10141029 $Tuple2(nil, userCanWithdraw)
10151030 }
10161031
10171032
10181033
10191034 @Callable(i)
10201035 func getUserPositionREADONLY (user,pools,posNum) = {
10211036 func userPos (a,pool) = {
1022- let $t03243632480 = a
1023- let wAmountsA = $t03243632480._1
1024- let wAmountsB = $t03243632480._2
1025- let debts = $t03243632480._3
1026- let index = $t03243632480._4
1027- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1028- let $t03257232662 = getPoolData(Address(fromBase58String(pool)), pType)
1029- let AId = $t03257232662._1
1030- let BId = $t03257232662._2
1031- let balA = $t03257232662._3
1032- let balB = $t03257232662._4
1033- let shareId = $t03257232662._5
1034- let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
1037+ let $t03293833008 = a
1038+ let wAmountsA = $t03293833008._1
1039+ let wAmountsB = $t03293833008._2
1040+ let debts = $t03293833008._3
1041+ let eqWAmountsA = $t03293833008._4
1042+ let eqWAmountsB = $t03293833008._5
1043+ let index = $t03293833008._6
10351044 if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition)))))
1036- then $Tuple3((wAmountsA :+ 0), (wAmountsB :+ 0), (index + 1))
1045+ then $Tuple6((wAmountsA :+ 0), (wAmountsB :+ 0), (debts :+ 0), (eqWAmountsA :+ 0), (eqWAmountsB :+ 0), (index + 1))
10371046 else {
1047+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1048+ let $t03328733377 = getPoolData(Address(fromBase58String(pool)), pType)
1049+ let AId = $t03328733377._1
1050+ let BId = $t03328733377._2
1051+ let balA = $t03328733377._3
1052+ let balB = $t03328733377._4
1053+ let shareId = $t03328733377._5
1054+ let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10381055 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
1039- let $t03302333143 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw)
1040- let wAmountA = $t03302333143._1
1041- let wAmountB = $t03302333143._2
1056+ let $t03359333713 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw)
1057+ let wAmountA = $t03359333713._1
1058+ let wAmountB = $t03359333713._2
10421059 if ((borrowAmount > 0))
10431060 then {
10441061 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId))
10451062 let debt = {
10461063 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil)
10471064 if ($isInstanceOf(@, "Int"))
10481065 then @
10491066 else throw(($getType(@) + " couldn't be cast to Int"))
10501067 }
10511068 if ((debt == debt))
1052- then $Tuple4((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (index + 1))
1069+ then {
1070+ let $t03399734281 = if ((pType == SF_POOL))
1071+ then calcAmountToPaySF(pool, AId, BId, balA, balB, debt, borrowAsset)
1072+ else if ((pType == WX_POOL))
1073+ then calcAmountToPayWX(pool, AId, BId, balA, balB, debt, borrowAsset)
1074+ else unknownPoolType()
1075+ let assetToPay = $t03399734281._1
1076+ let amountToPay = $t03399734281._2
1077+ let $t03428834434 = if ((assetToPay == BId))
1078+ then $Tuple2((wAmountA - debt), (wAmountB - amountToPay))
1079+ else $Tuple2((wAmountA - amountToPay), (wAmountB - debt))
1080+ let eqWAmountA = $t03428834434._1
1081+ let eqWAmountB = $t03428834434._2
1082+ $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (eqWAmountsA :+ eqWAmountA), (eqWAmountsB :+ eqWAmountB), (index + 1))
1083+ }
10531084 else throw("Strict value is not equal to itself.")
10541085 }
1055- else $Tuple3((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1))
1086+ else $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), debts, (wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1))
10561087 }
10571088 }
10581089
1059- let $t03356033637 = {
1090+ let $t03468934800 = {
10601091 let $l = pools
10611092 let $s = size($l)
1062- let $acc0 = $Tuple4(nil, nil, nil, 0)
1093+ let $acc0 = $Tuple6(nil, nil, nil, nil, nil, 0)
10631094 func $f0_1 ($a,$i) = if (($i >= $s))
10641095 then $a
10651096 else userPos($a, $l[$i])
10661097
10671098 func $f0_2 ($a,$i) = if (($i >= $s))
10681099 then $a
10691100 else throw("List size exceeds 20")
10701101
10711102 $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)
10721103 }
1073- let wAmountsA = $t03356033637._1
1074- let wAmountsB = $t03356033637._2
1075- let debts = $t03356033637._3
1076- $Tuple2(nil, $Tuple3(wAmountsA, wAmountsB, debts))
1104+ let wAmountsA = $t03468934800._1
1105+ let wAmountsB = $t03468934800._2
1106+ let debts = $t03468934800._3
1107+ let eqWAmountsA = $t03468934800._4
1108+ let eqWAmountsB = $t03468934800._5
1109+ $Tuple2(nil, $Tuple5(wAmountsA, wAmountsB, debts, eqWAmountsA, eqWAmountsB))
10771110 }
10781111
10791112
10801113
10811114 @Callable(i)
1082-func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), if (if ((100 > leverage))
1083- then true
1084- else (leverage > 300))
1085- then throw("Leverage can't be <100 and >300")
1086- else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
1087- then (leverage > 100)
1088- else false)
1089- then throw("You can't borrow in this pool")
1090- else {
1091- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1092- let $t03412634216 = getPoolData(Address(fromBase58String(pool)), pType)
1093- let AId = $t03412634216._1
1094- let BId = $t03412634216._2
1095- let balA = $t03412634216._3
1096- let balB = $t03412634216._4
1097- let shareId = $t03412634216._5
1098- if (if ((borrowId != AId))
1099- then (borrowId != BId)
1115+func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), {
1116+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1117+ if (!(isPoolActive(pool, pType)))
1118+ then throw("Pool not active at this moment")
1119+ else if (if ((100 > leverage))
1120+ then true
1121+ else (leverage > 300))
1122+ then throw("Leverage can't be <100 and >300")
1123+ else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
1124+ then (leverage > 100)
11001125 else false)
1101- then throw("Wrong borrow asset")
1126+ then throw("You can't borrow in this pool")
11021127 else {
1103- let $t03429734356 = parseReplenishPmts(i.payments, AId, BId)
1104- let pmtA = $t03429734356._1
1105- let pmtB = $t03429734356._2
1106- let user = toString(i.caller)
1107- let newPosNum = getNewUserPositionNumber(user)
1108- if ((leverage > 100))
1109- then {
1110- let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
1111- let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1112- let newRequestId = {
1113- let @ = invoke(this, "createNewRequest", [request], nil)
1114- if ($isInstanceOf(@, "Int"))
1115- then @
1116- else throw(($getType(@) + " couldn't be cast to Int"))
1117- }
1118- if ((newRequestId == newRequestId))
1128+ let $t03539835488 = getPoolData(Address(fromBase58String(pool)), pType)
1129+ let AId = $t03539835488._1
1130+ let BId = $t03539835488._2
1131+ let balA = $t03539835488._3
1132+ let balB = $t03539835488._4
1133+ let shareId = $t03539835488._5
1134+ if (if ((borrowId != AId))
1135+ then (borrowId != BId)
1136+ else false)
1137+ then throw("Wrong borrow asset")
1138+ else {
1139+ let $t03556935628 = parseReplenishPmts(i.payments, AId, BId)
1140+ let pmtA = $t03556935628._1
1141+ let pmtB = $t03556935628._2
1142+ let user = toString(i.caller)
1143+ let newPosNum = getNewUserPositionNumber(user)
1144+ if ((leverage > 100))
11191145 then {
1120- let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1121- let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1122- if ((inv == inv))
1146+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
1147+ let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1148+ let newRequestId = {
1149+ let @ = invoke(this, "createNewRequest", [request], nil)
1150+ if ($isInstanceOf(@, "Int"))
1151+ then @
1152+ else throw(($getType(@) + " couldn't be cast to Int"))
1153+ }
1154+ if ((newRequestId == newRequestId))
11231155 then {
1124- let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1125- let $t03534535439 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1126- if (($t03534535439 == $t03534535439))
1156+ let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1157+ let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1158+ if ((inv == inv))
11271159 then {
1128- let newBalB = $t03534535439._2
1129- let newBalA = $t03534535439._1
1130- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1131- let $t03550935624 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1132- let wAmountA = $t03550935624._1
1133- let wAmountB = $t03550935624._2
1134- $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1160+ let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition))
1161+ let $t03661736711 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1162+ if (($t03661736711 == $t03661736711))
1163+ then {
1164+ let newBalB = $t03661736711._2
1165+ let newBalA = $t03661736711._1
1166+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1167+ let $t03678136896 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1168+ let wAmountA = $t03678136896._1
1169+ let wAmountB = $t03678136896._2
1170+ $Tuple2(nil, [prImpact, wAmountA, wAmountB])
1171+ }
1172+ else throw("Strict value is not equal to itself.")
11351173 }
11361174 else throw("Strict value is not equal to itself.")
11371175 }
11381176 else throw("Strict value is not equal to itself.")
11391177 }
1140- else throw("Strict value is not equal to itself.")
1141- }
1142- else {
1143- let $t03567735792 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1144- if (($t03567735792 == $t03567735792))
1145- then {
1146- let axlyFee = $t03567735792._2
1147- let userStaked = $t03567735792._1
1148- let $t03579835892 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1149- if (($t03579835892 == $t03579835892))
1178+ else {
1179+ let $t03694937064 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1180+ if (($t03694937064 == $t03694937064))
11501181 then {
1151- let newBalB = $t03579835892._2
1152- let newBalA = $t03579835892._1
1153- let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1154- let $t03596236077 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1155- let wAmountA = $t03596236077._1
1156- let wAmountB = $t03596236077._2
1157- $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1182+ let axlyFee = $t03694937064._2
1183+ let userStaked = $t03694937064._1
1184+ let $t03707037164 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId)
1185+ if (($t03707037164 == $t03707037164))
1186+ then {
1187+ let newBalB = $t03707037164._2
1188+ let newBalA = $t03707037164._1
1189+ let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB)
1190+ let $t03723437349 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1191+ let wAmountA = $t03723437349._1
1192+ let wAmountB = $t03723437349._2
1193+ $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB])
1194+ }
1195+ else throw("Strict value is not equal to itself.")
11581196 }
11591197 else throw("Strict value is not equal to itself.")
11601198 }
1161- else throw("Strict value is not equal to itself.")
11621199 }
11631200 }
1164- })
1201+ })
11651202
11661203
11671204
11681205 @Callable(i)
1169-func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), withdrawToUser(toString(i.caller), pool, toString(posId), false))
1206+func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), {
1207+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1208+ if (!(isPoolActive(pool, pType)))
1209+ then throw("Pool not active at this moment")
1210+ else withdrawToUser(toString(i.caller), pool, toString(posId), false)
1211+ })
11701212
11711213
11721214
11731215 @Callable(i)
11741216 func createUpdateStopLoss (posId,poolId,assetId,price) = valueOrElse(isActiveForUsers(), {
11751217 let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
1176- if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
1177- then throw("There are no user position")
1178- else if ((0 >= price))
1179- then throw("Price must be greater than 0")
1180- else if ((price > tokenOraclePrice))
1181- then throw("Price must be less than current token price")
1182- else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
1218+ let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited")
1219+ if (!(isPoolActive(poolId, pType)))
1220+ then throw("Pool not active at this moment")
1221+ else if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
1222+ then throw("There are no user position")
1223+ else if ((0 >= price))
1224+ then throw("Price must be greater than 0")
1225+ else if ((price > tokenOraclePrice))
1226+ then throw("Price must be less than current token price")
1227+ else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
11831228 })
11841229
11851230
11861231
11871232 @Callable(i)
1188-func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
1189- then throw("No entry")
1190- else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))])
1233+func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), {
1234+ let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited")
1235+ if (!(isPoolActive(poolId, pType)))
1236+ then throw("Pool not active at this moment")
1237+ else if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
1238+ then throw("No entry")
1239+ else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
1240+ })
11911241
11921242
11931243
11941244 @Callable(i)
1195-func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if ((toString(i.caller) != "3PG42y6FgT8zM3uX5tEDxJF5rqX8AKGJRAR"))
1196- then throw("Only admin can call this function")
1197- else if (isDefined(getString(kAdminCallPK)))
1198- then throw("Already inited")
1199- 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)]
1245+func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = valueOrElse(isSelfCall(i), if (isDefined(getString(kAdminCallPK)))
1246+ then throw("Already inited")
1247+ else if (!(isDefined(addressFromString(moneyBoxAddr))))
1248+ then throw("moneyBoxAddr is not correct address")
1249+ else if (!(isDefined(addressFromString(sfFarmingAddr))))
1250+ then throw("sfFarmingAddr is not correct address")
1251+ else if (!(isDefined(addressFromString(lendAddr))))
1252+ then throw("lendAddr is not correct address")
1253+ else if (!(isDefined(addressFromString(priceOracleAddr))))
1254+ then throw("priceOracleAddr is not correct address")
1255+ else if (!(isDefined(addressFromString(keeperExContract))))
1256+ then throw("keeperExContract is not correct address")
1257+ else if (!(isDefined(assetInfo(fromBase58String(swopAssetId)))))
1258+ then throw("swopAssetId is not correct asset id")
1259+ else if (!(isDefined(assetInfo(fromBase58String(wxAssetId)))))
1260+ then throw("swopAssetId is not correct asset id")
1261+ else if ((size(fromBase58String(adminPubKey)) != 32))
1262+ then throw("adminPubKey is not correct")
1263+ 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)])
12001264
12011265
12021266
12031267 @Callable(i)
12041268 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
12051269 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
12061270 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
12071271 })
12081272
12091273
12101274
12111275 @Callable(i)
12121276 func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), {
1213- let $t03884638950 = parseRequest(requestId)
1214- let user = $t03884638950._1
1215- let pool = $t03884638950._2
1216- let pmtA = $t03884638950._3
1217- let AId = $t03884638950._4
1218- let pmtB = $t03884638950._5
1219- let BId = $t03884638950._6
1220- let balA = $t03884638950._7
1221- let balB = $t03884638950._8
1222- let shareId = $t03884638950._9
1223- let bwAsset = $t03884638950._10
1224- let bwAmount = $t03884638950._11
1277+ let $t04139841502 = parseRequest(requestId)
1278+ let user = $t04139841502._1
1279+ let pool = $t04139841502._2
1280+ let pmtA = $t04139841502._3
1281+ let AId = $t04139841502._4
1282+ let pmtB = $t04139841502._5
1283+ let BId = $t04139841502._6
1284+ let balA = $t04139841502._7
1285+ let balB = $t04139841502._8
1286+ let shareId = $t04139841502._9
1287+ let bwAsset = $t04139841502._10
1288+ let bwAmount = $t04139841502._11
12251289 if ((size(i.payments) != 1))
12261290 then throw("Wrong payment size")
12271291 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
12281292 then true
12291293 else (i.payments[0].amount != bwAmount))
12301294 then throw("Wrong payment")
12311295 else {
1232- let $t03914039240 = if ((AId == bwAsset))
1296+ let $t04169241792 = if ((AId == bwAsset))
12331297 then $Tuple2((pmtA + bwAmount), pmtB)
12341298 else $Tuple2(pmtA, (pmtB + bwAmount))
1235- let pmtAllA = $t03914039240._1
1236- let pmtAllB = $t03914039240._2
1299+ let pmtAllA = $t04169241792._1
1300+ let pmtAllB = $t04169241792._2
12371301 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1238- let $t03932239437 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1239- let userStaked = $t03932239437._1
1240- let axlyFee = $t03932239437._2
1302+ let $t04187441989 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1303+ let userStaked = $t04187441989._1
1304+ let axlyFee = $t04187441989._2
12411305 let posNum = getNewUserPositionNumber(user)
12421306 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12431307 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
1244- let $t03979739912 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1245- let wAmountA = $t03979739912._1
1246- let wAmountB = $t03979739912._2
1308+ let $t04234942464 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked)
1309+ let wAmountA = $t04234942464._1
1310+ let wAmountB = $t04234942464._2
12471311 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
12481312 }
12491313 }))
12501314
12511315
12521316
12531317 @Callable(i)
12541318 func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), {
12551319 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12561320 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1257- let $t04043340523 = getPoolData(Address(fromBase58String(pool)), pType)
1258- let AId = $t04043340523._1
1259- let BId = $t04043340523._2
1260- let balA = $t04043340523._3
1261- let balB = $t04043340523._4
1262- let shareId = $t04043340523._5
1321+ let $t04298543075 = getPoolData(Address(fromBase58String(pool)), pType)
1322+ let AId = $t04298543075._1
1323+ let BId = $t04298543075._2
1324+ let balA = $t04298543075._3
1325+ let balB = $t04298543075._4
1326+ let shareId = $t04298543075._5
12631327 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12641328 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12651329 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12661330 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
12671331 if ((liquidateAmount > userCanWithdraw))
12681332 then throw("You can't liquidate more than user have")
12691333 else if ((borrowAmount == 0))
12701334 then throw("You can't liquidate position without borrow")
12711335 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))]
12721336 }))
12731337
12741338
12751339
12761340 @Callable(i)
12771341 func stopLoss (user,posId,pool,assetId) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
12781342 let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
1279- if ((tokenOraclePrice > tokenOraclePrice))
1343+ let stopLossPrice = valueOrErrorMessage(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)), "No entry")
1344+ if ((tokenOraclePrice > stopLossPrice))
12801345 then throw("Token price greater stop loss price")
1281- else if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
1282- then throw("No entry")
1283- else {
1284- let res = withdrawToUser(user, pool, toString(posId), true)
1285- $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2)
1286- }
1346+ else {
1347+ let res = withdrawToUser(user, pool, toString(posId), true)
1348+ $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2)
1349+ }
12871350 }))
12881351
12891352
12901353
12911354 @Callable(i)
12921355 func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
12931356 let pType = getStringValue(this, (kPool + pool))
12941357 let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)
1295- let $t04266142762 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1296- let claimedAmount = $t04266142762._1
1297- let claimedAsset = $t04266142762._2
1358+ let $t04521845319 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1359+ let claimedAmount = $t04521845319._1
1360+ let claimedAsset = $t04521845319._2
12981361 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12991362 let newChange = ((claimedAmount + change) - amountToExchange)
13001363 let changeEntry = if ((newChange >= 0))
13011364 then [IntegerEntry((pool + kPoolCapChange), newChange)]
13021365 else nil
13031366 (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry)
13041367 }))
13051368
13061369
13071370
13081371 @Callable(i)
13091372 func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
13101373 let pType = getStringValue(this, (kPool + pool))
13111374 let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)
1312- let $t04353743638 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1313- let claimedAmount = $t04353743638._1
1314- let claimedAsset = $t04353743638._2
1375+ let $t04609446195 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1376+ let claimedAmount = $t04609446195._1
1377+ let claimedAsset = $t04609446195._2
13151378 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
13161379 let newChange = ((claimedAmount + change) - amountToExchange)
13171380 let changeEntry = if ((newChange >= 0))
13181381 then [IntegerEntry((pool + kPoolCapChange), newChange)]
13191382 else nil
13201383 (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry)
13211384 }))
13221385
13231386
13241387
13251388 @Callable(i)
13261389 func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), {
13271390 let pType = getStringValue(this, (kPool + pool))
13281391 let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)
1329- let $t04448044581 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1330- let claimedAmount = $t04448044581._1
1331- let claimedAsset = $t04448044581._2
1392+ let $t04703747138 = claimAndCheckAmntEx(pool, pType, claim, amountToExchange, change)
1393+ let claimedAmount = $t04703747138._1
1394+ let claimedAsset = $t04703747138._2
13321395 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13331396 let newChange = ((claimedAmount + change) - amountToExchange)
13341397 let changeEntry = if ((newChange >= 0))
13351398 then [IntegerEntry((pool + kPoolCapChange), newChange)]
13361399 else nil
13371400 (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry)
13381401 }))
13391402
13401403
13411404
13421405 @Callable(i)
13431406 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
13441407 then (type != WX_POOL)
13451408 else false)
13461409 then throw("Wrong type")
13471410 else {
1348- let $t04531245406 = getPoolData(Address(fromBase58String(poolAddr)), type)
1349- let aId = $t04531245406._1
1350- let bId = $t04531245406._2
1351- let aBal = $t04531245406._3
1352- let bBal = $t04531245406._4
1353- let shareId = $t04531245406._5
1411+ let $t04786947963 = getPoolData(Address(fromBase58String(poolAddr)), type)
1412+ let aId = $t04786947963._1
1413+ let bId = $t04786947963._2
1414+ let aBal = $t04786947963._3
1415+ let bBal = $t04786947963._4
1416+ let shareId = $t04786947963._5
13541417 if ((0 > inFeeNoLoan))
13551418 then throw("inFeeNoLoan must be greater than 0")
13561419 else if ((0 > inFeeLoan))
13571420 then throw("inFeeLoan must be greater than 0")
13581421 else if ((0 > capFeeNoLoan))
13591422 then throw("capFeeNoLoan must be greater than 0")
13601423 else if ((0 > capFeeWithLoan))
13611424 then throw("capFeeWithLoan must be greater than 0")
13621425 else if ((0 > stoplossFeeNoLoan))
13631426 then throw("stoplossFeeNoLoan must be greater than 0")
13641427 else if ((0 > stoplossFeeWithLoan))
13651428 then throw("stoplossFeeWithLoan must be greater than 0")
13661429 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)]
13671430 }))
13681431
13691432
13701433
13711434 @Callable(i)
13721435 func activate () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActive), true))
13731436 then throw("dApp already active")
13741437 else [BooleanEntry(kActive, true)])
13751438
13761439
13771440
13781441 @Callable(i)
13791442 func shutdown () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActive), true)))
13801443 then throw("dApp already shutdown")
13811444 else [BooleanEntry(kActive, false)])
13821445
13831446
13841447
13851448 @Callable(i)
13861449 func activateForUsers () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActiveUsers), true))
13871450 then throw("dApp already active for users")
13881451 else [BooleanEntry(kActiveUsers, true)])
13891452
13901453
13911454
13921455 @Callable(i)
13931456 func shutdownForUsers () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActiveUsers), true)))
13941457 then throw("dApp already shutdown for users")
13951458 else [BooleanEntry(kActiveUsers, false)])
13961459
13971460
13981461
13991462 @Callable(i)
14001463 func activateSF () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true))
14011464 then throw("SWOPFI already active")
14021465 else [BooleanEntry((SF_POOL + kActiveSFWX), true)])
14031466
14041467
14051468
14061469 @Callable(i)
14071470 func shutdownSF () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true)))
14081471 then throw("SWOPFI already shutdown")
14091472 else [BooleanEntry((SF_POOL + kActiveSFWX), false)])
14101473
14111474
14121475
14131476 @Callable(i)
14141477 func activateWX () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true))
14151478 then throw("WX already active")
14161479 else [BooleanEntry((WX_POOL + kActiveSFWX), true)])
14171480
14181481
14191482
14201483 @Callable(i)
14211484 func shutdownWX () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true)))
14221485 then throw("WX already shutdown")
14231486 else [BooleanEntry((WX_POOL + kActiveSFWX), false)])
14241487
14251488
14261489
14271490 @Callable(i)
14281491 func activatePool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool)))))
14291492 then throw("Unknown pool")
14301493 else if (valueOrElse(getBoolean(this, (pool + kPoolActive)), true))
14311494 then throw("Pool already active")
14321495 else [BooleanEntry((pool + kPoolActive), true)])
14331496
14341497
14351498
14361499 @Callable(i)
14371500 func shutdownPool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool)))))
14381501 then throw("Unknown pool")
14391502 else if (!(valueOrElse(getBoolean(this, (pool + kPoolActive)), true)))
14401503 then throw("Pool already shutdown")
14411504 else [BooleanEntry((pool + kPoolActive), false)])
14421505
14431506
14441507 @Verifier(tx)
14451508 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
14461509

github/deemru/w8io/026f985 
202.59 ms