tx · DHfqMMfuipcaVH1h63yUiaGeYRdAvvHbpDjPEV8xTtF3

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.43000000 Waves

2023.06.28 12:15 [2642315] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "DHfqMMfuipcaVH1h63yUiaGeYRdAvvHbpDjPEV8xTtF3", "fee": 43000000, "feeAssetId": null, "timestamp": 1687943812815, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "3uMkhZSRoogTmvncDnZLDukANCao6cGBqhXapANUDAwEr1mZRckRQM5GRtVNumADEgYDPcm4tb7tuk5Sd7NrjCYw" ], "script": "base64:BgKXAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg4KDAgICAEEERgYEQEBGBIKCggICAgBBAgBGBIOCgwICAgBBBgYGBgYARgSCgoICAgBAQEBAQFoAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUAB1NDQUxFMTYJALYCAQCAgIT+pt7hEQAKRkVFX1NDQUxFNgDAhD0AFGtTRlBvb2xBQXNzZXRCYWxhbmNlAg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7Gzy6f7nPeWba4tn28dRUWwEmLX84cp Diff:
OldNewDifferences
101101
102102 let kWxSwapContract = "wx_swap_contract"
103103
104+let kSwopId = "swop_id"
105+
106+let kWxId = "wx_id"
107+
104108 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
105109
106110 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
109113
110114 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
111115
112-let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
116+let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id"))
113117
114-let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
118+let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id"))
115119
116120 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
117121
300304 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
301305 let poolAddr = Address(fromBase58String(pool))
302306 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
303- let $t088698934 = getPoolData(poolAddr, pType)
304- let aId = $t088698934._1
305- let bId = $t088698934._2
306- let aBalance = $t088698934._3
307- let bBalance = $t088698934._4
307+ let $t089178982 = getPoolData(poolAddr, pType)
308+ let aId = $t089178982._1
309+ let bId = $t089178982._2
310+ let aBalance = $t089178982._3
311+ let bBalance = $t089178982._4
308312 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
309313 if ($isInstanceOf(@, "(Int, Int)"))
310314 then @
381385 else throw("Strict value is not equal to itself.")
382386 }
383387 else {
384- let $t01046410714 = $Tuple2(split({
388+ let $t01051210762 = $Tuple2(split({
385389 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
386390 if ($isInstanceOf(@, "String"))
387391 then @
392396 then @
393397 else throw(($getType(@) + " couldn't be cast to String"))
394398 }, "__"))
395- if (($t01046410714 == $t01046410714))
399+ if (($t01051210762 == $t01051210762))
396400 then {
397- let evalPutInB = $t01046410714._2
398- let evalPutInA = $t01046410714._1
401+ let evalPutInB = $t01051210762._2
402+ let evalPutInA = $t01051210762._1
399403 let lpInA = parseIntValue(evalPutInA[1])
400404 let lpInB = parseIntValue(evalPutInB[1])
401405 if ((lpInB > lpInA))
437441
438442
439443 func unstakeLP (pool,pType,shareId,amount) = {
440- let $t01219912556 = if ((pType == SF_POOL))
444+ let $t01224712604 = if ((pType == SF_POOL))
441445 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
442446 else if ((pType == WX_POOL))
443447 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
444448 else throw("Wrong pool type")
445- let farmAddr = $t01219912556._1
446- let fName = $t01219912556._2
447- let params = $t01219912556._3
449+ let farmAddr = $t01224712604._1
450+ let fName = $t01224712604._2
451+ let params = $t01224712604._3
448452 let inv = invoke(farmAddr, fName, params, nil)
449453 if ((inv == inv))
450454 then amount
457461 let feeScale6 = 1000000
458462 let fee = getIntegerValue(poolAddr, kSFPoolFee)
459463 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
460- let $t01296913257 = if ((assetTokenToGet == assetIdA))
464+ let $t01301713305 = if ((assetTokenToGet == assetIdA))
461465 then {
462466 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee))
463467 $Tuple2(amountToPay, assetIdB)
466470 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee))
467471 $Tuple2(amountToPay, assetIdA)
468472 }
469- let amountToPay = $t01296913257._1
470- let assetToPay = $t01296913257._2
473+ let amountToPay = $t01301713305._1
474+ let assetToPay = $t01301713305._2
471475 $Tuple2(assetToPay, amountToPay)
472476 }
473477
476480 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
477481 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
478482 let feeScale = toBigInt(100000000)
479- let $t01359613904 = if ((assetTokenToGet == assetIdA))
483+ let $t01364413952 = if ((assetTokenToGet == assetIdA))
480484 then {
481485 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
482486 $Tuple2(amountToPay, assetIdB)
485489 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
486490 $Tuple2(amountToPay, assetIdA)
487491 }
488- let amountToPay = $t01359613904._1
489- let assetToPay = $t01359613904._2
492+ let amountToPay = $t01364413952._1
493+ let assetToPay = $t01364413952._2
490494 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
491495 $Tuple2(assetToPay, fraction(amountToPayWithFee, 102, 100))
492496 }
494498
495499 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
496500 then {
497- let $t01426714389 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
498- let assetToPay = $t01426714389._1
499- let amountToPay = $t01426714389._2
501+ let $t01431514437 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
502+ let assetToPay = $t01431514437._1
503+ let amountToPay = $t01431514437._2
500504 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
501505 }
502506 else {
503- let $t01456414686 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
504- let assetToPay = $t01456414686._1
505- let amountToPay = $t01456414686._2
507+ let $t01461214734 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
508+ let assetToPay = $t01461214734._1
509+ let amountToPay = $t01461214734._2
506510 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
507511 }
508512
533537 }
534538 else if ((pType == WX_POOL))
535539 then {
536- let $t01528915630 = if (if ((pmtA > 0))
540+ let $t01533715678 = if (if ((pmtA > 0))
537541 then (pmtB > 0)
538542 else false)
539543 then {
540- let $t01537015496 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
541- let pmtInA = $t01537015496._1
542- let pmtInB = $t01537015496._2
543- let change = $t01537015496._3
544- let changeId = $t01537015496._4
545- let lpAmount = $t01537015496._5
544+ let $t01541815544 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
545+ let pmtInA = $t01541815544._1
546+ let pmtInB = $t01541815544._2
547+ let change = $t01541815544._3
548+ let changeId = $t01541815544._4
549+ let lpAmount = $t01541815544._5
546550 $Tuple3(change, changeId, lpAmount)
547551 }
548552 else if ((pmtA > 0))
549553 then $Tuple3(pmtA, aId, 0)
550554 else $Tuple3(pmtB, bId, 0)
551- let change = $t01528915630._1
552- let changeId = $t01528915630._2
553- let lpTwo = $t01528915630._3
554- let $t01563715853 = if ((change > 0))
555+ let change = $t01533715678._1
556+ let changeId = $t01533715678._2
557+ let lpTwo = $t01533715678._3
558+ let $t01568515901 = if ((change > 0))
555559 then {
556560 let inv = {
557561 let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil)
564568 else throw("Strict value is not equal to itself.")
565569 }
566570 else $Tuple2(0, 0)
567- let lpOne = $t01563715853._1
568- let loss = $t01563715853._2
571+ let lpOne = $t01568515901._1
572+ let loss = $t01568515901._2
569573 $Tuple2((lpTwo + lpOne), loss)
570574 }
571575 else throw("Wrong pool type")
574578
575579 func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = {
576580 let poolAddr = addressFromStringValue(pool)
577- let $t01614716647 = if ((pType == SF_POOL))
581+ let $t01619516695 = if ((pType == SF_POOL))
578582 then {
579583 let inv = {
580584 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil)
609613 else throw("Strict value is not equal to itself.")
610614 }
611615 else throw("Wrong pool type")
612- let getAmountA = $t01614716647._1
613- let getAmountB = $t01614716647._2
616+ let getAmountA = $t01619516695._1
617+ let getAmountB = $t01619516695._2
614618 if ((borrowAmount > 0))
615619 then {
616620 let amountToGetEx = if (if ((borrowAssetId == aId))
622626 else false)
623627 then (borrowAmount - getAmountB)
624628 else 0
625- let $t01692517228 = if ((amountToGetEx > 0))
629+ let $t01697317276 = if ((amountToGetEx > 0))
626630 then if ((pType == SF_POOL))
627631 then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
628632 else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
629633 else $Tuple2("", 0)
630- let assetToPay = $t01692517228._1
631- let amountToPay = $t01692517228._2
634+ let assetToPay = $t01697317276._1
635+ let amountToPay = $t01697317276._2
632636 if ((borrowAssetId == aId))
633637 then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay))
634638 else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount))
675679 if ((lpBalanceBefore == lpBalanceBefore))
676680 then {
677681 let poolAddr = addressFromStringValue(pool)
678- let $t01842518841 = if (if ((pmtA > 0))
682+ let $t01847318889 = if (if ((pmtA > 0))
679683 then (pmtB > 0)
680684 else false)
681685 then {
682- let $t01849118607 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
683- let pmtInA = $t01849118607._1
684- let pmtInB = $t01849118607._2
685- let change = $t01849118607._3
686- let changeId = $t01849118607._4
686+ let $t01853918655 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
687+ let pmtInA = $t01853918655._1
688+ let pmtInB = $t01853918655._2
689+ let change = $t01853918655._3
690+ let changeId = $t01853918655._4
687691 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
688692 if ((inv == inv))
689693 then $Tuple2(change, changeId)
694698 else if ((pmtB > 0))
695699 then $Tuple2(pmtB, bId)
696700 else throw("pmts must be > 0")
697- let change = $t01842518841._1
698- let changeId = $t01842518841._2
701+ let change = $t01847318889._1
702+ let changeId = $t01847318889._2
699703 let inv = if ((change > 0))
700704 then replenishOneTokenByType(poolAddr, pType, change, changeId)
701705 else nil
723727 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
724728 let totalAmount = getPoolTotalShare(pool)
725729 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
726- let $t01969919937 = if (withLoan)
730+ let $t01974719985 = if (withLoan)
727731 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
728732 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
729- let curPoolInterest = $t01969919937._1
730- let totalStakedWithLoan = $t01969919937._2
733+ let curPoolInterest = $t01974719985._1
734+ let totalStakedWithLoan = $t01974719985._2
731735 [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))]
732736 }
733737
773777
774778 func capitalize (pool,pType,tokenId,tokenAmount) = {
775779 let poolAddr = Address(fromBase58String(pool))
776- let $t02228822354 = getPoolData(poolAddr, pType)
777- let AId = $t02228822354._1
778- let BId = $t02228822354._2
779- let balA = $t02228822354._3
780- let balB = $t02228822354._4
781- let shareId = $t02228822354._5
780+ let $t02233622402 = getPoolData(poolAddr, pType)
781+ let AId = $t02233622402._1
782+ let BId = $t02233622402._2
783+ let balA = $t02233622402._3
784+ let balB = $t02233622402._4
785+ let shareId = $t02233622402._5
782786 if (if ((tokenId != AId))
783787 then (tokenId != BId)
784788 else false)
785789 then throw("Wrong asset")
786790 else {
787- let $t02243922519 = if ((tokenId == AId))
791+ let $t02248722567 = if ((tokenId == AId))
788792 then $Tuple2(tokenAmount, 0)
789793 else $Tuple2(0, tokenAmount)
790- let pmtA = $t02243922519._1
791- let pmtB = $t02243922519._2
792- let $t02252222626 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
793- let stakedAmount = $t02252222626._1
794- let nf = $t02252222626._2
794+ let pmtA = $t02248722567._1
795+ let pmtB = $t02248722567._2
796+ let $t02257022674 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
797+ let stakedAmount = $t02257022674._1
798+ let nf = $t02257022674._2
795799 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
796800 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
797801 let totalShareAmount = getPoolTotalShare(pool)
818822 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
819823 let poolAddr = Address(fromBase58String(pool))
820824 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
821- let $t02439424470 = getPoolData(poolAddr, pType)
822- let assetIdA = $t02439424470._1
823- let assetIdB = $t02439424470._2
824- let balA = $t02439424470._3
825- let balB = $t02439424470._4
826- let shareId = $t02439424470._5
825+ let $t02444224518 = getPoolData(poolAddr, pType)
826+ let assetIdA = $t02444224518._1
827+ let assetIdB = $t02444224518._2
828+ let balA = $t02444224518._3
829+ let balB = $t02444224518._4
830+ let shareId = $t02444224518._5
827831 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
828832 if ((cBalABefore == cBalABefore))
829833 then {
842846 then {
843847 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
844848 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
845- let $t02503325122 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
846- let tokensAmountA = $t02503325122._1
847- let tokensAmountB = $t02503325122._2
848- let $t02512525945 = if ((debt > 0))
849+ let $t02508125170 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
850+ let tokensAmountA = $t02508125170._1
851+ let tokensAmountB = $t02508125170._2
852+ let $t02517325993 = if ((debt > 0))
849853 then {
850854 let amountToGetEx = if (if ((borrowAsset == assetIdA))
851855 then (debt > tokensAmountA)
870874 else throw("Strict value is not equal to itself.")
871875 }
872876 else $Tuple2(tokensAmountA, tokensAmountB)
873- let toUserA = $t02512525945._1
874- let toUserB = $t02512525945._2
877+ let toUserA = $t02517325993._1
878+ let toUserB = $t02517325993._2
875879 $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
876880 }
877881 else throw("Strict value is not equal to itself.")
907911 else throw(($getType(@) + " couldn't be cast to Int"))
908912 }
909913 else 0
910- let $t02733327486 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
911- if (($t02733327486 == $t02733327486))
914+ let $t02738127534 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
915+ if (($t02738127534 == $t02738127534))
912916 then {
913- let shareId = $t02733327486._7
914- let cBalBAfter = $t02733327486._6
915- let cBalAAfter = $t02733327486._5
916- let assetIdB = $t02733327486._4
917- let toUserAmountB = $t02733327486._3
918- let assetIdA = $t02733327486._2
919- let toUserAmountA = $t02733327486._1
917+ let shareId = $t02738127534._7
918+ let cBalBAfter = $t02738127534._6
919+ let cBalAAfter = $t02738127534._5
920+ let assetIdB = $t02738127534._4
921+ let toUserAmountB = $t02738127534._3
922+ let assetIdA = $t02738127534._2
923+ let toUserAmountA = $t02738127534._1
920924 let closeDbtInv = if ((debt > 0))
921925 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
922926 else 0
957961 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
958962 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
959963 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
960- let $t02917229269 = if ((borrowId == aId))
964+ let $t02922029317 = if ((borrowId == aId))
961965 then $Tuple2(dPriceA, decPrA)
962966 else $Tuple2(dPriceB, decPrB)
963- let borrowPrice = $t02917229269._1
964- let borrowDecPr = $t02917229269._2
967+ let borrowPrice = $t02922029317._1
968+ let borrowDecPr = $t02922029317._2
965969 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
966970 }
967971
973977 then throw("Leverage can't be <100 and >300")
974978 else {
975979 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
976- let $t02968729777 = getPoolData(Address(fromBase58String(pool)), pType)
977- let AId = $t02968729777._1
978- let BId = $t02968729777._2
979- let balA = $t02968729777._3
980- let balB = $t02968729777._4
981- let shareId = $t02968729777._5
980+ let $t02973529825 = getPoolData(Address(fromBase58String(pool)), pType)
981+ let AId = $t02973529825._1
982+ let BId = $t02973529825._2
983+ let balA = $t02973529825._3
984+ let balB = $t02973529825._4
985+ let shareId = $t02973529825._5
982986 let borrowAmount = if ((leverage > 100))
983987 then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
984988 else 0
985- let $t02991230019 = if ((borrowId == AId))
989+ let $t02996030067 = if ((borrowId == AId))
986990 then $Tuple2((pmtA + borrowAmount), pmtB)
987991 else $Tuple2(pmtA, (pmtB + borrowAmount))
988- let payInA = $t02991230019._1
989- let payInB = $t02991230019._2
990- let $t03002230115 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
991- let lpAmount = $t03002230115._1
992- let loss = $t03002230115._2
992+ let payInA = $t02996030067._1
993+ let payInB = $t02996030067._2
994+ let $t03007030163 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
995+ let lpAmount = $t03007030163._1
996+ let loss = $t03007030163._2
993997 let impactMod = if ((0 > loss))
994998 then (loss * -1)
995999 else loss
10191023 @Callable(i)
10201024 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
10211025 func userPos (a,pool) = {
1022- let $t03092830962 = a
1023- let totalPos = $t03092830962._1
1024- let posDebt = $t03092830962._2
1025- let index = $t03092830962._3
1026+ let $t03097631010 = a
1027+ let totalPos = $t03097631010._1
1028+ let posDebt = $t03097631010._2
1029+ let index = $t03097631010._3
10261030 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1027- let $t03105431144 = getPoolData(Address(fromBase58String(pool)), pType)
1028- let AId = $t03105431144._1
1029- let BId = $t03105431144._2
1030- let balA = $t03105431144._3
1031- let balB = $t03105431144._4
1032- let shareId = $t03105431144._5
1031+ let $t03110231192 = getPoolData(Address(fromBase58String(pool)), pType)
1032+ let AId = $t03110231192._1
1033+ let BId = $t03110231192._2
1034+ let balA = $t03110231192._3
1035+ let balB = $t03110231192._4
1036+ let shareId = $t03110231192._5
10331037 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10341038 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
10351039 let sharePrices = getSharePrice(shareId)
10551059 }
10561060 }
10571061
1058- let $t03218732242 = {
1062+ let $t03223532290 = {
10591063 let $l = pools
10601064 let $s = size($l)
10611065 let $acc0 = $Tuple3(nil, nil, 0)
10691073
10701074 $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)
10711075 }
1072- let pos = $t03218732242._1
1073- let debt = $t03218732242._2
1076+ let pos = $t03223532290._1
1077+ let debt = $t03223532290._2
10741078 $Tuple2(nil, $Tuple2(pos, debt))
10751079 }
10761080
10831087 then throw("Leverage can't be <100 and >300")
10841088 else {
10851089 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1086- let $t03256532655 = getPoolData(Address(fromBase58String(pool)), pType)
1087- let AId = $t03256532655._1
1088- let BId = $t03256532655._2
1089- let balA = $t03256532655._3
1090- let balB = $t03256532655._4
1091- let shareId = $t03256532655._5
1092- let $t03265833295 = if ((size(i.payments) == 2))
1090+ let $t03261332703 = getPoolData(Address(fromBase58String(pool)), pType)
1091+ let AId = $t03261332703._1
1092+ let BId = $t03261332703._2
1093+ let balA = $t03261332703._3
1094+ let balB = $t03261332703._4
1095+ let shareId = $t03261332703._5
1096+ let $t03270633343 = if ((size(i.payments) == 2))
10931097 then if ((assetIdToStr(i.payments[0].assetId) != AId))
10941098 then throw("Wrong payment asset A")
10951099 else if ((assetIdToStr(i.payments[1].assetId) != BId))
11021106 then $Tuple4(0, AId, i.payments[0].amount, BId)
11031107 else throw("Wrong payment")
11041108 else throw("One or two payments expected")
1105- let pmtA = $t03265833295._1
1106- let pmtAssetA = $t03265833295._2
1107- let pmtB = $t03265833295._3
1108- let pmtAssetB = $t03265833295._4
1109+ let pmtA = $t03270633343._1
1110+ let pmtAssetA = $t03270633343._2
1111+ let pmtB = $t03270633343._3
1112+ let pmtAssetB = $t03270633343._4
11091113 let newPosNum = getNewUserPositionNumber(toString(i.caller))
11101114 if ((leverage > 100))
11111115 then {
11281132 else throw("Strict value is not equal to itself.")
11291133 }
11301134 else {
1131- let $t03422334335 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1132- let userStaked = $t03422334335._1
1133- let axlyFee = $t03422334335._2
1135+ let $t03427134383 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1136+ let userStaked = $t03427134383._1
1137+ let axlyFee = $t03427134383._2
11341138 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
11351139 }
11361140 }
11671171
11681172
11691173 @Callable(i)
1174+func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox)))
1175+ then throw("Already inited")
1176+ 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)]
1177+
1178+
1179+
1180+@Callable(i)
11701181 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
11711182 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
11721183 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
11761187
11771188 @Callable(i)
11781189 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
1179- let $t03608836192 = parseRequest(requestId)
1180- let user = $t03608836192._1
1181- let pool = $t03608836192._2
1182- let pmtA = $t03608836192._3
1183- let AId = $t03608836192._4
1184- let pmtB = $t03608836192._5
1185- let BId = $t03608836192._6
1186- let balA = $t03608836192._7
1187- let balB = $t03608836192._8
1188- let shareId = $t03608836192._9
1189- let bwAsset = $t03608836192._10
1190- let bwAmount = $t03608836192._11
1190+ let $t03686336967 = parseRequest(requestId)
1191+ let user = $t03686336967._1
1192+ let pool = $t03686336967._2
1193+ let pmtA = $t03686336967._3
1194+ let AId = $t03686336967._4
1195+ let pmtB = $t03686336967._5
1196+ let BId = $t03686336967._6
1197+ let balA = $t03686336967._7
1198+ let balB = $t03686336967._8
1199+ let shareId = $t03686336967._9
1200+ let bwAsset = $t03686336967._10
1201+ let bwAmount = $t03686336967._11
11911202 if ((size(i.payments) != 1))
11921203 then throw("Wrong payment size")
11931204 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
11951206 else (i.payments[0].amount != bwAmount))
11961207 then throw("Wrong payment")
11971208 else {
1198- let $t03638236506 = if ((AId == bwAsset))
1209+ let $t03715737281 = if ((AId == bwAsset))
11991210 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
12001211 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1201- let pmtAllA = $t03638236506._1
1202- let pmtAllB = $t03638236506._2
1212+ let pmtAllA = $t03715737281._1
1213+ let pmtAllB = $t03715737281._2
12031214 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1204- let $t03658836703 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1205- let userStaked = $t03658836703._1
1206- let axlyFee = $t03658836703._2
1215+ let $t03736337478 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1216+ let userStaked = $t03736337478._1
1217+ let axlyFee = $t03736337478._2
12071218 let posNum = getNewUserPositionNumber(user)
12081219 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12091220 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
12171228 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
12181229 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12191230 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1220- let $t03748237572 = getPoolData(Address(fromBase58String(pool)), pType)
1221- let AId = $t03748237572._1
1222- let BId = $t03748237572._2
1223- let balA = $t03748237572._3
1224- let balB = $t03748237572._4
1225- let shareId = $t03748237572._5
1231+ let $t03825738347 = getPoolData(Address(fromBase58String(pool)), pType)
1232+ let AId = $t03825738347._1
1233+ let BId = $t03825738347._2
1234+ let balA = $t03825738347._3
1235+ let balB = $t03825738347._4
1236+ let shareId = $t03825738347._5
12261237 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12271238 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12281239 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12491260
12501261 @Callable(i)
12511262 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
1252- let $t03935839552 = if (claim)
1263+ let $t04013340327 = if (claim)
12531264 then claimFarmed(type, pool)
12541265 else {
12551266 let claimedAsset = if ((type == SF_POOL))
12571268 else WXID
12581269 $Tuple2(amountToExchange, claimedAsset)
12591270 }
1260- let claimedAmount = $t03935839552._1
1261- let claimedAsset = $t03935839552._2
1271+ let claimedAmount = $t04013340327._1
1272+ let claimedAsset = $t04013340327._2
12621273 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12631274 let change = (claimedAmount - amountToExchange)
12641275 let changeEntry = if ((change > 0))
12711282
12721283 @Callable(i)
12731284 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
1274- let $t04023740431 = if (claim)
1285+ let $t04101241206 = if (claim)
12751286 then claimFarmed(type, pool)
12761287 else {
12771288 let claimedAsset = if ((type == SF_POOL))
12791290 else WXID
12801291 $Tuple2(amountToExchange, claimedAsset)
12811292 }
1282- let claimedAmount = $t04023740431._1
1283- let claimedAsset = $t04023740431._2
1293+ let claimedAmount = $t04101241206._1
1294+ let claimedAsset = $t04101241206._2
12841295 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
12851296 let change = (claimedAmount - amountToExchange)
12861297 let changeEntry = if ((change > 0))
12931304
12941305 @Callable(i)
12951306 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
1296- let $t04118241376 = if (claim)
1307+ let $t04195742151 = if (claim)
12971308 then claimFarmed(type, pool)
12981309 else {
12991310 let claimedAsset = if ((type == SF_POOL))
13011312 else WXID
13021313 $Tuple2(amountToExchange, claimedAsset)
13031314 }
1304- let claimedAmount = $t04118241376._1
1305- let claimedAsset = $t04118241376._2
1315+ let claimedAmount = $t04195742151._1
1316+ let claimedAsset = $t04195742151._2
13061317 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13071318 let change = (claimedAmount - amountToExchange)
13081319 let changeEntry = if ((change > 0))
13191330 else false)
13201331 then throw("Wrong type")
13211332 else {
1322- let $t04209742191 = getPoolData(Address(fromBase58String(poolAddr)), type)
1323- let aId = $t04209742191._1
1324- let bId = $t04209742191._2
1325- let aBal = $t04209742191._3
1326- let bBal = $t04209742191._4
1327- let shareId = $t04209742191._5
1333+ let $t04287242966 = getPoolData(Address(fromBase58String(poolAddr)), type)
1334+ let aId = $t04287242966._1
1335+ let bId = $t04287242966._2
1336+ let aBal = $t04287242966._3
1337+ let bBal = $t04287242966._4
1338+ let shareId = $t04287242966._5
13281339 [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)]
13291340 })
13301341
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 = "_user_position"
4545
4646 let kUserPositionPool = "_user_position_pool"
4747
4848 let kUserBorrowAmount = "_user_position_borrow_amount"
4949
5050 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
5151
5252 let kUserPositionNum = "_user_position_number"
5353
5454 let kUserPositionInterest = "_user_position_interest"
5555
5656 let kPoolTotal = "_pool_total"
5757
5858 let kPoolTotalLoan = "_pool_total_loan"
5959
6060 let kPoolInterestLoan = "_pool_interest_loan"
6161
6262 let kPoolInterestNoLoan = "_pool_interest_no_loan"
6363
6464 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
6565
6666 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
6767
6868 let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
6969
7070 let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
7171
7272 let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan"
7373
7474 let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan"
7575
7676 let kRequestId = "_request_id"
7777
7878 let kRequestIter = "requests_iter"
7979
8080 let kPool = "pool_"
8181
8282 let kSharePool = "_pool_share_id"
8383
8484 let kPoolCapChange = "_pool_cap_change"
8585
8686 let kTokenLastPrice = "last_price"
8787
8888 let kUserStopLoss = "_stop_loss"
8989
9090 let kMoneyBox = "axly_money_box"
9191
9292 let kSFFarmingAddr = "swopfi_farming_addr"
9393
9494 let kLendService = "lend_service_addr"
9595
9696 let kAdminCallPK = "admin_call_pub_key"
9797
9898 let kPriceOracle = "price_oracle"
9999
100100 let kExContract = "exchange_contract"
101101
102102 let kWxSwapContract = "wx_swap_contract"
103103
104+let kSwopId = "swop_id"
105+
106+let kWxId = "wx_id"
107+
104108 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
105109
106110 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
107111
108112 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
109113
110114 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
111115
112-let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
116+let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id"))
113117
114-let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
118+let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id"))
115119
116120 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
117121
118122
119123 func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr")))
120124
121125
122126 func isAdminCall (i) = if ((i.caller == getAdminCallAddr()))
123127 then unit
124128 else throw("Only admin can call this function")
125129
126130
127131 func isSelfCall (i) = if ((i.caller == this))
128132 then unit
129133 else throw("Only contract itself can call this function")
130134
131135
132136 func isLandCall (i) = if ((i.caller == getLendSrvAddr()))
133137 then unit
134138 else throw("Only land contract can call this function")
135139
136140
137141 func accountBalance (assetId) = match assetId {
138142 case id: ByteVector =>
139143 assetBalance(this, id)
140144 case waves: Unit =>
141145 wavesBalance(this).available
142146 case _ =>
143147 throw("Match error")
144148 }
145149
146150
147151 func getSFPoolData (poolAddr) = $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance"), valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id"))
148152
149153
150154 func getWXPoolData (poolAddr) = {
151155 let cfg = {
152156 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
153157 if ($isInstanceOf(@, "List[Any]"))
154158 then @
155159 else throw(($getType(@) + " couldn't be cast to List[Any]"))
156160 }
157161 if ((cfg == cfg))
158162 then {
159163 let aId = valueOrErrorMessage({
160164 let @ = cfg[4]
161165 if ($isInstanceOf(@, "String"))
162166 then @
163167 else unit
164168 }, "Can't get pool A asset id")
165169 let bId = valueOrErrorMessage({
166170 let @ = cfg[5]
167171 if ($isInstanceOf(@, "String"))
168172 then @
169173 else unit
170174 }, "Can't get pool B asset id")
171175 let shareId = valueOrErrorMessage({
172176 let @ = cfg[3]
173177 if ($isInstanceOf(@, "String"))
174178 then @
175179 else unit
176180 }, "Can't get pool LP asset id")
177181 let balA = {
178182 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
179183 if ($isInstanceOf(@, "Int"))
180184 then @
181185 else throw(($getType(@) + " couldn't be cast to Int"))
182186 }
183187 if ((balA == balA))
184188 then {
185189 let balB = {
186190 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
187191 if ($isInstanceOf(@, "Int"))
188192 then @
189193 else throw(($getType(@) + " couldn't be cast to Int"))
190194 }
191195 if ((balB == balB))
192196 then $Tuple5(aId, bId, balA, balB, shareId)
193197 else throw("Strict value is not equal to itself.")
194198 }
195199 else throw("Strict value is not equal to itself.")
196200 }
197201 else throw("Strict value is not equal to itself.")
198202 }
199203
200204
201205 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
202206 then getSFPoolData(poolAddr)
203207 else if ((type == WX_POOL))
204208 then getWXPoolData(poolAddr)
205209 else throw("Wrong pool type")
206210
207211
208212 func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
209213 then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
210214 else if ((type == WX_POOL))
211215 then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
212216 else throw("Wrong pool type")
213217
214218
215219 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
216220
217221
218222 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
219223
220224
221225 func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1)
222226
223227
224228 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
225229 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
226230 else if ((feeType == CAP_FEE_NO_LOAN))
227231 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
228232 else if ((feeType == LOAN_FEE))
229233 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
230234 else if ((feeType == NO_LOAN_FEE))
231235 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
232236 else if ((feeType == NO_FEE))
233237 then 0
234238 else throw("Wrong fee type")
235239
236240
237241 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
238242
239243
240244 func getWXFarmingAddr (poolAddr) = {
241245 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
242246 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
243247 Address(fromBase58String(factroyCfg[1]))
244248 }
245249
246250
247251 func assetIdToStr (assetId) = match assetId {
248252 case id: ByteVector =>
249253 toBase58String(id)
250254 case waves: Unit =>
251255 "WAVES"
252256 case _ =>
253257 throw("Not Asset id")
254258 }
255259
256260
257261 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
258262 then unit
259263 else fromBase58String(assetId)
260264
261265
262266 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
263267 then 8
264268 else match assetInfo(fromBase58String(assetId)) {
265269 case asset: Asset =>
266270 asset.decimals
267271 case _ =>
268272 throw("Can't find asset")
269273 }
270274
271275
272276 func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
273277
274278
275279 func getAssetsPrice (assetIds) = {
276280 func getPrices (a,assetId) = {
277281 let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
278282 if ($isInstanceOf(@, "(Int, Int)"))
279283 then @
280284 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
281285 (a :+ assetPrice)
282286 }
283287
284288 let $l = assetIds
285289 let $s = size($l)
286290 let $acc0 = nil
287291 func $f0_1 ($a,$i) = if (($i >= $s))
288292 then $a
289293 else getPrices($a, $l[$i])
290294
291295 func $f0_2 ($a,$i) = if (($i >= $s))
292296 then $a
293297 else throw("List size exceeds 50")
294298
295299 $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)
296300 }
297301
298302
299303 func getSharePrice (shareId) = {
300304 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
301305 let poolAddr = Address(fromBase58String(pool))
302306 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
303- let $t088698934 = getPoolData(poolAddr, pType)
304- let aId = $t088698934._1
305- let bId = $t088698934._2
306- let aBalance = $t088698934._3
307- let bBalance = $t088698934._4
307+ let $t089178982 = getPoolData(poolAddr, pType)
308+ let aId = $t089178982._1
309+ let bId = $t089178982._2
310+ let aBalance = $t089178982._3
311+ let bBalance = $t089178982._4
308312 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
309313 if ($isInstanceOf(@, "(Int, Int)"))
310314 then @
311315 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
312316 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
313317 if ($isInstanceOf(@, "(Int, Int)"))
314318 then @
315319 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
316320 let shareSupply = getShareSupply(poolAddr, pType, shareId)
317321 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
318322 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
319323 let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
320324 let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
321325 fraction(sum, sharePrecision, shareSupply)
322326 }
323327
324328
325329 func getSharePrices (shareIds) = {
326330 func getPrices (a,shareId) = (a :+ getSharePrice(shareId))
327331
328332 let $l = shareIds
329333 let $s = size($l)
330334 let $acc0 = nil
331335 func $f0_1 ($a,$i) = if (($i >= $s))
332336 then $a
333337 else getPrices($a, $l[$i])
334338
335339 func $f0_2 ($a,$i) = if (($i >= $s))
336340 then $a
337341 else throw("List size exceeds 20")
338342
339343 $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)
340344 }
341345
342346
343347 func getCursEntries (aId,bId,shareId) = {
344348 let assetsPrices = getAssetsPrice([aId, bId])
345349 let sharePrice = getSharePrice(shareId)
346350 let prices = [toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)]
347351 [StringEntry(kTokenLastPrice, makeString(prices, ","))]
348352 }
349353
350354
351355 func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL))
352356 then {
353357 let repl = {
354358 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil)
355359 if ($isInstanceOf(@, "List[Any]"))
356360 then @
357361 else throw(($getType(@) + " couldn't be cast to List[Any]"))
358362 }
359363 if ((repl == repl))
360364 then $Tuple5({
361365 let @ = repl[3]
362366 if ($isInstanceOf(@, "Int"))
363367 then @
364368 else throw(($getType(@) + " couldn't be cast to Int"))
365369 }, {
366370 let @ = repl[4]
367371 if ($isInstanceOf(@, "Int"))
368372 then @
369373 else throw(($getType(@) + " couldn't be cast to Int"))
370374 }, {
371375 let @ = repl[1]
372376 if ($isInstanceOf(@, "Int"))
373377 then @
374378 else throw(($getType(@) + " couldn't be cast to Int"))
375379 }, assetIdToStr(repl[2]), {
376380 let @ = repl[0]
377381 if ($isInstanceOf(@, "Int"))
378382 then @
379383 else throw(($getType(@) + " couldn't be cast to Int"))
380384 })
381385 else throw("Strict value is not equal to itself.")
382386 }
383387 else {
384- let $t01046410714 = $Tuple2(split({
388+ let $t01051210762 = $Tuple2(split({
385389 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
386390 if ($isInstanceOf(@, "String"))
387391 then @
388392 else throw(($getType(@) + " couldn't be cast to String"))
389393 }, "__"), split({
390394 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
391395 if ($isInstanceOf(@, "String"))
392396 then @
393397 else throw(($getType(@) + " couldn't be cast to String"))
394398 }, "__"))
395- if (($t01046410714 == $t01046410714))
399+ if (($t01051210762 == $t01051210762))
396400 then {
397- let evalPutInB = $t01046410714._2
398- let evalPutInA = $t01046410714._1
401+ let evalPutInB = $t01051210762._2
402+ let evalPutInA = $t01051210762._1
399403 let lpInA = parseIntValue(evalPutInA[1])
400404 let lpInB = parseIntValue(evalPutInB[1])
401405 if ((lpInB > lpInA))
402406 then {
403407 let pmt = parseIntValue(evalPutInA[8])
404408 $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB)
405409 }
406410 else {
407411 let pmt = parseIntValue(evalPutInA[8])
408412 $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA)
409413 }
410414 }
411415 else throw("Strict value is not equal to itself.")
412416 }
413417
414418
415419 func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
416420 let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
417421 if ((pType == SF_POOL))
418422 then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
419423 else invoke(poolAddr, "put", [1000000, false], payments)
420424 }
421425
422426
423427 func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
424428 let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
425429 if ((pType == SF_POOL))
426430 then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
427431 else invoke(poolAddr, "putOneTkn", [0, false], payments)
428432 }
429433
430434
431435 func stakeLP (pool,pType,shareId,amount) = {
432436 let payments = [AttachedPayment(fromBase58String(shareId), amount)]
433437 if ((pType == SF_POOL))
434438 then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
435439 else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
436440 }
437441
438442
439443 func unstakeLP (pool,pType,shareId,amount) = {
440- let $t01219912556 = if ((pType == SF_POOL))
444+ let $t01224712604 = if ((pType == SF_POOL))
441445 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
442446 else if ((pType == WX_POOL))
443447 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
444448 else throw("Wrong pool type")
445- let farmAddr = $t01219912556._1
446- let fName = $t01219912556._2
447- let params = $t01219912556._3
449+ let farmAddr = $t01224712604._1
450+ let fName = $t01224712604._2
451+ let params = $t01224712604._3
448452 let inv = invoke(farmAddr, fName, params, nil)
449453 if ((inv == inv))
450454 then amount
451455 else throw("Strict value is not equal to itself.")
452456 }
453457
454458
455459 func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
456460 let poolAddr = Address(fromBase58String(pool))
457461 let feeScale6 = 1000000
458462 let fee = getIntegerValue(poolAddr, kSFPoolFee)
459463 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
460- let $t01296913257 = if ((assetTokenToGet == assetIdA))
464+ let $t01301713305 = if ((assetTokenToGet == assetIdA))
461465 then {
462466 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee))
463467 $Tuple2(amountToPay, assetIdB)
464468 }
465469 else {
466470 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee))
467471 $Tuple2(amountToPay, assetIdA)
468472 }
469- let amountToPay = $t01296913257._1
470- let assetToPay = $t01296913257._2
473+ let amountToPay = $t01301713305._1
474+ let assetToPay = $t01301713305._2
471475 $Tuple2(assetToPay, amountToPay)
472476 }
473477
474478
475479 func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
476480 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
477481 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
478482 let feeScale = toBigInt(100000000)
479- let $t01359613904 = if ((assetTokenToGet == assetIdA))
483+ let $t01364413952 = if ((assetTokenToGet == assetIdA))
480484 then {
481485 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
482486 $Tuple2(amountToPay, assetIdB)
483487 }
484488 else {
485489 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
486490 $Tuple2(amountToPay, assetIdA)
487491 }
488- let amountToPay = $t01359613904._1
489- let assetToPay = $t01359613904._2
492+ let amountToPay = $t01364413952._1
493+ let assetToPay = $t01364413952._2
490494 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
491495 $Tuple2(assetToPay, fraction(amountToPayWithFee, 102, 100))
492496 }
493497
494498
495499 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
496500 then {
497- let $t01426714389 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
498- let assetToPay = $t01426714389._1
499- let amountToPay = $t01426714389._2
501+ let $t01431514437 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
502+ let assetToPay = $t01431514437._1
503+ let amountToPay = $t01431514437._2
500504 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
501505 }
502506 else {
503- let $t01456414686 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
504- let assetToPay = $t01456414686._1
505- let amountToPay = $t01456414686._2
507+ let $t01461214734 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
508+ let assetToPay = $t01461214734._1
509+ let amountToPay = $t01461214734._2
506510 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
507511 }
508512
509513
510514 func calcReplenishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = {
511515 let poolAddr = addressFromStringValue(pool)
512516 if ((pType == SF_POOL))
513517 then {
514518 let inv = {
515519 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(pmtA), toString(pmtB), "0"]], nil)
516520 if ($isInstanceOf(@, "List[Any]"))
517521 then @
518522 else throw(($getType(@) + " couldn't be cast to List[Any]"))
519523 }
520524 if ((inv == inv))
521525 then $Tuple2({
522526 let @ = inv[0]
523527 if ($isInstanceOf(@, "Int"))
524528 then @
525529 else throw(($getType(@) + " couldn't be cast to Int"))
526530 }, {
527531 let @ = inv[1]
528532 if ($isInstanceOf(@, "Int"))
529533 then @
530534 else throw(($getType(@) + " couldn't be cast to Int"))
531535 })
532536 else throw("Strict value is not equal to itself.")
533537 }
534538 else if ((pType == WX_POOL))
535539 then {
536- let $t01528915630 = if (if ((pmtA > 0))
540+ let $t01533715678 = if (if ((pmtA > 0))
537541 then (pmtB > 0)
538542 else false)
539543 then {
540- let $t01537015496 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
541- let pmtInA = $t01537015496._1
542- let pmtInB = $t01537015496._2
543- let change = $t01537015496._3
544- let changeId = $t01537015496._4
545- let lpAmount = $t01537015496._5
544+ let $t01541815544 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
545+ let pmtInA = $t01541815544._1
546+ let pmtInB = $t01541815544._2
547+ let change = $t01541815544._3
548+ let changeId = $t01541815544._4
549+ let lpAmount = $t01541815544._5
546550 $Tuple3(change, changeId, lpAmount)
547551 }
548552 else if ((pmtA > 0))
549553 then $Tuple3(pmtA, aId, 0)
550554 else $Tuple3(pmtB, bId, 0)
551- let change = $t01528915630._1
552- let changeId = $t01528915630._2
553- let lpTwo = $t01528915630._3
554- let $t01563715853 = if ((change > 0))
555+ let change = $t01533715678._1
556+ let changeId = $t01533715678._2
557+ let lpTwo = $t01533715678._3
558+ let $t01568515901 = if ((change > 0))
555559 then {
556560 let inv = {
557561 let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil)
558562 if ($isInstanceOf(@, "(Int, Int, Int)"))
559563 then @
560564 else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)"))
561565 }
562566 if ((inv == inv))
563567 then $Tuple2(inv._1, inv._3)
564568 else throw("Strict value is not equal to itself.")
565569 }
566570 else $Tuple2(0, 0)
567- let lpOne = $t01563715853._1
568- let loss = $t01563715853._2
571+ let lpOne = $t01568515901._1
572+ let loss = $t01568515901._2
569573 $Tuple2((lpTwo + lpOne), loss)
570574 }
571575 else throw("Wrong pool type")
572576 }
573577
574578
575579 func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = {
576580 let poolAddr = addressFromStringValue(pool)
577- let $t01614716647 = if ((pType == SF_POOL))
581+ let $t01619516695 = if ((pType == SF_POOL))
578582 then {
579583 let inv = {
580584 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil)
581585 if ($isInstanceOf(@, "List[Any]"))
582586 then @
583587 else throw(($getType(@) + " couldn't be cast to List[Any]"))
584588 }
585589 if ((inv == inv))
586590 then $Tuple2({
587591 let @ = inv[0]
588592 if ($isInstanceOf(@, "Int"))
589593 then @
590594 else throw(($getType(@) + " couldn't be cast to Int"))
591595 }, {
592596 let @ = inv[1]
593597 if ($isInstanceOf(@, "Int"))
594598 then @
595599 else throw(($getType(@) + " couldn't be cast to Int"))
596600 })
597601 else throw("Strict value is not equal to itself.")
598602 }
599603 else if ((pType == WX_POOL))
600604 then {
601605 let get = split({
602606 let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, lpAmount], nil)
603607 if ($isInstanceOf(@, "String"))
604608 then @
605609 else throw(($getType(@) + " couldn't be cast to String"))
606610 }, "__")
607611 if ((get == get))
608612 then $Tuple2(parseIntValue(get[1]), parseIntValue(get[2]))
609613 else throw("Strict value is not equal to itself.")
610614 }
611615 else throw("Wrong pool type")
612- let getAmountA = $t01614716647._1
613- let getAmountB = $t01614716647._2
616+ let getAmountA = $t01619516695._1
617+ let getAmountB = $t01619516695._2
614618 if ((borrowAmount > 0))
615619 then {
616620 let amountToGetEx = if (if ((borrowAssetId == aId))
617621 then (borrowAmount > getAmountA)
618622 else false)
619623 then (borrowAmount - getAmountA)
620624 else if (if ((borrowAssetId == bId))
621625 then (borrowAmount > getAmountB)
622626 else false)
623627 then (borrowAmount - getAmountB)
624628 else 0
625- let $t01692517228 = if ((amountToGetEx > 0))
629+ let $t01697317276 = if ((amountToGetEx > 0))
626630 then if ((pType == SF_POOL))
627631 then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
628632 else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
629633 else $Tuple2("", 0)
630- let assetToPay = $t01692517228._1
631- let amountToPay = $t01692517228._2
634+ let assetToPay = $t01697317276._1
635+ let amountToPay = $t01697317276._2
632636 if ((borrowAssetId == aId))
633637 then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay))
634638 else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount))
635639 }
636640 else $Tuple2(getAmountA, getAmountB)
637641 }
638642
639643
640644 func claimFarmed (type,pool) = if ((type == SF_POOL))
641645 then {
642646 let balBefore = accountBalance(SWOPID)
643647 if ((balBefore == balBefore))
644648 then {
645649 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
646650 if ((inv == inv))
647651 then {
648652 let balAfter = accountBalance(SWOPID)
649653 $Tuple2((balAfter - balBefore), SWOPID)
650654 }
651655 else throw("Strict value is not equal to itself.")
652656 }
653657 else throw("Strict value is not equal to itself.")
654658 }
655659 else if ((type == WX_POOL))
656660 then {
657661 let balBefore = accountBalance(WXID)
658662 if ((balBefore == balBefore))
659663 then {
660664 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
661665 if ((inv == inv))
662666 then {
663667 let balAfter = accountBalance(WXID)
664668 $Tuple2((balAfter - balBefore), WXID)
665669 }
666670 else throw("Strict value is not equal to itself.")
667671 }
668672 else throw("Strict value is not equal to itself.")
669673 }
670674 else throw("Wrong pool type")
671675
672676
673677 func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
674678 let lpBalanceBefore = accountBalance(fromBase58String(LPId))
675679 if ((lpBalanceBefore == lpBalanceBefore))
676680 then {
677681 let poolAddr = addressFromStringValue(pool)
678- let $t01842518841 = if (if ((pmtA > 0))
682+ let $t01847318889 = if (if ((pmtA > 0))
679683 then (pmtB > 0)
680684 else false)
681685 then {
682- let $t01849118607 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
683- let pmtInA = $t01849118607._1
684- let pmtInB = $t01849118607._2
685- let change = $t01849118607._3
686- let changeId = $t01849118607._4
686+ let $t01853918655 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
687+ let pmtInA = $t01853918655._1
688+ let pmtInB = $t01853918655._2
689+ let change = $t01853918655._3
690+ let changeId = $t01853918655._4
687691 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
688692 if ((inv == inv))
689693 then $Tuple2(change, changeId)
690694 else throw("Strict value is not equal to itself.")
691695 }
692696 else if ((pmtA > 0))
693697 then $Tuple2(pmtA, aId)
694698 else if ((pmtB > 0))
695699 then $Tuple2(pmtB, bId)
696700 else throw("pmts must be > 0")
697- let change = $t01842518841._1
698- let changeId = $t01842518841._2
701+ let change = $t01847318889._1
702+ let changeId = $t01847318889._2
699703 let inv = if ((change > 0))
700704 then replenishOneTokenByType(poolAddr, pType, change, changeId)
701705 else nil
702706 if ((inv == inv))
703707 then {
704708 let lpBalanceAfter = accountBalance(fromBase58String(LPId))
705709 let totalStaked = (lpBalanceAfter - lpBalanceBefore)
706710 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
707711 let userShareForStake = (totalStaked - axlyFeeAmount)
708712 if ((0 >= userShareForStake))
709713 then throw("amount of staked sharetokens must be > 0")
710714 else {
711715 let invLP = stakeLP(pool, pType, LPId, userShareForStake)
712716 if ((invLP == invLP))
713717 then $Tuple2(userShareForStake, axlyFeeAmount)
714718 else throw("Strict value is not equal to itself.")
715719 }
716720 }
717721 else throw("Strict value is not equal to itself.")
718722 }
719723 else throw("Strict value is not equal to itself.")
720724 }
721725
722726
723727 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
724728 let totalAmount = getPoolTotalShare(pool)
725729 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
726- let $t01969919937 = if (withLoan)
730+ let $t01974719985 = if (withLoan)
727731 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
728732 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
729- let curPoolInterest = $t01969919937._1
730- let totalStakedWithLoan = $t01969919937._2
733+ let curPoolInterest = $t01974719985._1
734+ let totalStakedWithLoan = $t01974719985._2
731735 [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))]
732736 }
733737
734738
735739 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
736740 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
737741 if ((tokenBalanceBefore == tokenBalanceBefore))
738742 then {
739743 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
740744 if ((inv == inv))
741745 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
742746 else throw("Strict value is not equal to itself.")
743747 }
744748 else throw("Strict value is not equal to itself.")
745749 }
746750
747751
748752 func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
749753 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
750754 if ((tokenBalanceBefore == tokenBalanceBefore))
751755 then {
752756 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
753757 if ((inv == inv))
754758 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
755759 else throw("Strict value is not equal to itself.")
756760 }
757761 else throw("Strict value is not equal to itself.")
758762 }
759763
760764
761765 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
762766 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
763767 if ((tokenBalanceBefore == tokenBalanceBefore))
764768 then {
765769 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
766770 if ((inv == inv))
767771 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
768772 else throw("Strict value is not equal to itself.")
769773 }
770774 else throw("Strict value is not equal to itself.")
771775 }
772776
773777
774778 func capitalize (pool,pType,tokenId,tokenAmount) = {
775779 let poolAddr = Address(fromBase58String(pool))
776- let $t02228822354 = getPoolData(poolAddr, pType)
777- let AId = $t02228822354._1
778- let BId = $t02228822354._2
779- let balA = $t02228822354._3
780- let balB = $t02228822354._4
781- let shareId = $t02228822354._5
780+ let $t02233622402 = getPoolData(poolAddr, pType)
781+ let AId = $t02233622402._1
782+ let BId = $t02233622402._2
783+ let balA = $t02233622402._3
784+ let balB = $t02233622402._4
785+ let shareId = $t02233622402._5
782786 if (if ((tokenId != AId))
783787 then (tokenId != BId)
784788 else false)
785789 then throw("Wrong asset")
786790 else {
787- let $t02243922519 = if ((tokenId == AId))
791+ let $t02248722567 = if ((tokenId == AId))
788792 then $Tuple2(tokenAmount, 0)
789793 else $Tuple2(0, tokenAmount)
790- let pmtA = $t02243922519._1
791- let pmtB = $t02243922519._2
792- let $t02252222626 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
793- let stakedAmount = $t02252222626._1
794- let nf = $t02252222626._2
794+ let pmtA = $t02248722567._1
795+ let pmtB = $t02248722567._2
796+ let $t02257022674 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
797+ let stakedAmount = $t02257022674._1
798+ let nf = $t02257022674._2
795799 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
796800 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
797801 let totalShareAmount = getPoolTotalShare(pool)
798802 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
799803 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
800804 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
801805 let stakedNoLoan = (stakedAmount - stakedLoan)
802806 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
803807 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
804808 else 0
805809 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
806810 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
807811 else 0
808812 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
809813 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
810814 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
811815 if ((axlyFee == axlyFee))
812816 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))
813817 else throw("Strict value is not equal to itself.")
814818 }
815819 }
816820
817821
818822 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
819823 let poolAddr = Address(fromBase58String(pool))
820824 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
821- let $t02439424470 = getPoolData(poolAddr, pType)
822- let assetIdA = $t02439424470._1
823- let assetIdB = $t02439424470._2
824- let balA = $t02439424470._3
825- let balB = $t02439424470._4
826- let shareId = $t02439424470._5
825+ let $t02444224518 = getPoolData(poolAddr, pType)
826+ let assetIdA = $t02444224518._1
827+ let assetIdB = $t02444224518._2
828+ let balA = $t02444224518._3
829+ let balB = $t02444224518._4
830+ let shareId = $t02444224518._5
827831 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
828832 if ((cBalABefore == cBalABefore))
829833 then {
830834 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
831835 if ((cBalBBefore == cBalBBefore))
832836 then {
833837 let inv = if ((pType == SF_POOL))
834838 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
835839 else {
836840 let inv = unstakeLP(pool, pType, shareId, userCanWithdraw)
837841 if ((inv == inv))
838842 then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)])
839843 else throw("Strict value is not equal to itself.")
840844 }
841845 if ((inv == inv))
842846 then {
843847 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
844848 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
845- let $t02503325122 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
846- let tokensAmountA = $t02503325122._1
847- let tokensAmountB = $t02503325122._2
848- let $t02512525945 = if ((debt > 0))
849+ let $t02508125170 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
850+ let tokensAmountA = $t02508125170._1
851+ let tokensAmountB = $t02508125170._2
852+ let $t02517325993 = if ((debt > 0))
849853 then {
850854 let amountToGetEx = if (if ((borrowAsset == assetIdA))
851855 then (debt > tokensAmountA)
852856 else false)
853857 then (debt - tokensAmountA)
854858 else if (if ((borrowAsset == assetIdB))
855859 then (debt > tokensAmountB)
856860 else false)
857861 then (debt - tokensAmountB)
858862 else 0
859863 let exInv = if ((amountToGetEx > 0))
860864 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
861865 else 0
862866 if ((exInv == exInv))
863867 then {
864868 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
865869 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
866870 if ((borrowAsset == assetIdA))
867871 then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore))
868872 else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt))
869873 }
870874 else throw("Strict value is not equal to itself.")
871875 }
872876 else $Tuple2(tokensAmountA, tokensAmountB)
873- let toUserA = $t02512525945._1
874- let toUserB = $t02512525945._2
877+ let toUserA = $t02517325993._1
878+ let toUserB = $t02517325993._2
875879 $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
876880 }
877881 else throw("Strict value is not equal to itself.")
878882 }
879883 else throw("Strict value is not equal to itself.")
880884 }
881885 else throw("Strict value is not equal to itself.")
882886 }
883887
884888
885889 func userCanWithdrawShareCalc (user,pool,posId,borrowed) = {
886890 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
887891 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
888892 let poolInterest = if (borrowed)
889893 then getIntegerValue(this, (pool + kPoolInterestLoan))
890894 else getIntegerValue(this, (pool + kPoolInterestNoLoan))
891895 (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10))
892896 }
893897
894898
895899 func withdrawToUser (user,pool,posId,stopLoss) = {
896900 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
897901 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0)
898902 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
899903 let poolTotalShare = getPoolTotalShare(pool)
900904 let userAddr = Address(fromBase58String(user))
901905 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
902906 let debt = if ((borrowAmount > 0))
903907 then {
904908 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil)
905909 if ($isInstanceOf(@, "Int"))
906910 then @
907911 else throw(($getType(@) + " couldn't be cast to Int"))
908912 }
909913 else 0
910- let $t02733327486 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
911- if (($t02733327486 == $t02733327486))
914+ let $t02738127534 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
915+ if (($t02738127534 == $t02738127534))
912916 then {
913- let shareId = $t02733327486._7
914- let cBalBAfter = $t02733327486._6
915- let cBalAAfter = $t02733327486._5
916- let assetIdB = $t02733327486._4
917- let toUserAmountB = $t02733327486._3
918- let assetIdA = $t02733327486._2
919- let toUserAmountA = $t02733327486._1
917+ let shareId = $t02738127534._7
918+ let cBalBAfter = $t02738127534._6
919+ let cBalAAfter = $t02738127534._5
920+ let assetIdB = $t02738127534._4
921+ let toUserAmountB = $t02738127534._3
922+ let assetIdA = $t02738127534._2
923+ let toUserAmountA = $t02738127534._1
920924 let closeDbtInv = if ((debt > 0))
921925 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
922926 else 0
923927 if ((closeDbtInv == closeDbtInv))
924928 then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId))
925929 else throw("Strict value is not equal to itself.")
926930 }
927931 else throw("Strict value is not equal to itself.")
928932 }
929933
930934
931935 func parseRequest (requestId) = {
932936 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
933937 let user = request[0]
934938 let pool = request[1]
935939 let pmtA = parseIntValue(request[2])
936940 let AId = request[3]
937941 let pmtB = parseIntValue(request[4])
938942 let BId = request[5]
939943 let balA = parseIntValue(request[6])
940944 let balB = parseIntValue(request[7])
941945 let shareId = request[8]
942946 let bwAsset = request[9]
943947 let bwAmount = parseIntValue(request[10])
944948 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
945949 }
946950
947951
948952 func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
949953 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
950954 if ($isInstanceOf(@, "(Int, Int)"))
951955 then @
952956 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
953957 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
954958 if ($isInstanceOf(@, "(Int, Int)"))
955959 then @
956960 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
957961 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
958962 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
959963 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
960- let $t02917229269 = if ((borrowId == aId))
964+ let $t02922029317 = if ((borrowId == aId))
961965 then $Tuple2(dPriceA, decPrA)
962966 else $Tuple2(dPriceB, decPrB)
963- let borrowPrice = $t02917229269._1
964- let borrowDecPr = $t02917229269._2
967+ let borrowPrice = $t02922029317._1
968+ let borrowDecPr = $t02922029317._2
965969 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
966970 }
967971
968972
969973 @Callable(i)
970974 func calcPriceImpactEVALONLY (pool,leverage,borrowId,pmtA,pmtB) = if (if ((100 > leverage))
971975 then true
972976 else (leverage > 300))
973977 then throw("Leverage can't be <100 and >300")
974978 else {
975979 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
976- let $t02968729777 = getPoolData(Address(fromBase58String(pool)), pType)
977- let AId = $t02968729777._1
978- let BId = $t02968729777._2
979- let balA = $t02968729777._3
980- let balB = $t02968729777._4
981- let shareId = $t02968729777._5
980+ let $t02973529825 = getPoolData(Address(fromBase58String(pool)), pType)
981+ let AId = $t02973529825._1
982+ let BId = $t02973529825._2
983+ let balA = $t02973529825._3
984+ let balB = $t02973529825._4
985+ let shareId = $t02973529825._5
982986 let borrowAmount = if ((leverage > 100))
983987 then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
984988 else 0
985- let $t02991230019 = if ((borrowId == AId))
989+ let $t02996030067 = if ((borrowId == AId))
986990 then $Tuple2((pmtA + borrowAmount), pmtB)
987991 else $Tuple2(pmtA, (pmtB + borrowAmount))
988- let payInA = $t02991230019._1
989- let payInB = $t02991230019._2
990- let $t03002230115 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
991- let lpAmount = $t03002230115._1
992- let loss = $t03002230115._2
992+ let payInA = $t02996030067._1
993+ let payInB = $t02996030067._2
994+ let $t03007030163 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
995+ let lpAmount = $t03007030163._1
996+ let loss = $t03007030163._2
993997 let impactMod = if ((0 > loss))
994998 then (loss * -1)
995999 else loss
9961000 $Tuple2(nil, [impactMod])
9971001 }
9981002
9991003
10001004
10011005 @Callable(i)
10021006 func getShareAssetPriceREADONLY (shareId) = {
10031007 let sharePrices = getSharePrice(shareId)
10041008 $Tuple2(nil, sharePrices)
10051009 }
10061010
10071011
10081012
10091013 @Callable(i)
10101014 func getUserPositionShareAmountREADONLY (user,posNum) = {
10111015 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position")
10121016 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount))
10131017 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0))
10141018 $Tuple2(nil, userCanWithdraw)
10151019 }
10161020
10171021
10181022
10191023 @Callable(i)
10201024 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
10211025 func userPos (a,pool) = {
1022- let $t03092830962 = a
1023- let totalPos = $t03092830962._1
1024- let posDebt = $t03092830962._2
1025- let index = $t03092830962._3
1026+ let $t03097631010 = a
1027+ let totalPos = $t03097631010._1
1028+ let posDebt = $t03097631010._2
1029+ let index = $t03097631010._3
10261030 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1027- let $t03105431144 = getPoolData(Address(fromBase58String(pool)), pType)
1028- let AId = $t03105431144._1
1029- let BId = $t03105431144._2
1030- let balA = $t03105431144._3
1031- let balB = $t03105431144._4
1032- let shareId = $t03105431144._5
1031+ let $t03110231192 = getPoolData(Address(fromBase58String(pool)), pType)
1032+ let AId = $t03110231192._1
1033+ let BId = $t03110231192._2
1034+ let balA = $t03110231192._3
1035+ let balB = $t03110231192._4
1036+ let shareId = $t03110231192._5
10331037 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10341038 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
10351039 let sharePrices = getSharePrice(shareId)
10361040 let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
10371041 let shareD = fraction(userCanWithdraw, sharePrices, decPrShare)
10381042 if ((borrowAmount == 0))
10391043 then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1))
10401044 else {
10411045 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId))
10421046 let debt = {
10431047 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil)
10441048 if ($isInstanceOf(@, "Int"))
10451049 then @
10461050 else throw(($getType(@) + " couldn't be cast to Int"))
10471051 }
10481052 let borrowAssetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [borrowAsset, false], nil)
10491053 if ($isInstanceOf(@, "(Int, Int)"))
10501054 then @
10511055 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
10521056 let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN)
10531057 let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId)
10541058 $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1))
10551059 }
10561060 }
10571061
1058- let $t03218732242 = {
1062+ let $t03223532290 = {
10591063 let $l = pools
10601064 let $s = size($l)
10611065 let $acc0 = $Tuple3(nil, nil, 0)
10621066 func $f0_1 ($a,$i) = if (($i >= $s))
10631067 then $a
10641068 else userPos($a, $l[$i])
10651069
10661070 func $f0_2 ($a,$i) = if (($i >= $s))
10671071 then $a
10681072 else throw("List size exceeds 20")
10691073
10701074 $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)
10711075 }
1072- let pos = $t03218732242._1
1073- let debt = $t03218732242._2
1076+ let pos = $t03223532290._1
1077+ let debt = $t03223532290._2
10741078 $Tuple2(nil, $Tuple2(pos, debt))
10751079 }
10761080
10771081
10781082
10791083 @Callable(i)
10801084 func replenish (pool,leverage,borrowId) = if (if ((100 > leverage))
10811085 then true
10821086 else (leverage > 300))
10831087 then throw("Leverage can't be <100 and >300")
10841088 else {
10851089 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1086- let $t03256532655 = getPoolData(Address(fromBase58String(pool)), pType)
1087- let AId = $t03256532655._1
1088- let BId = $t03256532655._2
1089- let balA = $t03256532655._3
1090- let balB = $t03256532655._4
1091- let shareId = $t03256532655._5
1092- let $t03265833295 = if ((size(i.payments) == 2))
1090+ let $t03261332703 = getPoolData(Address(fromBase58String(pool)), pType)
1091+ let AId = $t03261332703._1
1092+ let BId = $t03261332703._2
1093+ let balA = $t03261332703._3
1094+ let balB = $t03261332703._4
1095+ let shareId = $t03261332703._5
1096+ let $t03270633343 = if ((size(i.payments) == 2))
10931097 then if ((assetIdToStr(i.payments[0].assetId) != AId))
10941098 then throw("Wrong payment asset A")
10951099 else if ((assetIdToStr(i.payments[1].assetId) != BId))
10961100 then throw("Wrong payment asset B")
10971101 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
10981102 else if ((size(i.payments) == 1))
10991103 then if ((assetIdToStr(i.payments[0].assetId) == AId))
11001104 then $Tuple4(i.payments[0].amount, AId, 0, BId)
11011105 else if ((assetIdToStr(i.payments[0].assetId) == BId))
11021106 then $Tuple4(0, AId, i.payments[0].amount, BId)
11031107 else throw("Wrong payment")
11041108 else throw("One or two payments expected")
1105- let pmtA = $t03265833295._1
1106- let pmtAssetA = $t03265833295._2
1107- let pmtB = $t03265833295._3
1108- let pmtAssetB = $t03265833295._4
1109+ let pmtA = $t03270633343._1
1110+ let pmtAssetA = $t03270633343._2
1111+ let pmtB = $t03270633343._3
1112+ let pmtAssetB = $t03270633343._4
11091113 let newPosNum = getNewUserPositionNumber(toString(i.caller))
11101114 if ((leverage > 100))
11111115 then {
11121116 let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
11131117 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
11141118 let newRequestId = {
11151119 let @ = invoke(this, "createNewRequest", [request], nil)
11161120 if ($isInstanceOf(@, "Int"))
11171121 then @
11181122 else throw(($getType(@) + " couldn't be cast to Int"))
11191123 }
11201124 if ((newRequestId == newRequestId))
11211125 then {
11221126 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
11231127 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
11241128 if ((inv == inv))
11251129 then nil
11261130 else throw("Strict value is not equal to itself.")
11271131 }
11281132 else throw("Strict value is not equal to itself.")
11291133 }
11301134 else {
1131- let $t03422334335 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1132- let userStaked = $t03422334335._1
1133- let axlyFee = $t03422334335._2
1135+ let $t03427134383 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1136+ let userStaked = $t03427134383._1
1137+ let axlyFee = $t03427134383._2
11341138 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
11351139 }
11361140 }
11371141
11381142
11391143
11401144 @Callable(i)
11411145 func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false)
11421146
11431147
11441148
11451149 @Callable(i)
11461150 func createUpdateStopLoss (posId,poolId,assetId,price) = {
11471151 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
11481152 if ($isInstanceOf(@, "(Int, Int)"))
11491153 then @
11501154 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
11511155 if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
11521156 then throw("There are no user position")
11531157 else if ((0 >= price))
11541158 then throw("Price must be greater than 0")
11551159 else if ((price > tokenOraclePrice))
11561160 then throw("Price must be less than current token price")
11571161 else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
11581162 }
11591163
11601164
11611165
11621166 @Callable(i)
11631167 func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
11641168 then throw("No entry")
11651169 else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
11661170
11671171
11681172
11691173 @Callable(i)
1174+func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox)))
1175+ then throw("Already inited")
1176+ 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)]
1177+
1178+
1179+
1180+@Callable(i)
11701181 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
11711182 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
11721183 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
11731184 })
11741185
11751186
11761187
11771188 @Callable(i)
11781189 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
1179- let $t03608836192 = parseRequest(requestId)
1180- let user = $t03608836192._1
1181- let pool = $t03608836192._2
1182- let pmtA = $t03608836192._3
1183- let AId = $t03608836192._4
1184- let pmtB = $t03608836192._5
1185- let BId = $t03608836192._6
1186- let balA = $t03608836192._7
1187- let balB = $t03608836192._8
1188- let shareId = $t03608836192._9
1189- let bwAsset = $t03608836192._10
1190- let bwAmount = $t03608836192._11
1190+ let $t03686336967 = parseRequest(requestId)
1191+ let user = $t03686336967._1
1192+ let pool = $t03686336967._2
1193+ let pmtA = $t03686336967._3
1194+ let AId = $t03686336967._4
1195+ let pmtB = $t03686336967._5
1196+ let BId = $t03686336967._6
1197+ let balA = $t03686336967._7
1198+ let balB = $t03686336967._8
1199+ let shareId = $t03686336967._9
1200+ let bwAsset = $t03686336967._10
1201+ let bwAmount = $t03686336967._11
11911202 if ((size(i.payments) != 1))
11921203 then throw("Wrong payment size")
11931204 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
11941205 then true
11951206 else (i.payments[0].amount != bwAmount))
11961207 then throw("Wrong payment")
11971208 else {
1198- let $t03638236506 = if ((AId == bwAsset))
1209+ let $t03715737281 = if ((AId == bwAsset))
11991210 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
12001211 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1201- let pmtAllA = $t03638236506._1
1202- let pmtAllB = $t03638236506._2
1212+ let pmtAllA = $t03715737281._1
1213+ let pmtAllB = $t03715737281._2
12031214 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1204- let $t03658836703 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1205- let userStaked = $t03658836703._1
1206- let axlyFee = $t03658836703._2
1215+ let $t03736337478 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1216+ let userStaked = $t03736337478._1
1217+ let axlyFee = $t03736337478._2
12071218 let posNum = getNewUserPositionNumber(user)
12081219 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12091220 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
12101221 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
12111222 }
12121223 })
12131224
12141225
12151226
12161227 @Callable(i)
12171228 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
12181229 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12191230 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1220- let $t03748237572 = getPoolData(Address(fromBase58String(pool)), pType)
1221- let AId = $t03748237572._1
1222- let BId = $t03748237572._2
1223- let balA = $t03748237572._3
1224- let balB = $t03748237572._4
1225- let shareId = $t03748237572._5
1231+ let $t03825738347 = getPoolData(Address(fromBase58String(pool)), pType)
1232+ let AId = $t03825738347._1
1233+ let BId = $t03825738347._2
1234+ let balA = $t03825738347._3
1235+ let balB = $t03825738347._4
1236+ let shareId = $t03825738347._5
12261237 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12271238 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12281239 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12291240 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
12301241 if ((borrowAmount == 0))
12311242 then throw("You can't liquidate position without borrow")
12321243 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))]
12331244 })
12341245
12351246
12361247
12371248 @Callable(i)
12381249 func stopLoss (user,posId,pool,assetId) = valueOrElse(isAdminCall(i), {
12391250 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
12401251 if ($isInstanceOf(@, "(Int, Int)"))
12411252 then @
12421253 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
12431254 if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
12441255 then throw("No entry")
12451256 else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))
12461257 })
12471258
12481259
12491260
12501261 @Callable(i)
12511262 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
1252- let $t03935839552 = if (claim)
1263+ let $t04013340327 = if (claim)
12531264 then claimFarmed(type, pool)
12541265 else {
12551266 let claimedAsset = if ((type == SF_POOL))
12561267 then SWOPID
12571268 else WXID
12581269 $Tuple2(amountToExchange, claimedAsset)
12591270 }
1260- let claimedAmount = $t03935839552._1
1261- let claimedAsset = $t03935839552._2
1271+ let claimedAmount = $t04013340327._1
1272+ let claimedAsset = $t04013340327._2
12621273 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12631274 let change = (claimedAmount - amountToExchange)
12641275 let changeEntry = if ((change > 0))
12651276 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12661277 else nil
12671278 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
12681279 })
12691280
12701281
12711282
12721283 @Callable(i)
12731284 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
1274- let $t04023740431 = if (claim)
1285+ let $t04101241206 = if (claim)
12751286 then claimFarmed(type, pool)
12761287 else {
12771288 let claimedAsset = if ((type == SF_POOL))
12781289 then SWOPID
12791290 else WXID
12801291 $Tuple2(amountToExchange, claimedAsset)
12811292 }
1282- let claimedAmount = $t04023740431._1
1283- let claimedAsset = $t04023740431._2
1293+ let claimedAmount = $t04101241206._1
1294+ let claimedAsset = $t04101241206._2
12841295 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
12851296 let change = (claimedAmount - amountToExchange)
12861297 let changeEntry = if ((change > 0))
12871298 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12881299 else nil
12891300 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
12901301 })
12911302
12921303
12931304
12941305 @Callable(i)
12951306 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
1296- let $t04118241376 = if (claim)
1307+ let $t04195742151 = if (claim)
12971308 then claimFarmed(type, pool)
12981309 else {
12991310 let claimedAsset = if ((type == SF_POOL))
13001311 then SWOPID
13011312 else WXID
13021313 $Tuple2(amountToExchange, claimedAsset)
13031314 }
1304- let claimedAmount = $t04118241376._1
1305- let claimedAsset = $t04118241376._2
1315+ let claimedAmount = $t04195742151._1
1316+ let claimedAsset = $t04195742151._2
13061317 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13071318 let change = (claimedAmount - amountToExchange)
13081319 let changeEntry = if ((change > 0))
13091320 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
13101321 else nil
13111322 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
13121323 })
13131324
13141325
13151326
13161327 @Callable(i)
13171328 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
13181329 then (type != WX_POOL)
13191330 else false)
13201331 then throw("Wrong type")
13211332 else {
1322- let $t04209742191 = getPoolData(Address(fromBase58String(poolAddr)), type)
1323- let aId = $t04209742191._1
1324- let bId = $t04209742191._2
1325- let aBal = $t04209742191._3
1326- let bBal = $t04209742191._4
1327- let shareId = $t04209742191._5
1333+ let $t04287242966 = getPoolData(Address(fromBase58String(poolAddr)), type)
1334+ let aId = $t04287242966._1
1335+ let bId = $t04287242966._2
1336+ let aBal = $t04287242966._3
1337+ let bBal = $t04287242966._4
1338+ let shareId = $t04287242966._5
13281339 [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)]
13291340 })
13301341
13311342
13321343 @Verifier(tx)
13331344 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
13341345

github/deemru/w8io/026f985 
184.08 ms