tx · HjN54TVya4jBZ7Gzy6f7nPeWba4tn28dRUWwEmLX84cp

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.04400000 Waves

2023.06.28 13:27 [2642390] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "HjN54TVya4jBZ7Gzy6f7nPeWba4tn28dRUWwEmLX84cp", "fee": 4400000, "feeAssetId": null, "timestamp": 1687948092057, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "Ebr97C7W9ovcM47Dxatki2H2NKRke7MfpvEMzWbaqzMzqHaCbTBuinHKwxCgEcmLH85TjHe4E47535aSWqvMmWL" ], "script": "base64:BgKYAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg4KDAgICAEEERgYEQEBGBIKCggICAgBBAgBGBIOCgwICAgBBBgYGBgYARgSCwoJCAgBAQEBAQEEaQAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAA9DQVBfRkVFX05PX0xPQU4CCWNhcE5vTG9hbgAMQ0FQX0ZFRV9MT0FOAgdjYXBMb2FuABRTVE9QTE9TU19GRUVfTk9fTE9BTgIOc3RvcExvc3NOb0xvYW4ADVNUT1BMT1NTX0xPQU4CDHN0b3BMb3NzTG9hbgAITE9BTl9GRUUCBGxvYW4AC05PX0xPQU5fRkVFAgZub0xvYW4ABk5PX0ZFRQIFbm9GZWUABlNDQUxFOACAwtcvAAdTQ0FMRTEwAIDIr6AlAAdTQ0FMRTE2CQC2AgEAgICE/qbe4REACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZ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rUG9vbENhbkJvcnJvdwUJY2FuQm9ycm93BQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5zTnXUg==", "height": 2642390, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DHfqMMfuipcaVH1h63yUiaGeYRdAvvHbpDjPEV8xTtF3 Next: DSmQDEwe6cvm6JWEPfvNjcZ96G24VNdmTb97JJXL2GCm Diff:
OldNewDifferences
6060 let kPoolInterestLoan = "_pool_interest_loan"
6161
6262 let kPoolInterestNoLoan = "_pool_interest_no_loan"
63+
64+let kPoolCanBorrow = "_pool_can_borrow"
6365
6466 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
6567
304306 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
305307 let poolAddr = Address(fromBase58String(pool))
306308 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
309+ let $t090179082 = getPoolData(poolAddr, pType)
310+ let aId = $t090179082._1
311+ let bId = $t090179082._2
312+ let aBalance = $t090179082._3
313+ let bBalance = $t090179082._4
312314 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
313315 if ($isInstanceOf(@, "(Int, Int)"))
314316 then @
385387 else throw("Strict value is not equal to itself.")
386388 }
387389 else {
388- let $t01051210762 = $Tuple2(split({
390+ let $t01061210862 = $Tuple2(split({
389391 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
390392 if ($isInstanceOf(@, "String"))
391393 then @
396398 then @
397399 else throw(($getType(@) + " couldn't be cast to String"))
398400 }, "__"))
399- if (($t01051210762 == $t01051210762))
401+ if (($t01061210862 == $t01061210862))
400402 then {
401- let evalPutInB = $t01051210762._2
402- let evalPutInA = $t01051210762._1
403+ let evalPutInB = $t01061210862._2
404+ let evalPutInA = $t01061210862._1
403405 let lpInA = parseIntValue(evalPutInA[1])
404406 let lpInB = parseIntValue(evalPutInB[1])
405407 if ((lpInB > lpInA))
441443
442444
443445 func unstakeLP (pool,pType,shareId,amount) = {
444- let $t01224712604 = if ((pType == SF_POOL))
446+ let $t01234712704 = if ((pType == SF_POOL))
445447 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
446448 else if ((pType == WX_POOL))
447449 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
448450 else throw("Wrong pool type")
449- let farmAddr = $t01224712604._1
450- let fName = $t01224712604._2
451- let params = $t01224712604._3
451+ let farmAddr = $t01234712704._1
452+ let fName = $t01234712704._2
453+ let params = $t01234712704._3
452454 let inv = invoke(farmAddr, fName, params, nil)
453455 if ((inv == inv))
454456 then amount
461463 let feeScale6 = 1000000
462464 let fee = getIntegerValue(poolAddr, kSFPoolFee)
463465 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
464- let $t01301713305 = if ((assetTokenToGet == assetIdA))
466+ let $t01311713405 = if ((assetTokenToGet == assetIdA))
465467 then {
466468 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee))
467469 $Tuple2(amountToPay, assetIdB)
470472 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee))
471473 $Tuple2(amountToPay, assetIdA)
472474 }
473- let amountToPay = $t01301713305._1
474- let assetToPay = $t01301713305._2
475+ let amountToPay = $t01311713405._1
476+ let assetToPay = $t01311713405._2
475477 $Tuple2(assetToPay, amountToPay)
476478 }
477479
480482 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
481483 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
482484 let feeScale = toBigInt(100000000)
483- let $t01364413952 = if ((assetTokenToGet == assetIdA))
485+ let $t01374414052 = if ((assetTokenToGet == assetIdA))
484486 then {
485487 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
486488 $Tuple2(amountToPay, assetIdB)
489491 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
490492 $Tuple2(amountToPay, assetIdA)
491493 }
492- let amountToPay = $t01364413952._1
493- let assetToPay = $t01364413952._2
494+ let amountToPay = $t01374414052._1
495+ let assetToPay = $t01374414052._2
494496 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
495497 $Tuple2(assetToPay, fraction(amountToPayWithFee, 102, 100))
496498 }
498500
499501 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
500502 then {
501- let $t01431514437 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
502- let assetToPay = $t01431514437._1
503- let amountToPay = $t01431514437._2
503+ let $t01441514537 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
504+ let assetToPay = $t01441514537._1
505+ let amountToPay = $t01441514537._2
504506 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
505507 }
506508 else {
507- let $t01461214734 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
508- let assetToPay = $t01461214734._1
509- let amountToPay = $t01461214734._2
509+ let $t01471214834 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
510+ let assetToPay = $t01471214834._1
511+ let amountToPay = $t01471214834._2
510512 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
511513 }
512514
537539 }
538540 else if ((pType == WX_POOL))
539541 then {
540- let $t01533715678 = if (if ((pmtA > 0))
542+ let $t01543715778 = if (if ((pmtA > 0))
541543 then (pmtB > 0)
542544 else false)
543545 then {
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
546+ let $t01551815644 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
547+ let pmtInA = $t01551815644._1
548+ let pmtInB = $t01551815644._2
549+ let change = $t01551815644._3
550+ let changeId = $t01551815644._4
551+ let lpAmount = $t01551815644._5
550552 $Tuple3(change, changeId, lpAmount)
551553 }
552554 else if ((pmtA > 0))
553555 then $Tuple3(pmtA, aId, 0)
554556 else $Tuple3(pmtB, bId, 0)
555- let change = $t01533715678._1
556- let changeId = $t01533715678._2
557- let lpTwo = $t01533715678._3
558- let $t01568515901 = if ((change > 0))
557+ let change = $t01543715778._1
558+ let changeId = $t01543715778._2
559+ let lpTwo = $t01543715778._3
560+ let $t01578516001 = if ((change > 0))
559561 then {
560562 let inv = {
561563 let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil)
568570 else throw("Strict value is not equal to itself.")
569571 }
570572 else $Tuple2(0, 0)
571- let lpOne = $t01568515901._1
572- let loss = $t01568515901._2
573+ let lpOne = $t01578516001._1
574+ let loss = $t01578516001._2
573575 $Tuple2((lpTwo + lpOne), loss)
574576 }
575577 else throw("Wrong pool type")
578580
579581 func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = {
580582 let poolAddr = addressFromStringValue(pool)
581- let $t01619516695 = if ((pType == SF_POOL))
583+ let $t01629516795 = if ((pType == SF_POOL))
582584 then {
583585 let inv = {
584586 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil)
613615 else throw("Strict value is not equal to itself.")
614616 }
615617 else throw("Wrong pool type")
616- let getAmountA = $t01619516695._1
617- let getAmountB = $t01619516695._2
618+ let getAmountA = $t01629516795._1
619+ let getAmountB = $t01629516795._2
618620 if ((borrowAmount > 0))
619621 then {
620622 let amountToGetEx = if (if ((borrowAssetId == aId))
626628 else false)
627629 then (borrowAmount - getAmountB)
628630 else 0
629- let $t01697317276 = if ((amountToGetEx > 0))
631+ let $t01707317376 = if ((amountToGetEx > 0))
630632 then if ((pType == SF_POOL))
631633 then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
632634 else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
633635 else $Tuple2("", 0)
634- let assetToPay = $t01697317276._1
635- let amountToPay = $t01697317276._2
636+ let assetToPay = $t01707317376._1
637+ let amountToPay = $t01707317376._2
636638 if ((borrowAssetId == aId))
637639 then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay))
638640 else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount))
679681 if ((lpBalanceBefore == lpBalanceBefore))
680682 then {
681683 let poolAddr = addressFromStringValue(pool)
682- let $t01847318889 = if (if ((pmtA > 0))
684+ let $t01857318989 = if (if ((pmtA > 0))
683685 then (pmtB > 0)
684686 else false)
685687 then {
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
688+ let $t01863918755 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
689+ let pmtInA = $t01863918755._1
690+ let pmtInB = $t01863918755._2
691+ let change = $t01863918755._3
692+ let changeId = $t01863918755._4
691693 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
692694 if ((inv == inv))
693695 then $Tuple2(change, changeId)
698700 else if ((pmtB > 0))
699701 then $Tuple2(pmtB, bId)
700702 else throw("pmts must be > 0")
701- let change = $t01847318889._1
702- let changeId = $t01847318889._2
703+ let change = $t01857318989._1
704+ let changeId = $t01857318989._2
703705 let inv = if ((change > 0))
704706 then replenishOneTokenByType(poolAddr, pType, change, changeId)
705707 else nil
727729 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
728730 let totalAmount = getPoolTotalShare(pool)
729731 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
730- let $t01974719985 = if (withLoan)
732+ let $t01984720085 = if (withLoan)
731733 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
732734 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
733- let curPoolInterest = $t01974719985._1
734- let totalStakedWithLoan = $t01974719985._2
735+ let curPoolInterest = $t01984720085._1
736+ let totalStakedWithLoan = $t01984720085._2
735737 [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))]
736738 }
737739
777779
778780 func capitalize (pool,pType,tokenId,tokenAmount) = {
779781 let poolAddr = Address(fromBase58String(pool))
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
782+ let $t02243622502 = getPoolData(poolAddr, pType)
783+ let AId = $t02243622502._1
784+ let BId = $t02243622502._2
785+ let balA = $t02243622502._3
786+ let balB = $t02243622502._4
787+ let shareId = $t02243622502._5
786788 if (if ((tokenId != AId))
787789 then (tokenId != BId)
788790 else false)
789791 then throw("Wrong asset")
790792 else {
791- let $t02248722567 = if ((tokenId == AId))
793+ let $t02258722667 = if ((tokenId == AId))
792794 then $Tuple2(tokenAmount, 0)
793795 else $Tuple2(0, tokenAmount)
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
796+ let pmtA = $t02258722667._1
797+ let pmtB = $t02258722667._2
798+ let $t02267022774 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
799+ let stakedAmount = $t02267022774._1
800+ let nf = $t02267022774._2
799801 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
800802 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
801803 let totalShareAmount = getPoolTotalShare(pool)
822824 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
823825 let poolAddr = Address(fromBase58String(pool))
824826 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
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
827+ let $t02454224618 = getPoolData(poolAddr, pType)
828+ let assetIdA = $t02454224618._1
829+ let assetIdB = $t02454224618._2
830+ let balA = $t02454224618._3
831+ let balB = $t02454224618._4
832+ let shareId = $t02454224618._5
831833 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
832834 if ((cBalABefore == cBalABefore))
833835 then {
846848 then {
847849 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
848850 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
849- let $t02508125170 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
850- let tokensAmountA = $t02508125170._1
851- let tokensAmountB = $t02508125170._2
852- let $t02517325993 = if ((debt > 0))
851+ let $t02518125270 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
852+ let tokensAmountA = $t02518125270._1
853+ let tokensAmountB = $t02518125270._2
854+ let $t02527326093 = if ((debt > 0))
853855 then {
854856 let amountToGetEx = if (if ((borrowAsset == assetIdA))
855857 then (debt > tokensAmountA)
874876 else throw("Strict value is not equal to itself.")
875877 }
876878 else $Tuple2(tokensAmountA, tokensAmountB)
877- let toUserA = $t02517325993._1
878- let toUserB = $t02517325993._2
879+ let toUserA = $t02527326093._1
880+ let toUserB = $t02527326093._2
879881 $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
880882 }
881883 else throw("Strict value is not equal to itself.")
911913 else throw(($getType(@) + " couldn't be cast to Int"))
912914 }
913915 else 0
914- let $t02738127534 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
915- if (($t02738127534 == $t02738127534))
916+ let $t02748127634 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
917+ if (($t02748127634 == $t02748127634))
916918 then {
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
919+ let shareId = $t02748127634._7
920+ let cBalBAfter = $t02748127634._6
921+ let cBalAAfter = $t02748127634._5
922+ let assetIdB = $t02748127634._4
923+ let toUserAmountB = $t02748127634._3
924+ let assetIdA = $t02748127634._2
925+ let toUserAmountA = $t02748127634._1
924926 let closeDbtInv = if ((debt > 0))
925927 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
926928 else 0
961963 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
962964 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
963965 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
964- let $t02922029317 = if ((borrowId == aId))
966+ let $t02932029417 = if ((borrowId == aId))
965967 then $Tuple2(dPriceA, decPrA)
966968 else $Tuple2(dPriceB, decPrB)
967- let borrowPrice = $t02922029317._1
968- let borrowDecPr = $t02922029317._2
969+ let borrowPrice = $t02932029417._1
970+ let borrowDecPr = $t02932029417._2
969971 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
970972 }
971973
977979 then throw("Leverage can't be <100 and >300")
978980 else {
979981 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
982+ let $t02983529925 = getPoolData(Address(fromBase58String(pool)), pType)
983+ let AId = $t02983529925._1
984+ let BId = $t02983529925._2
985+ let balA = $t02983529925._3
986+ let balB = $t02983529925._4
987+ let shareId = $t02983529925._5
986988 let borrowAmount = if ((leverage > 100))
987989 then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
988990 else 0
989- let $t02996030067 = if ((borrowId == AId))
991+ let $t03006030167 = if ((borrowId == AId))
990992 then $Tuple2((pmtA + borrowAmount), pmtB)
991993 else $Tuple2(pmtA, (pmtB + borrowAmount))
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
994+ let payInA = $t03006030167._1
995+ let payInB = $t03006030167._2
996+ let $t03017030263 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
997+ let lpAmount = $t03017030263._1
998+ let loss = $t03017030263._2
997999 let impactMod = if ((0 > loss))
9981000 then (loss * -1)
9991001 else loss
10231025 @Callable(i)
10241026 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
10251027 func userPos (a,pool) = {
1026- let $t03097631010 = a
1027- let totalPos = $t03097631010._1
1028- let posDebt = $t03097631010._2
1029- let index = $t03097631010._3
1028+ let $t03107631110 = a
1029+ let totalPos = $t03107631110._1
1030+ let posDebt = $t03107631110._2
1031+ let index = $t03107631110._3
10301032 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
1033+ let $t03120231292 = getPoolData(Address(fromBase58String(pool)), pType)
1034+ let AId = $t03120231292._1
1035+ let BId = $t03120231292._2
1036+ let balA = $t03120231292._3
1037+ let balB = $t03120231292._4
1038+ let shareId = $t03120231292._5
10371039 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10381040 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
10391041 let sharePrices = getSharePrice(shareId)
10591061 }
10601062 }
10611063
1062- let $t03223532290 = {
1064+ let $t03233532390 = {
10631065 let $l = pools
10641066 let $s = size($l)
10651067 let $acc0 = $Tuple3(nil, nil, 0)
10731075
10741076 $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)
10751077 }
1076- let pos = $t03223532290._1
1077- let debt = $t03223532290._2
1078+ let pos = $t03233532390._1
1079+ let debt = $t03233532390._2
10781080 $Tuple2(nil, $Tuple2(pos, debt))
10791081 }
10801082
10851087 then true
10861088 else (leverage > 300))
10871089 then throw("Leverage can't be <100 and >300")
1088- else {
1089- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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))
1097- then if ((assetIdToStr(i.payments[0].assetId) != AId))
1098- then throw("Wrong payment asset A")
1099- else if ((assetIdToStr(i.payments[1].assetId) != BId))
1100- then throw("Wrong payment asset B")
1101- else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
1102- else if ((size(i.payments) == 1))
1103- then if ((assetIdToStr(i.payments[0].assetId) == AId))
1104- then $Tuple4(i.payments[0].amount, AId, 0, BId)
1105- else if ((assetIdToStr(i.payments[0].assetId) == BId))
1106- then $Tuple4(0, AId, i.payments[0].amount, BId)
1107- else throw("Wrong payment")
1108- else throw("One or two payments expected")
1109- let pmtA = $t03270633343._1
1110- let pmtAssetA = $t03270633343._2
1111- let pmtB = $t03270633343._3
1112- let pmtAssetB = $t03270633343._4
1113- let newPosNum = getNewUserPositionNumber(toString(i.caller))
1114- if ((leverage > 100))
1115- then {
1116- let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1117- let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1118- let newRequestId = {
1119- let @ = invoke(this, "createNewRequest", [request], nil)
1120- if ($isInstanceOf(@, "Int"))
1121- then @
1122- else throw(($getType(@) + " couldn't be cast to Int"))
1090+ else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
1091+ then (leverage > 100)
1092+ else false)
1093+ then throw("You can't borrow in this pool")
1094+ else {
1095+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1096+ let $t03283032920 = getPoolData(Address(fromBase58String(pool)), pType)
1097+ let AId = $t03283032920._1
1098+ let BId = $t03283032920._2
1099+ let balA = $t03283032920._3
1100+ let balB = $t03283032920._4
1101+ let shareId = $t03283032920._5
1102+ let $t03292333560 = if ((size(i.payments) == 2))
1103+ then if ((assetIdToStr(i.payments[0].assetId) != AId))
1104+ then throw("Wrong payment asset A")
1105+ else if ((assetIdToStr(i.payments[1].assetId) != BId))
1106+ then throw("Wrong payment asset B")
1107+ else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
1108+ else if ((size(i.payments) == 1))
1109+ then if ((assetIdToStr(i.payments[0].assetId) == AId))
1110+ then $Tuple4(i.payments[0].amount, AId, 0, BId)
1111+ else if ((assetIdToStr(i.payments[0].assetId) == BId))
1112+ then $Tuple4(0, AId, i.payments[0].amount, BId)
1113+ else throw("Wrong payment")
1114+ else throw("One or two payments expected")
1115+ let pmtA = $t03292333560._1
1116+ let pmtAssetA = $t03292333560._2
1117+ let pmtB = $t03292333560._3
1118+ let pmtAssetB = $t03292333560._4
1119+ let newPosNum = getNewUserPositionNumber(toString(i.caller))
1120+ if ((leverage > 100))
1121+ then {
1122+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1123+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1124+ let newRequestId = {
1125+ let @ = invoke(this, "createNewRequest", [request], nil)
1126+ if ($isInstanceOf(@, "Int"))
1127+ then @
1128+ else throw(($getType(@) + " couldn't be cast to Int"))
1129+ }
1130+ if ((newRequestId == newRequestId))
1131+ then {
1132+ let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1133+ let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1134+ if ((inv == inv))
1135+ then nil
1136+ else throw("Strict value is not equal to itself.")
1137+ }
1138+ else throw("Strict value is not equal to itself.")
11231139 }
1124- if ((newRequestId == newRequestId))
1125- then {
1126- let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1127- let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1128- if ((inv == inv))
1129- then nil
1130- else throw("Strict value is not equal to itself.")
1131- }
1132- else throw("Strict value is not equal to itself.")
1133- }
1134- else {
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
1138- (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
1139- }
1140- }
1140+ else {
1141+ let $t03448834600 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1142+ let userStaked = $t03448834600._1
1143+ let axlyFee = $t03448834600._2
1144+ (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
1145+ }
1146+ }
11411147
11421148
11431149
11871193
11881194 @Callable(i)
11891195 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
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
1196+ let $t03708037184 = parseRequest(requestId)
1197+ let user = $t03708037184._1
1198+ let pool = $t03708037184._2
1199+ let pmtA = $t03708037184._3
1200+ let AId = $t03708037184._4
1201+ let pmtB = $t03708037184._5
1202+ let BId = $t03708037184._6
1203+ let balA = $t03708037184._7
1204+ let balB = $t03708037184._8
1205+ let shareId = $t03708037184._9
1206+ let bwAsset = $t03708037184._10
1207+ let bwAmount = $t03708037184._11
12021208 if ((size(i.payments) != 1))
12031209 then throw("Wrong payment size")
12041210 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
12061212 else (i.payments[0].amount != bwAmount))
12071213 then throw("Wrong payment")
12081214 else {
1209- let $t03715737281 = if ((AId == bwAsset))
1215+ let $t03737437498 = if ((AId == bwAsset))
12101216 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
12111217 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1212- let pmtAllA = $t03715737281._1
1213- let pmtAllB = $t03715737281._2
1218+ let pmtAllA = $t03737437498._1
1219+ let pmtAllB = $t03737437498._2
12141220 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
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
1221+ let $t03758037695 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1222+ let userStaked = $t03758037695._1
1223+ let axlyFee = $t03758037695._2
12181224 let posNum = getNewUserPositionNumber(user)
12191225 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12201226 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
12281234 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
12291235 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12301236 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
1237+ let $t03847438564 = getPoolData(Address(fromBase58String(pool)), pType)
1238+ let AId = $t03847438564._1
1239+ let BId = $t03847438564._2
1240+ let balA = $t03847438564._3
1241+ let balB = $t03847438564._4
1242+ let shareId = $t03847438564._5
12371243 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12381244 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12391245 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12601266
12611267 @Callable(i)
12621268 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
1263- let $t04013340327 = if (claim)
1269+ let $t04035040544 = if (claim)
12641270 then claimFarmed(type, pool)
12651271 else {
12661272 let claimedAsset = if ((type == SF_POOL))
12681274 else WXID
12691275 $Tuple2(amountToExchange, claimedAsset)
12701276 }
1271- let claimedAmount = $t04013340327._1
1272- let claimedAsset = $t04013340327._2
1277+ let claimedAmount = $t04035040544._1
1278+ let claimedAsset = $t04035040544._2
12731279 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12741280 let change = (claimedAmount - amountToExchange)
12751281 let changeEntry = if ((change > 0))
12821288
12831289 @Callable(i)
12841290 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
1285- let $t04101241206 = if (claim)
1291+ let $t04122941423 = if (claim)
12861292 then claimFarmed(type, pool)
12871293 else {
12881294 let claimedAsset = if ((type == SF_POOL))
12901296 else WXID
12911297 $Tuple2(amountToExchange, claimedAsset)
12921298 }
1293- let claimedAmount = $t04101241206._1
1294- let claimedAsset = $t04101241206._2
1299+ let claimedAmount = $t04122941423._1
1300+ let claimedAsset = $t04122941423._2
12951301 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
12961302 let change = (claimedAmount - amountToExchange)
12971303 let changeEntry = if ((change > 0))
13041310
13051311 @Callable(i)
13061312 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
1307- let $t04195742151 = if (claim)
1313+ let $t04217442368 = if (claim)
13081314 then claimFarmed(type, pool)
13091315 else {
13101316 let claimedAsset = if ((type == SF_POOL))
13121318 else WXID
13131319 $Tuple2(amountToExchange, claimedAsset)
13141320 }
1315- let claimedAmount = $t04195742151._1
1316- let claimedAsset = $t04195742151._2
1321+ let claimedAmount = $t04217442368._1
1322+ let claimedAsset = $t04217442368._2
13171323 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13181324 let change = (claimedAmount - amountToExchange)
13191325 let changeEntry = if ((change > 0))
13251331
13261332
13271333 @Callable(i)
1328-func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
1334+func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
13291335 then (type != WX_POOL)
13301336 else false)
13311337 then throw("Wrong type")
13321338 else {
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
1339-[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)]
1339+ let $t04310943203 = getPoolData(Address(fromBase58String(poolAddr)), type)
1340+ let aId = $t04310943203._1
1341+ let bId = $t04310943203._2
1342+ let aBal = $t04310943203._3
1343+ let bBal = $t04310943203._4
1344+ let shareId = $t04310943203._5
1345+[IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)]
13401346 })
13411347
13421348
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"
63+
64+let kPoolCanBorrow = "_pool_can_borrow"
6365
6466 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
6567
6668 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
6769
6870 let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
6971
7072 let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
7173
7274 let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan"
7375
7476 let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan"
7577
7678 let kRequestId = "_request_id"
7779
7880 let kRequestIter = "requests_iter"
7981
8082 let kPool = "pool_"
8183
8284 let kSharePool = "_pool_share_id"
8385
8486 let kPoolCapChange = "_pool_cap_change"
8587
8688 let kTokenLastPrice = "last_price"
8789
8890 let kUserStopLoss = "_stop_loss"
8991
9092 let kMoneyBox = "axly_money_box"
9193
9294 let kSFFarmingAddr = "swopfi_farming_addr"
9395
9496 let kLendService = "lend_service_addr"
9597
9698 let kAdminCallPK = "admin_call_pub_key"
9799
98100 let kPriceOracle = "price_oracle"
99101
100102 let kExContract = "exchange_contract"
101103
102104 let kWxSwapContract = "wx_swap_contract"
103105
104106 let kSwopId = "swop_id"
105107
106108 let kWxId = "wx_id"
107109
108110 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
109111
110112 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
111113
112114 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
113115
114116 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
115117
116118 let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id"))
117119
118120 let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id"))
119121
120122 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
121123
122124
123125 func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr")))
124126
125127
126128 func isAdminCall (i) = if ((i.caller == getAdminCallAddr()))
127129 then unit
128130 else throw("Only admin can call this function")
129131
130132
131133 func isSelfCall (i) = if ((i.caller == this))
132134 then unit
133135 else throw("Only contract itself can call this function")
134136
135137
136138 func isLandCall (i) = if ((i.caller == getLendSrvAddr()))
137139 then unit
138140 else throw("Only land contract can call this function")
139141
140142
141143 func accountBalance (assetId) = match assetId {
142144 case id: ByteVector =>
143145 assetBalance(this, id)
144146 case waves: Unit =>
145147 wavesBalance(this).available
146148 case _ =>
147149 throw("Match error")
148150 }
149151
150152
151153 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"))
152154
153155
154156 func getWXPoolData (poolAddr) = {
155157 let cfg = {
156158 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
157159 if ($isInstanceOf(@, "List[Any]"))
158160 then @
159161 else throw(($getType(@) + " couldn't be cast to List[Any]"))
160162 }
161163 if ((cfg == cfg))
162164 then {
163165 let aId = valueOrErrorMessage({
164166 let @ = cfg[4]
165167 if ($isInstanceOf(@, "String"))
166168 then @
167169 else unit
168170 }, "Can't get pool A asset id")
169171 let bId = valueOrErrorMessage({
170172 let @ = cfg[5]
171173 if ($isInstanceOf(@, "String"))
172174 then @
173175 else unit
174176 }, "Can't get pool B asset id")
175177 let shareId = valueOrErrorMessage({
176178 let @ = cfg[3]
177179 if ($isInstanceOf(@, "String"))
178180 then @
179181 else unit
180182 }, "Can't get pool LP asset id")
181183 let balA = {
182184 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
183185 if ($isInstanceOf(@, "Int"))
184186 then @
185187 else throw(($getType(@) + " couldn't be cast to Int"))
186188 }
187189 if ((balA == balA))
188190 then {
189191 let balB = {
190192 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
191193 if ($isInstanceOf(@, "Int"))
192194 then @
193195 else throw(($getType(@) + " couldn't be cast to Int"))
194196 }
195197 if ((balB == balB))
196198 then $Tuple5(aId, bId, balA, balB, shareId)
197199 else throw("Strict value is not equal to itself.")
198200 }
199201 else throw("Strict value is not equal to itself.")
200202 }
201203 else throw("Strict value is not equal to itself.")
202204 }
203205
204206
205207 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
206208 then getSFPoolData(poolAddr)
207209 else if ((type == WX_POOL))
208210 then getWXPoolData(poolAddr)
209211 else throw("Wrong pool type")
210212
211213
212214 func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
213215 then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
214216 else if ((type == WX_POOL))
215217 then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
216218 else throw("Wrong pool type")
217219
218220
219221 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
220222
221223
222224 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
223225
224226
225227 func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1)
226228
227229
228230 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
229231 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
230232 else if ((feeType == CAP_FEE_NO_LOAN))
231233 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
232234 else if ((feeType == LOAN_FEE))
233235 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
234236 else if ((feeType == NO_LOAN_FEE))
235237 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
236238 else if ((feeType == NO_FEE))
237239 then 0
238240 else throw("Wrong fee type")
239241
240242
241243 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
242244
243245
244246 func getWXFarmingAddr (poolAddr) = {
245247 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
246248 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
247249 Address(fromBase58String(factroyCfg[1]))
248250 }
249251
250252
251253 func assetIdToStr (assetId) = match assetId {
252254 case id: ByteVector =>
253255 toBase58String(id)
254256 case waves: Unit =>
255257 "WAVES"
256258 case _ =>
257259 throw("Not Asset id")
258260 }
259261
260262
261263 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
262264 then unit
263265 else fromBase58String(assetId)
264266
265267
266268 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
267269 then 8
268270 else match assetInfo(fromBase58String(assetId)) {
269271 case asset: Asset =>
270272 asset.decimals
271273 case _ =>
272274 throw("Can't find asset")
273275 }
274276
275277
276278 func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
277279
278280
279281 func getAssetsPrice (assetIds) = {
280282 func getPrices (a,assetId) = {
281283 let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
282284 if ($isInstanceOf(@, "(Int, Int)"))
283285 then @
284286 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
285287 (a :+ assetPrice)
286288 }
287289
288290 let $l = assetIds
289291 let $s = size($l)
290292 let $acc0 = nil
291293 func $f0_1 ($a,$i) = if (($i >= $s))
292294 then $a
293295 else getPrices($a, $l[$i])
294296
295297 func $f0_2 ($a,$i) = if (($i >= $s))
296298 then $a
297299 else throw("List size exceeds 50")
298300
299301 $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)
300302 }
301303
302304
303305 func getSharePrice (shareId) = {
304306 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
305307 let poolAddr = Address(fromBase58String(pool))
306308 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
309+ let $t090179082 = getPoolData(poolAddr, pType)
310+ let aId = $t090179082._1
311+ let bId = $t090179082._2
312+ let aBalance = $t090179082._3
313+ let bBalance = $t090179082._4
312314 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
313315 if ($isInstanceOf(@, "(Int, Int)"))
314316 then @
315317 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
316318 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
317319 if ($isInstanceOf(@, "(Int, Int)"))
318320 then @
319321 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
320322 let shareSupply = getShareSupply(poolAddr, pType, shareId)
321323 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
322324 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
323325 let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
324326 let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
325327 fraction(sum, sharePrecision, shareSupply)
326328 }
327329
328330
329331 func getSharePrices (shareIds) = {
330332 func getPrices (a,shareId) = (a :+ getSharePrice(shareId))
331333
332334 let $l = shareIds
333335 let $s = size($l)
334336 let $acc0 = nil
335337 func $f0_1 ($a,$i) = if (($i >= $s))
336338 then $a
337339 else getPrices($a, $l[$i])
338340
339341 func $f0_2 ($a,$i) = if (($i >= $s))
340342 then $a
341343 else throw("List size exceeds 20")
342344
343345 $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)
344346 }
345347
346348
347349 func getCursEntries (aId,bId,shareId) = {
348350 let assetsPrices = getAssetsPrice([aId, bId])
349351 let sharePrice = getSharePrice(shareId)
350352 let prices = [toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)]
351353 [StringEntry(kTokenLastPrice, makeString(prices, ","))]
352354 }
353355
354356
355357 func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL))
356358 then {
357359 let repl = {
358360 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil)
359361 if ($isInstanceOf(@, "List[Any]"))
360362 then @
361363 else throw(($getType(@) + " couldn't be cast to List[Any]"))
362364 }
363365 if ((repl == repl))
364366 then $Tuple5({
365367 let @ = repl[3]
366368 if ($isInstanceOf(@, "Int"))
367369 then @
368370 else throw(($getType(@) + " couldn't be cast to Int"))
369371 }, {
370372 let @ = repl[4]
371373 if ($isInstanceOf(@, "Int"))
372374 then @
373375 else throw(($getType(@) + " couldn't be cast to Int"))
374376 }, {
375377 let @ = repl[1]
376378 if ($isInstanceOf(@, "Int"))
377379 then @
378380 else throw(($getType(@) + " couldn't be cast to Int"))
379381 }, assetIdToStr(repl[2]), {
380382 let @ = repl[0]
381383 if ($isInstanceOf(@, "Int"))
382384 then @
383385 else throw(($getType(@) + " couldn't be cast to Int"))
384386 })
385387 else throw("Strict value is not equal to itself.")
386388 }
387389 else {
388- let $t01051210762 = $Tuple2(split({
390+ let $t01061210862 = $Tuple2(split({
389391 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
390392 if ($isInstanceOf(@, "String"))
391393 then @
392394 else throw(($getType(@) + " couldn't be cast to String"))
393395 }, "__"), split({
394396 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
395397 if ($isInstanceOf(@, "String"))
396398 then @
397399 else throw(($getType(@) + " couldn't be cast to String"))
398400 }, "__"))
399- if (($t01051210762 == $t01051210762))
401+ if (($t01061210862 == $t01061210862))
400402 then {
401- let evalPutInB = $t01051210762._2
402- let evalPutInA = $t01051210762._1
403+ let evalPutInB = $t01061210862._2
404+ let evalPutInA = $t01061210862._1
403405 let lpInA = parseIntValue(evalPutInA[1])
404406 let lpInB = parseIntValue(evalPutInB[1])
405407 if ((lpInB > lpInA))
406408 then {
407409 let pmt = parseIntValue(evalPutInA[8])
408410 $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB)
409411 }
410412 else {
411413 let pmt = parseIntValue(evalPutInA[8])
412414 $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA)
413415 }
414416 }
415417 else throw("Strict value is not equal to itself.")
416418 }
417419
418420
419421 func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
420422 let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
421423 if ((pType == SF_POOL))
422424 then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
423425 else invoke(poolAddr, "put", [1000000, false], payments)
424426 }
425427
426428
427429 func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
428430 let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
429431 if ((pType == SF_POOL))
430432 then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
431433 else invoke(poolAddr, "putOneTkn", [0, false], payments)
432434 }
433435
434436
435437 func stakeLP (pool,pType,shareId,amount) = {
436438 let payments = [AttachedPayment(fromBase58String(shareId), amount)]
437439 if ((pType == SF_POOL))
438440 then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
439441 else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
440442 }
441443
442444
443445 func unstakeLP (pool,pType,shareId,amount) = {
444- let $t01224712604 = if ((pType == SF_POOL))
446+ let $t01234712704 = if ((pType == SF_POOL))
445447 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
446448 else if ((pType == WX_POOL))
447449 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
448450 else throw("Wrong pool type")
449- let farmAddr = $t01224712604._1
450- let fName = $t01224712604._2
451- let params = $t01224712604._3
451+ let farmAddr = $t01234712704._1
452+ let fName = $t01234712704._2
453+ let params = $t01234712704._3
452454 let inv = invoke(farmAddr, fName, params, nil)
453455 if ((inv == inv))
454456 then amount
455457 else throw("Strict value is not equal to itself.")
456458 }
457459
458460
459461 func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
460462 let poolAddr = Address(fromBase58String(pool))
461463 let feeScale6 = 1000000
462464 let fee = getIntegerValue(poolAddr, kSFPoolFee)
463465 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
464- let $t01301713305 = if ((assetTokenToGet == assetIdA))
466+ let $t01311713405 = if ((assetTokenToGet == assetIdA))
465467 then {
466468 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee))
467469 $Tuple2(amountToPay, assetIdB)
468470 }
469471 else {
470472 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee))
471473 $Tuple2(amountToPay, assetIdA)
472474 }
473- let amountToPay = $t01301713305._1
474- let assetToPay = $t01301713305._2
475+ let amountToPay = $t01311713405._1
476+ let assetToPay = $t01311713405._2
475477 $Tuple2(assetToPay, amountToPay)
476478 }
477479
478480
479481 func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
480482 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
481483 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
482484 let feeScale = toBigInt(100000000)
483- let $t01364413952 = if ((assetTokenToGet == assetIdA))
485+ let $t01374414052 = if ((assetTokenToGet == assetIdA))
484486 then {
485487 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
486488 $Tuple2(amountToPay, assetIdB)
487489 }
488490 else {
489491 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
490492 $Tuple2(amountToPay, assetIdA)
491493 }
492- let amountToPay = $t01364413952._1
493- let assetToPay = $t01364413952._2
494+ let amountToPay = $t01374414052._1
495+ let assetToPay = $t01374414052._2
494496 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
495497 $Tuple2(assetToPay, fraction(amountToPayWithFee, 102, 100))
496498 }
497499
498500
499501 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
500502 then {
501- let $t01431514437 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
502- let assetToPay = $t01431514437._1
503- let amountToPay = $t01431514437._2
503+ let $t01441514537 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
504+ let assetToPay = $t01441514537._1
505+ let amountToPay = $t01441514537._2
504506 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
505507 }
506508 else {
507- let $t01461214734 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
508- let assetToPay = $t01461214734._1
509- let amountToPay = $t01461214734._2
509+ let $t01471214834 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
510+ let assetToPay = $t01471214834._1
511+ let amountToPay = $t01471214834._2
510512 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
511513 }
512514
513515
514516 func calcReplenishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = {
515517 let poolAddr = addressFromStringValue(pool)
516518 if ((pType == SF_POOL))
517519 then {
518520 let inv = {
519521 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(pmtA), toString(pmtB), "0"]], nil)
520522 if ($isInstanceOf(@, "List[Any]"))
521523 then @
522524 else throw(($getType(@) + " couldn't be cast to List[Any]"))
523525 }
524526 if ((inv == inv))
525527 then $Tuple2({
526528 let @ = inv[0]
527529 if ($isInstanceOf(@, "Int"))
528530 then @
529531 else throw(($getType(@) + " couldn't be cast to Int"))
530532 }, {
531533 let @ = inv[1]
532534 if ($isInstanceOf(@, "Int"))
533535 then @
534536 else throw(($getType(@) + " couldn't be cast to Int"))
535537 })
536538 else throw("Strict value is not equal to itself.")
537539 }
538540 else if ((pType == WX_POOL))
539541 then {
540- let $t01533715678 = if (if ((pmtA > 0))
542+ let $t01543715778 = if (if ((pmtA > 0))
541543 then (pmtB > 0)
542544 else false)
543545 then {
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
546+ let $t01551815644 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
547+ let pmtInA = $t01551815644._1
548+ let pmtInB = $t01551815644._2
549+ let change = $t01551815644._3
550+ let changeId = $t01551815644._4
551+ let lpAmount = $t01551815644._5
550552 $Tuple3(change, changeId, lpAmount)
551553 }
552554 else if ((pmtA > 0))
553555 then $Tuple3(pmtA, aId, 0)
554556 else $Tuple3(pmtB, bId, 0)
555- let change = $t01533715678._1
556- let changeId = $t01533715678._2
557- let lpTwo = $t01533715678._3
558- let $t01568515901 = if ((change > 0))
557+ let change = $t01543715778._1
558+ let changeId = $t01543715778._2
559+ let lpTwo = $t01543715778._3
560+ let $t01578516001 = if ((change > 0))
559561 then {
560562 let inv = {
561563 let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil)
562564 if ($isInstanceOf(@, "(Int, Int, Int)"))
563565 then @
564566 else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)"))
565567 }
566568 if ((inv == inv))
567569 then $Tuple2(inv._1, inv._3)
568570 else throw("Strict value is not equal to itself.")
569571 }
570572 else $Tuple2(0, 0)
571- let lpOne = $t01568515901._1
572- let loss = $t01568515901._2
573+ let lpOne = $t01578516001._1
574+ let loss = $t01578516001._2
573575 $Tuple2((lpTwo + lpOne), loss)
574576 }
575577 else throw("Wrong pool type")
576578 }
577579
578580
579581 func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = {
580582 let poolAddr = addressFromStringValue(pool)
581- let $t01619516695 = if ((pType == SF_POOL))
583+ let $t01629516795 = if ((pType == SF_POOL))
582584 then {
583585 let inv = {
584586 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil)
585587 if ($isInstanceOf(@, "List[Any]"))
586588 then @
587589 else throw(($getType(@) + " couldn't be cast to List[Any]"))
588590 }
589591 if ((inv == inv))
590592 then $Tuple2({
591593 let @ = inv[0]
592594 if ($isInstanceOf(@, "Int"))
593595 then @
594596 else throw(($getType(@) + " couldn't be cast to Int"))
595597 }, {
596598 let @ = inv[1]
597599 if ($isInstanceOf(@, "Int"))
598600 then @
599601 else throw(($getType(@) + " couldn't be cast to Int"))
600602 })
601603 else throw("Strict value is not equal to itself.")
602604 }
603605 else if ((pType == WX_POOL))
604606 then {
605607 let get = split({
606608 let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, lpAmount], nil)
607609 if ($isInstanceOf(@, "String"))
608610 then @
609611 else throw(($getType(@) + " couldn't be cast to String"))
610612 }, "__")
611613 if ((get == get))
612614 then $Tuple2(parseIntValue(get[1]), parseIntValue(get[2]))
613615 else throw("Strict value is not equal to itself.")
614616 }
615617 else throw("Wrong pool type")
616- let getAmountA = $t01619516695._1
617- let getAmountB = $t01619516695._2
618+ let getAmountA = $t01629516795._1
619+ let getAmountB = $t01629516795._2
618620 if ((borrowAmount > 0))
619621 then {
620622 let amountToGetEx = if (if ((borrowAssetId == aId))
621623 then (borrowAmount > getAmountA)
622624 else false)
623625 then (borrowAmount - getAmountA)
624626 else if (if ((borrowAssetId == bId))
625627 then (borrowAmount > getAmountB)
626628 else false)
627629 then (borrowAmount - getAmountB)
628630 else 0
629- let $t01697317276 = if ((amountToGetEx > 0))
631+ let $t01707317376 = if ((amountToGetEx > 0))
630632 then if ((pType == SF_POOL))
631633 then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
632634 else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
633635 else $Tuple2("", 0)
634- let assetToPay = $t01697317276._1
635- let amountToPay = $t01697317276._2
636+ let assetToPay = $t01707317376._1
637+ let amountToPay = $t01707317376._2
636638 if ((borrowAssetId == aId))
637639 then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay))
638640 else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount))
639641 }
640642 else $Tuple2(getAmountA, getAmountB)
641643 }
642644
643645
644646 func claimFarmed (type,pool) = if ((type == SF_POOL))
645647 then {
646648 let balBefore = accountBalance(SWOPID)
647649 if ((balBefore == balBefore))
648650 then {
649651 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
650652 if ((inv == inv))
651653 then {
652654 let balAfter = accountBalance(SWOPID)
653655 $Tuple2((balAfter - balBefore), SWOPID)
654656 }
655657 else throw("Strict value is not equal to itself.")
656658 }
657659 else throw("Strict value is not equal to itself.")
658660 }
659661 else if ((type == WX_POOL))
660662 then {
661663 let balBefore = accountBalance(WXID)
662664 if ((balBefore == balBefore))
663665 then {
664666 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
665667 if ((inv == inv))
666668 then {
667669 let balAfter = accountBalance(WXID)
668670 $Tuple2((balAfter - balBefore), WXID)
669671 }
670672 else throw("Strict value is not equal to itself.")
671673 }
672674 else throw("Strict value is not equal to itself.")
673675 }
674676 else throw("Wrong pool type")
675677
676678
677679 func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
678680 let lpBalanceBefore = accountBalance(fromBase58String(LPId))
679681 if ((lpBalanceBefore == lpBalanceBefore))
680682 then {
681683 let poolAddr = addressFromStringValue(pool)
682- let $t01847318889 = if (if ((pmtA > 0))
684+ let $t01857318989 = if (if ((pmtA > 0))
683685 then (pmtB > 0)
684686 else false)
685687 then {
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
688+ let $t01863918755 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
689+ let pmtInA = $t01863918755._1
690+ let pmtInB = $t01863918755._2
691+ let change = $t01863918755._3
692+ let changeId = $t01863918755._4
691693 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
692694 if ((inv == inv))
693695 then $Tuple2(change, changeId)
694696 else throw("Strict value is not equal to itself.")
695697 }
696698 else if ((pmtA > 0))
697699 then $Tuple2(pmtA, aId)
698700 else if ((pmtB > 0))
699701 then $Tuple2(pmtB, bId)
700702 else throw("pmts must be > 0")
701- let change = $t01847318889._1
702- let changeId = $t01847318889._2
703+ let change = $t01857318989._1
704+ let changeId = $t01857318989._2
703705 let inv = if ((change > 0))
704706 then replenishOneTokenByType(poolAddr, pType, change, changeId)
705707 else nil
706708 if ((inv == inv))
707709 then {
708710 let lpBalanceAfter = accountBalance(fromBase58String(LPId))
709711 let totalStaked = (lpBalanceAfter - lpBalanceBefore)
710712 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
711713 let userShareForStake = (totalStaked - axlyFeeAmount)
712714 if ((0 >= userShareForStake))
713715 then throw("amount of staked sharetokens must be > 0")
714716 else {
715717 let invLP = stakeLP(pool, pType, LPId, userShareForStake)
716718 if ((invLP == invLP))
717719 then $Tuple2(userShareForStake, axlyFeeAmount)
718720 else throw("Strict value is not equal to itself.")
719721 }
720722 }
721723 else throw("Strict value is not equal to itself.")
722724 }
723725 else throw("Strict value is not equal to itself.")
724726 }
725727
726728
727729 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
728730 let totalAmount = getPoolTotalShare(pool)
729731 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
730- let $t01974719985 = if (withLoan)
732+ let $t01984720085 = if (withLoan)
731733 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
732734 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
733- let curPoolInterest = $t01974719985._1
734- let totalStakedWithLoan = $t01974719985._2
735+ let curPoolInterest = $t01984720085._1
736+ let totalStakedWithLoan = $t01984720085._2
735737 [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))]
736738 }
737739
738740
739741 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
740742 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
741743 if ((tokenBalanceBefore == tokenBalanceBefore))
742744 then {
743745 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
744746 if ((inv == inv))
745747 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
746748 else throw("Strict value is not equal to itself.")
747749 }
748750 else throw("Strict value is not equal to itself.")
749751 }
750752
751753
752754 func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
753755 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
754756 if ((tokenBalanceBefore == tokenBalanceBefore))
755757 then {
756758 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
757759 if ((inv == inv))
758760 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
759761 else throw("Strict value is not equal to itself.")
760762 }
761763 else throw("Strict value is not equal to itself.")
762764 }
763765
764766
765767 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
766768 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
767769 if ((tokenBalanceBefore == tokenBalanceBefore))
768770 then {
769771 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
770772 if ((inv == inv))
771773 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
772774 else throw("Strict value is not equal to itself.")
773775 }
774776 else throw("Strict value is not equal to itself.")
775777 }
776778
777779
778780 func capitalize (pool,pType,tokenId,tokenAmount) = {
779781 let poolAddr = Address(fromBase58String(pool))
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
782+ let $t02243622502 = getPoolData(poolAddr, pType)
783+ let AId = $t02243622502._1
784+ let BId = $t02243622502._2
785+ let balA = $t02243622502._3
786+ let balB = $t02243622502._4
787+ let shareId = $t02243622502._5
786788 if (if ((tokenId != AId))
787789 then (tokenId != BId)
788790 else false)
789791 then throw("Wrong asset")
790792 else {
791- let $t02248722567 = if ((tokenId == AId))
793+ let $t02258722667 = if ((tokenId == AId))
792794 then $Tuple2(tokenAmount, 0)
793795 else $Tuple2(0, tokenAmount)
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
796+ let pmtA = $t02258722667._1
797+ let pmtB = $t02258722667._2
798+ let $t02267022774 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
799+ let stakedAmount = $t02267022774._1
800+ let nf = $t02267022774._2
799801 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
800802 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
801803 let totalShareAmount = getPoolTotalShare(pool)
802804 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
803805 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
804806 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
805807 let stakedNoLoan = (stakedAmount - stakedLoan)
806808 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
807809 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
808810 else 0
809811 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
810812 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
811813 else 0
812814 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
813815 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
814816 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
815817 if ((axlyFee == axlyFee))
816818 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))
817819 else throw("Strict value is not equal to itself.")
818820 }
819821 }
820822
821823
822824 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
823825 let poolAddr = Address(fromBase58String(pool))
824826 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
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
827+ let $t02454224618 = getPoolData(poolAddr, pType)
828+ let assetIdA = $t02454224618._1
829+ let assetIdB = $t02454224618._2
830+ let balA = $t02454224618._3
831+ let balB = $t02454224618._4
832+ let shareId = $t02454224618._5
831833 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
832834 if ((cBalABefore == cBalABefore))
833835 then {
834836 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
835837 if ((cBalBBefore == cBalBBefore))
836838 then {
837839 let inv = if ((pType == SF_POOL))
838840 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
839841 else {
840842 let inv = unstakeLP(pool, pType, shareId, userCanWithdraw)
841843 if ((inv == inv))
842844 then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)])
843845 else throw("Strict value is not equal to itself.")
844846 }
845847 if ((inv == inv))
846848 then {
847849 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
848850 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
849- let $t02508125170 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
850- let tokensAmountA = $t02508125170._1
851- let tokensAmountB = $t02508125170._2
852- let $t02517325993 = if ((debt > 0))
851+ let $t02518125270 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
852+ let tokensAmountA = $t02518125270._1
853+ let tokensAmountB = $t02518125270._2
854+ let $t02527326093 = if ((debt > 0))
853855 then {
854856 let amountToGetEx = if (if ((borrowAsset == assetIdA))
855857 then (debt > tokensAmountA)
856858 else false)
857859 then (debt - tokensAmountA)
858860 else if (if ((borrowAsset == assetIdB))
859861 then (debt > tokensAmountB)
860862 else false)
861863 then (debt - tokensAmountB)
862864 else 0
863865 let exInv = if ((amountToGetEx > 0))
864866 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
865867 else 0
866868 if ((exInv == exInv))
867869 then {
868870 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
869871 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
870872 if ((borrowAsset == assetIdA))
871873 then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore))
872874 else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt))
873875 }
874876 else throw("Strict value is not equal to itself.")
875877 }
876878 else $Tuple2(tokensAmountA, tokensAmountB)
877- let toUserA = $t02517325993._1
878- let toUserB = $t02517325993._2
879+ let toUserA = $t02527326093._1
880+ let toUserB = $t02527326093._2
879881 $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
880882 }
881883 else throw("Strict value is not equal to itself.")
882884 }
883885 else throw("Strict value is not equal to itself.")
884886 }
885887 else throw("Strict value is not equal to itself.")
886888 }
887889
888890
889891 func userCanWithdrawShareCalc (user,pool,posId,borrowed) = {
890892 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
891893 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
892894 let poolInterest = if (borrowed)
893895 then getIntegerValue(this, (pool + kPoolInterestLoan))
894896 else getIntegerValue(this, (pool + kPoolInterestNoLoan))
895897 (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10))
896898 }
897899
898900
899901 func withdrawToUser (user,pool,posId,stopLoss) = {
900902 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
901903 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0)
902904 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
903905 let poolTotalShare = getPoolTotalShare(pool)
904906 let userAddr = Address(fromBase58String(user))
905907 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
906908 let debt = if ((borrowAmount > 0))
907909 then {
908910 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil)
909911 if ($isInstanceOf(@, "Int"))
910912 then @
911913 else throw(($getType(@) + " couldn't be cast to Int"))
912914 }
913915 else 0
914- let $t02738127534 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
915- if (($t02738127534 == $t02738127534))
916+ let $t02748127634 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
917+ if (($t02748127634 == $t02748127634))
916918 then {
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
919+ let shareId = $t02748127634._7
920+ let cBalBAfter = $t02748127634._6
921+ let cBalAAfter = $t02748127634._5
922+ let assetIdB = $t02748127634._4
923+ let toUserAmountB = $t02748127634._3
924+ let assetIdA = $t02748127634._2
925+ let toUserAmountA = $t02748127634._1
924926 let closeDbtInv = if ((debt > 0))
925927 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
926928 else 0
927929 if ((closeDbtInv == closeDbtInv))
928930 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))
929931 else throw("Strict value is not equal to itself.")
930932 }
931933 else throw("Strict value is not equal to itself.")
932934 }
933935
934936
935937 func parseRequest (requestId) = {
936938 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
937939 let user = request[0]
938940 let pool = request[1]
939941 let pmtA = parseIntValue(request[2])
940942 let AId = request[3]
941943 let pmtB = parseIntValue(request[4])
942944 let BId = request[5]
943945 let balA = parseIntValue(request[6])
944946 let balB = parseIntValue(request[7])
945947 let shareId = request[8]
946948 let bwAsset = request[9]
947949 let bwAmount = parseIntValue(request[10])
948950 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
949951 }
950952
951953
952954 func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
953955 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
954956 if ($isInstanceOf(@, "(Int, Int)"))
955957 then @
956958 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
957959 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
958960 if ($isInstanceOf(@, "(Int, Int)"))
959961 then @
960962 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
961963 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
962964 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
963965 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
964- let $t02922029317 = if ((borrowId == aId))
966+ let $t02932029417 = if ((borrowId == aId))
965967 then $Tuple2(dPriceA, decPrA)
966968 else $Tuple2(dPriceB, decPrB)
967- let borrowPrice = $t02922029317._1
968- let borrowDecPr = $t02922029317._2
969+ let borrowPrice = $t02932029417._1
970+ let borrowDecPr = $t02932029417._2
969971 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
970972 }
971973
972974
973975 @Callable(i)
974976 func calcPriceImpactEVALONLY (pool,leverage,borrowId,pmtA,pmtB) = if (if ((100 > leverage))
975977 then true
976978 else (leverage > 300))
977979 then throw("Leverage can't be <100 and >300")
978980 else {
979981 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
982+ let $t02983529925 = getPoolData(Address(fromBase58String(pool)), pType)
983+ let AId = $t02983529925._1
984+ let BId = $t02983529925._2
985+ let balA = $t02983529925._3
986+ let balB = $t02983529925._4
987+ let shareId = $t02983529925._5
986988 let borrowAmount = if ((leverage > 100))
987989 then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
988990 else 0
989- let $t02996030067 = if ((borrowId == AId))
991+ let $t03006030167 = if ((borrowId == AId))
990992 then $Tuple2((pmtA + borrowAmount), pmtB)
991993 else $Tuple2(pmtA, (pmtB + borrowAmount))
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
994+ let payInA = $t03006030167._1
995+ let payInB = $t03006030167._2
996+ let $t03017030263 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
997+ let lpAmount = $t03017030263._1
998+ let loss = $t03017030263._2
997999 let impactMod = if ((0 > loss))
9981000 then (loss * -1)
9991001 else loss
10001002 $Tuple2(nil, [impactMod])
10011003 }
10021004
10031005
10041006
10051007 @Callable(i)
10061008 func getShareAssetPriceREADONLY (shareId) = {
10071009 let sharePrices = getSharePrice(shareId)
10081010 $Tuple2(nil, sharePrices)
10091011 }
10101012
10111013
10121014
10131015 @Callable(i)
10141016 func getUserPositionShareAmountREADONLY (user,posNum) = {
10151017 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position")
10161018 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount))
10171019 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0))
10181020 $Tuple2(nil, userCanWithdraw)
10191021 }
10201022
10211023
10221024
10231025 @Callable(i)
10241026 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
10251027 func userPos (a,pool) = {
1026- let $t03097631010 = a
1027- let totalPos = $t03097631010._1
1028- let posDebt = $t03097631010._2
1029- let index = $t03097631010._3
1028+ let $t03107631110 = a
1029+ let totalPos = $t03107631110._1
1030+ let posDebt = $t03107631110._2
1031+ let index = $t03107631110._3
10301032 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
1033+ let $t03120231292 = getPoolData(Address(fromBase58String(pool)), pType)
1034+ let AId = $t03120231292._1
1035+ let BId = $t03120231292._2
1036+ let balA = $t03120231292._3
1037+ let balB = $t03120231292._4
1038+ let shareId = $t03120231292._5
10371039 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10381040 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
10391041 let sharePrices = getSharePrice(shareId)
10401042 let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
10411043 let shareD = fraction(userCanWithdraw, sharePrices, decPrShare)
10421044 if ((borrowAmount == 0))
10431045 then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1))
10441046 else {
10451047 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId))
10461048 let debt = {
10471049 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil)
10481050 if ($isInstanceOf(@, "Int"))
10491051 then @
10501052 else throw(($getType(@) + " couldn't be cast to Int"))
10511053 }
10521054 let borrowAssetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [borrowAsset, false], nil)
10531055 if ($isInstanceOf(@, "(Int, Int)"))
10541056 then @
10551057 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
10561058 let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN)
10571059 let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId)
10581060 $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1))
10591061 }
10601062 }
10611063
1062- let $t03223532290 = {
1064+ let $t03233532390 = {
10631065 let $l = pools
10641066 let $s = size($l)
10651067 let $acc0 = $Tuple3(nil, nil, 0)
10661068 func $f0_1 ($a,$i) = if (($i >= $s))
10671069 then $a
10681070 else userPos($a, $l[$i])
10691071
10701072 func $f0_2 ($a,$i) = if (($i >= $s))
10711073 then $a
10721074 else throw("List size exceeds 20")
10731075
10741076 $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)
10751077 }
1076- let pos = $t03223532290._1
1077- let debt = $t03223532290._2
1078+ let pos = $t03233532390._1
1079+ let debt = $t03233532390._2
10781080 $Tuple2(nil, $Tuple2(pos, debt))
10791081 }
10801082
10811083
10821084
10831085 @Callable(i)
10841086 func replenish (pool,leverage,borrowId) = if (if ((100 > leverage))
10851087 then true
10861088 else (leverage > 300))
10871089 then throw("Leverage can't be <100 and >300")
1088- else {
1089- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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))
1097- then if ((assetIdToStr(i.payments[0].assetId) != AId))
1098- then throw("Wrong payment asset A")
1099- else if ((assetIdToStr(i.payments[1].assetId) != BId))
1100- then throw("Wrong payment asset B")
1101- else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
1102- else if ((size(i.payments) == 1))
1103- then if ((assetIdToStr(i.payments[0].assetId) == AId))
1104- then $Tuple4(i.payments[0].amount, AId, 0, BId)
1105- else if ((assetIdToStr(i.payments[0].assetId) == BId))
1106- then $Tuple4(0, AId, i.payments[0].amount, BId)
1107- else throw("Wrong payment")
1108- else throw("One or two payments expected")
1109- let pmtA = $t03270633343._1
1110- let pmtAssetA = $t03270633343._2
1111- let pmtB = $t03270633343._3
1112- let pmtAssetB = $t03270633343._4
1113- let newPosNum = getNewUserPositionNumber(toString(i.caller))
1114- if ((leverage > 100))
1115- then {
1116- let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1117- let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1118- let newRequestId = {
1119- let @ = invoke(this, "createNewRequest", [request], nil)
1120- if ($isInstanceOf(@, "Int"))
1121- then @
1122- else throw(($getType(@) + " couldn't be cast to Int"))
1090+ else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
1091+ then (leverage > 100)
1092+ else false)
1093+ then throw("You can't borrow in this pool")
1094+ else {
1095+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1096+ let $t03283032920 = getPoolData(Address(fromBase58String(pool)), pType)
1097+ let AId = $t03283032920._1
1098+ let BId = $t03283032920._2
1099+ let balA = $t03283032920._3
1100+ let balB = $t03283032920._4
1101+ let shareId = $t03283032920._5
1102+ let $t03292333560 = if ((size(i.payments) == 2))
1103+ then if ((assetIdToStr(i.payments[0].assetId) != AId))
1104+ then throw("Wrong payment asset A")
1105+ else if ((assetIdToStr(i.payments[1].assetId) != BId))
1106+ then throw("Wrong payment asset B")
1107+ else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
1108+ else if ((size(i.payments) == 1))
1109+ then if ((assetIdToStr(i.payments[0].assetId) == AId))
1110+ then $Tuple4(i.payments[0].amount, AId, 0, BId)
1111+ else if ((assetIdToStr(i.payments[0].assetId) == BId))
1112+ then $Tuple4(0, AId, i.payments[0].amount, BId)
1113+ else throw("Wrong payment")
1114+ else throw("One or two payments expected")
1115+ let pmtA = $t03292333560._1
1116+ let pmtAssetA = $t03292333560._2
1117+ let pmtB = $t03292333560._3
1118+ let pmtAssetB = $t03292333560._4
1119+ let newPosNum = getNewUserPositionNumber(toString(i.caller))
1120+ if ((leverage > 100))
1121+ then {
1122+ let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
1123+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
1124+ let newRequestId = {
1125+ let @ = invoke(this, "createNewRequest", [request], nil)
1126+ if ($isInstanceOf(@, "Int"))
1127+ then @
1128+ else throw(($getType(@) + " couldn't be cast to Int"))
1129+ }
1130+ if ((newRequestId == newRequestId))
1131+ then {
1132+ let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1133+ let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1134+ if ((inv == inv))
1135+ then nil
1136+ else throw("Strict value is not equal to itself.")
1137+ }
1138+ else throw("Strict value is not equal to itself.")
11231139 }
1124- if ((newRequestId == newRequestId))
1125- then {
1126- let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
1127- let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
1128- if ((inv == inv))
1129- then nil
1130- else throw("Strict value is not equal to itself.")
1131- }
1132- else throw("Strict value is not equal to itself.")
1133- }
1134- else {
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
1138- (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
1139- }
1140- }
1140+ else {
1141+ let $t03448834600 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1142+ let userStaked = $t03448834600._1
1143+ let axlyFee = $t03448834600._2
1144+ (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
1145+ }
1146+ }
11411147
11421148
11431149
11441150 @Callable(i)
11451151 func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false)
11461152
11471153
11481154
11491155 @Callable(i)
11501156 func createUpdateStopLoss (posId,poolId,assetId,price) = {
11511157 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
11521158 if ($isInstanceOf(@, "(Int, Int)"))
11531159 then @
11541160 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
11551161 if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
11561162 then throw("There are no user position")
11571163 else if ((0 >= price))
11581164 then throw("Price must be greater than 0")
11591165 else if ((price > tokenOraclePrice))
11601166 then throw("Price must be less than current token price")
11611167 else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
11621168 }
11631169
11641170
11651171
11661172 @Callable(i)
11671173 func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
11681174 then throw("No entry")
11691175 else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
11701176
11711177
11721178
11731179 @Callable(i)
11741180 func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox)))
11751181 then throw("Already inited")
11761182 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)]
11771183
11781184
11791185
11801186 @Callable(i)
11811187 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
11821188 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
11831189 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
11841190 })
11851191
11861192
11871193
11881194 @Callable(i)
11891195 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
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
1196+ let $t03708037184 = parseRequest(requestId)
1197+ let user = $t03708037184._1
1198+ let pool = $t03708037184._2
1199+ let pmtA = $t03708037184._3
1200+ let AId = $t03708037184._4
1201+ let pmtB = $t03708037184._5
1202+ let BId = $t03708037184._6
1203+ let balA = $t03708037184._7
1204+ let balB = $t03708037184._8
1205+ let shareId = $t03708037184._9
1206+ let bwAsset = $t03708037184._10
1207+ let bwAmount = $t03708037184._11
12021208 if ((size(i.payments) != 1))
12031209 then throw("Wrong payment size")
12041210 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
12051211 then true
12061212 else (i.payments[0].amount != bwAmount))
12071213 then throw("Wrong payment")
12081214 else {
1209- let $t03715737281 = if ((AId == bwAsset))
1215+ let $t03737437498 = if ((AId == bwAsset))
12101216 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
12111217 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1212- let pmtAllA = $t03715737281._1
1213- let pmtAllB = $t03715737281._2
1218+ let pmtAllA = $t03737437498._1
1219+ let pmtAllB = $t03737437498._2
12141220 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
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
1221+ let $t03758037695 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1222+ let userStaked = $t03758037695._1
1223+ let axlyFee = $t03758037695._2
12181224 let posNum = getNewUserPositionNumber(user)
12191225 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12201226 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
12211227 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
12221228 }
12231229 })
12241230
12251231
12261232
12271233 @Callable(i)
12281234 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
12291235 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12301236 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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
1237+ let $t03847438564 = getPoolData(Address(fromBase58String(pool)), pType)
1238+ let AId = $t03847438564._1
1239+ let BId = $t03847438564._2
1240+ let balA = $t03847438564._3
1241+ let balB = $t03847438564._4
1242+ let shareId = $t03847438564._5
12371243 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12381244 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12391245 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12401246 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
12411247 if ((borrowAmount == 0))
12421248 then throw("You can't liquidate position without borrow")
12431249 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))]
12441250 })
12451251
12461252
12471253
12481254 @Callable(i)
12491255 func stopLoss (user,posId,pool,assetId) = valueOrElse(isAdminCall(i), {
12501256 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
12511257 if ($isInstanceOf(@, "(Int, Int)"))
12521258 then @
12531259 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
12541260 if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
12551261 then throw("No entry")
12561262 else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))
12571263 })
12581264
12591265
12601266
12611267 @Callable(i)
12621268 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
1263- let $t04013340327 = if (claim)
1269+ let $t04035040544 = if (claim)
12641270 then claimFarmed(type, pool)
12651271 else {
12661272 let claimedAsset = if ((type == SF_POOL))
12671273 then SWOPID
12681274 else WXID
12691275 $Tuple2(amountToExchange, claimedAsset)
12701276 }
1271- let claimedAmount = $t04013340327._1
1272- let claimedAsset = $t04013340327._2
1277+ let claimedAmount = $t04035040544._1
1278+ let claimedAsset = $t04035040544._2
12731279 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12741280 let change = (claimedAmount - amountToExchange)
12751281 let changeEntry = if ((change > 0))
12761282 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12771283 else nil
12781284 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
12791285 })
12801286
12811287
12821288
12831289 @Callable(i)
12841290 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
1285- let $t04101241206 = if (claim)
1291+ let $t04122941423 = if (claim)
12861292 then claimFarmed(type, pool)
12871293 else {
12881294 let claimedAsset = if ((type == SF_POOL))
12891295 then SWOPID
12901296 else WXID
12911297 $Tuple2(amountToExchange, claimedAsset)
12921298 }
1293- let claimedAmount = $t04101241206._1
1294- let claimedAsset = $t04101241206._2
1299+ let claimedAmount = $t04122941423._1
1300+ let claimedAsset = $t04122941423._2
12951301 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
12961302 let change = (claimedAmount - amountToExchange)
12971303 let changeEntry = if ((change > 0))
12981304 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12991305 else nil
13001306 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
13011307 })
13021308
13031309
13041310
13051311 @Callable(i)
13061312 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
1307- let $t04195742151 = if (claim)
1313+ let $t04217442368 = if (claim)
13081314 then claimFarmed(type, pool)
13091315 else {
13101316 let claimedAsset = if ((type == SF_POOL))
13111317 then SWOPID
13121318 else WXID
13131319 $Tuple2(amountToExchange, claimedAsset)
13141320 }
1315- let claimedAmount = $t04195742151._1
1316- let claimedAsset = $t04195742151._2
1321+ let claimedAmount = $t04217442368._1
1322+ let claimedAsset = $t04217442368._2
13171323 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13181324 let change = (claimedAmount - amountToExchange)
13191325 let changeEntry = if ((change > 0))
13201326 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
13211327 else nil
13221328 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
13231329 })
13241330
13251331
13261332
13271333 @Callable(i)
1328-func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
1334+func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
13291335 then (type != WX_POOL)
13301336 else false)
13311337 then throw("Wrong type")
13321338 else {
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
1339-[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)]
1339+ let $t04310943203 = getPoolData(Address(fromBase58String(poolAddr)), type)
1340+ let aId = $t04310943203._1
1341+ let bId = $t04310943203._2
1342+ let aBal = $t04310943203._3
1343+ let bBal = $t04310943203._4
1344+ let shareId = $t04310943203._5
1345+[IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)]
13401346 })
13411347
13421348
13431349 @Verifier(tx)
13441350 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
13451351

github/deemru/w8io/026f985 
182.01 ms