tx · 5XNh4ePEYR6x3AQF8QDp4tz7AbM2fQ28sfL9JeKAfE2C 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.54000000 Waves 2023.10.20 15:18 [2806893] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "5XNh4ePEYR6x3AQF8QDp4tz7AbM2fQ28sfL9JeKAfE2C", "fee": 54000000, "feeAssetId": null, "timestamp": 1697804321866, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "3g8UNC5THcy2aLp8jorY9VCKJRFyBx7rnh5rsHeU1WnciyuxmfPPUd7Nh4wb1DcFtqXpsNJEYeH9y2nsHyKAuTBg" ], "script": "base64:BgKiAQgCEgMKAQgSAwoBCBIECgIICBIFCgMIGBgSBQoDCAEIEgQKAggBEgYKBAEICAESBQoDAQgIEg8KDQgICAgICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEgcKBQgICAEEEgUKAwgEARIMCgoICAgBAQEBAQEEEgkKBwgBAQEBAQESABIAEgASABIAEgASABIAEgMKAQgSAwoBCIgBAARDT05GCQERQGV4dHJOYXRpdmUoMTA2MikBCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAgZjb25maWcAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAEQ1BNTQIEY3BtbQAERkxBVAIEZmxhdAAPQ0FQX0ZFRV9OT19MT0FOAgljYXBOb0xvYW4ADENBUF9GRUVfTE9BTgIHY2FwTG9hbgAUU1RPUExPU1NfRkVFX05PX0xPQU4CDnN0b3BMb3NzTm9Mb2FuAA1TVE9QTE9TU19MT0FOAgxzdG9wTG9zc0xvYW4ACExPQU5fRkVFAgRsb2FuAAtOT19MT0FOX0ZFRQIGbm9Mb2FuAAZOT19G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5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUOZ3JvdXAyQWRtaW4yUEsAAQAACQAAAgkAZAIFDGdyb3VwMVNpZ25lZAUMZ3JvdXAyU2lnbmVkAAIW/HdF", "height": 2806893, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 71ZBgz93Z1nyQaB7fPCbPmjCrZzSAjAeDTumkK46pxSz Next: 9xen3XhdXaU3SrhxQvgjmu2C2FMfQ4mick9keM1Ce2N4 Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let CONF = addressFromStringValue(getStringValue(this, "config")) | |
5 | + | ||
4 | 6 | let SF_POOL = "SF" | |
5 | 7 | ||
6 | 8 | let WX_POOL = "WX" | |
121 | 123 | ||
122 | 124 | let kWxSwapContract = "wx_swap_contract" | |
123 | 125 | ||
126 | + | let kWxRest = "wx_rest_addr" | |
127 | + | ||
124 | 128 | let kSwopId = "swop_id" | |
125 | 129 | ||
126 | 130 | let kWxId = "wx_id" | |
133 | 137 | ||
134 | 138 | let kGroup2Admin2PK = "group2_admin2_pub_key" | |
135 | 139 | ||
136 | - | let moneyBox = | |
140 | + | let moneyBox = addressFromStringValue(valueOrErrorMessage(getString(CONF, kMoneyBox), "No axly moneyBox address")) | |
137 | 141 | ||
138 | - | let exContract = | |
142 | + | let exContract = addressFromStringValue(valueOrErrorMessage(getString(CONF, kExContract), "No exchange contract address")) | |
139 | 143 | ||
140 | - | let priceOracleAddr = | |
144 | + | let priceOracleAddr = addressFromStringValue(valueOrErrorMessage(getString(CONF, kPriceOracle), "No price oracle address")) | |
141 | 145 | ||
142 | - | let wxSwapContract = | |
146 | + | let wxSwapContract = addressFromStringValue(valueOrErrorMessage(getString(CONF, kWxSwapContract), "No wx swap address")) | |
143 | 147 | ||
144 | - | let | |
148 | + | let wxRest = addressFromStringValue(valueOrErrorMessage(getString(CONF, kWxRest), "No wx rest address")) | |
145 | 149 | ||
146 | - | let | |
150 | + | let SWOPID = fromBase58String(valueOrErrorMessage(getString(CONF, kSwopId), "No swop id")) | |
147 | 151 | ||
148 | - | let | |
152 | + | let WXID = fromBase58String(valueOrErrorMessage(getString(CONF, kWxId), "No wx id")) | |
149 | 153 | ||
150 | - | let group1Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup1Admin2PK), "Can't get kGroup1Admin2PK")) | |
154 | + | let group1Admin1PK = fromBase58String(valueOrErrorMessage(getString(CONF, kGroup1Admin1PK), "Can't get kGroup1Admin1PK")) | |
155 | + | ||
156 | + | let group1Admin2PK = fromBase58String(valueOrErrorMessage(getString(CONF, kGroup1Admin2PK), "Can't get kGroup1Admin2PK")) | |
151 | 157 | ||
152 | 158 | let group2Admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin1PK), "Can't get kGroup2Admin1PK")) | |
153 | 159 | ||
154 | 160 | let group2Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin2PK), "Can't get kGroup2Admin1PK")) | |
155 | 161 | ||
156 | - | let operatorPK = fromBase58String(valueOrErrorMessage(getString( | |
162 | + | let operatorPK = fromBase58String(valueOrErrorMessage(getString(CONF, kOperatorCallPK), "Can't get operatorPK")) | |
157 | 163 | ||
158 | 164 | func unknownPoolType () = throw("Wrong pool type") | |
159 | 165 | ||
160 | 166 | ||
161 | - | func getLendSrvAddr () = | |
167 | + | func getLendSrvAddr () = addressFromStringValue(valueOrErrorMessage(getString(CONF, kLendService), "Can't get lend service addr")) | |
162 | 168 | ||
163 | 169 | ||
164 | 170 | func isOperatorCall (i) = if ((i.callerPublicKey == operatorPK)) | |
240 | 246 | ||
241 | 247 | ||
242 | 248 | func getSFPoolData (poolAddr) = { | |
243 | - | let $ | |
244 | - | if (($ | |
249 | + | let $t082738322 = getSFPoolBalances(poolAddr) | |
250 | + | if (($t082738322 == $t082738322)) | |
245 | 251 | then { | |
246 | - | let balB = $ | |
247 | - | let balA = $ | |
252 | + | let balB = $t082738322._2 | |
253 | + | let balA = $t082738322._1 | |
248 | 254 | $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), balA, balB, valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id")) | |
249 | 255 | } | |
250 | 256 | else throw("Strict value is not equal to itself.") | |
278 | 284 | then @ | |
279 | 285 | else unit | |
280 | 286 | }, "Can't get pool LP asset id") | |
281 | - | let $ | |
282 | - | if (($ | |
287 | + | let $t090199078 = getWXPoolBalances(poolAddr, aId, bId) | |
288 | + | if (($t090199078 == $t090199078)) | |
283 | 289 | then { | |
284 | - | let balB = $ | |
285 | - | let balA = $ | |
290 | + | let balB = $t090199078._2 | |
291 | + | let balA = $t090199078._1 | |
286 | 292 | $Tuple5(aId, bId, balA, balB, shareId) | |
287 | 293 | } | |
288 | 294 | else throw("Strict value is not equal to itself.") | |
390 | 396 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
391 | 397 | let poolAddr = Address(fromBase58String(pool)) | |
392 | 398 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
393 | - | let $ | |
394 | - | let aId = $ | |
395 | - | let bId = $ | |
396 | - | let aBalance = $ | |
397 | - | let bBalance = $ | |
399 | + | let $t01206712132 = getPoolData(poolAddr, pType) | |
400 | + | let aId = $t01206712132._1 | |
401 | + | let bId = $t01206712132._2 | |
402 | + | let aBalance = $t01206712132._3 | |
403 | + | let bBalance = $t01206712132._4 | |
398 | 404 | let prices = getAssetsPrice([aId, bId]) | |
399 | 405 | let dPriceA = prices[0] | |
400 | 406 | let dPriceB = prices[1] | |
473 | 479 | } | |
474 | 480 | else if ((pType == WX_POOL)) | |
475 | 481 | then { | |
476 | - | let $ | |
482 | + | let $t01367613926 = $Tuple2(split({ | |
477 | 483 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
478 | 484 | if ($isInstanceOf(@, "String")) | |
479 | 485 | then @ | |
484 | 490 | then @ | |
485 | 491 | else throw(($getType(@) + " couldn't be cast to String")) | |
486 | 492 | }, "__")) | |
487 | - | if (($ | |
493 | + | if (($t01367613926 == $t01367613926)) | |
488 | 494 | then { | |
489 | - | let evalPutInB = $ | |
490 | - | let evalPutInA = $ | |
495 | + | let evalPutInB = $t01367613926._2 | |
496 | + | let evalPutInA = $t01367613926._1 | |
491 | 497 | let lpInA = parseIntValue(evalPutInA[1]) | |
492 | 498 | let lpInB = parseIntValue(evalPutInB[1]) | |
493 | 499 | if ((lpInB > lpInA)) | |
541 | 547 | ||
542 | 548 | ||
543 | 549 | func unstakeLP (pool,pType,shareId,amount) = { | |
544 | - | let $ | |
550 | + | let $t01570416054 = if ((pType == SF_POOL)) | |
545 | 551 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
546 | 552 | else if ((pType == WX_POOL)) | |
547 | 553 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
548 | 554 | else unknownPoolType() | |
549 | - | let farmAddr = $ | |
550 | - | let fName = $ | |
551 | - | let params = $ | |
555 | + | let farmAddr = $t01570416054._1 | |
556 | + | let fName = $t01570416054._2 | |
557 | + | let params = $t01570416054._3 | |
552 | 558 | let inv = invoke(farmAddr, fName, params, nil) | |
553 | 559 | if ((inv == inv)) | |
554 | 560 | then amount | |
561 | 567 | let feeScale6 = 1000000 | |
562 | 568 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
563 | 569 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
564 | - | let $ | |
570 | + | let $t01647616782 = if ((assetTokenToGet == assetIdA)) | |
565 | 571 | then { | |
566 | 572 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
567 | 573 | $Tuple2(amountToPay, assetIdB) | |
570 | 576 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
571 | 577 | $Tuple2(amountToPay, assetIdA) | |
572 | 578 | } | |
573 | - | let amountToPay = $ | |
574 | - | let assetToPay = $ | |
579 | + | let amountToPay = $t01647616782._1 | |
580 | + | let assetToPay = $t01647616782._2 | |
575 | 581 | $Tuple2(assetToPay, amountToPay) | |
576 | 582 | } | |
577 | 583 | ||
591 | 597 | ||
592 | 598 | ||
593 | 599 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
594 | - | let $ | |
595 | - | let pFee = $ | |
596 | - | let prFee = $ | |
600 | + | let $t01752217561 = getWXSwapFees(pool) | |
601 | + | let pFee = $t01752217561._1 | |
602 | + | let prFee = $t01752217561._2 | |
597 | 603 | let feeScale = toBigInt(100000000) | |
598 | - | let $ | |
604 | + | let $t01760117909 = if ((assetTokenToGet == assetIdA)) | |
599 | 605 | then { | |
600 | 606 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
601 | 607 | $Tuple2(amountToPay, assetIdB) | |
604 | 610 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
605 | 611 | $Tuple2(amountToPay, assetIdA) | |
606 | 612 | } | |
607 | - | let amountToPay = $ | |
608 | - | let assetToPay = $ | |
613 | + | let amountToPay = $t01760117909._1 | |
614 | + | let assetToPay = $t01760117909._2 | |
609 | 615 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
610 | 616 | $Tuple2(assetToPay, amountToPayWithFee) | |
611 | 617 | } | |
617 | 623 | then true | |
618 | 624 | else (poolFB != "")) | |
619 | 625 | then { | |
620 | - | let $ | |
626 | + | let $t01835018562 = if ((poolFB == "")) | |
621 | 627 | then $Tuple3(balA, balB, pool) | |
622 | 628 | else { | |
623 | - | let $ | |
624 | - | let sfBalA = $ | |
625 | - | let sfBalB = $ | |
629 | + | let $t01845618529 = getSFPoolBalances(addressFromStringValue(poolFB)) | |
630 | + | let sfBalA = $t01845618529._1 | |
631 | + | let sfBalB = $t01845618529._2 | |
626 | 632 | $Tuple3(sfBalA, sfBalB, poolFB) | |
627 | 633 | } | |
628 | - | let pBalA = $ | |
629 | - | let pBalB = $ | |
630 | - | let exPool = $ | |
631 | - | let $ | |
632 | - | let assetToPay = $ | |
633 | - | let amountToPay = $ | |
634 | + | let pBalA = $t01835018562._1 | |
635 | + | let pBalB = $t01835018562._2 | |
636 | + | let exPool = $t01835018562._3 | |
637 | + | let $t01856718693 = calcAmountToPaySF(exPool, assetIdA, assetIdB, pBalA, pBalB, amountTokenToGet, assetTokenToGet) | |
638 | + | let assetToPay = $t01856718693._1 | |
639 | + | let amountToPay = $t01856718693._2 | |
634 | 640 | invoke(addressFromStringValue(exPool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
635 | 641 | } | |
636 | 642 | else if ((pType == WX_POOL)) | |
637 | 643 | then { | |
638 | - | let $ | |
639 | - | let assetToPay = $ | |
640 | - | let amountToPay = $ | |
644 | + | let $t01889519017 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
645 | + | let assetToPay = $t01889519017._1 | |
646 | + | let amountToPay = $t01889519017._2 | |
641 | 647 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
642 | 648 | } | |
643 | 649 | else unknownPoolType() | |
645 | 651 | ||
646 | 652 | ||
647 | 653 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
648 | - | let $ | |
654 | + | let $t01930420539 = if ((pType == SF_POOL)) | |
649 | 655 | then { | |
650 | 656 | let inv = { | |
651 | 657 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
673 | 679 | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", ["", shareId, userCanWithdraw, toString(this)], nil) | |
674 | 680 | if ((inv == inv)) | |
675 | 681 | then { | |
676 | - | let $ | |
682 | + | let $t01979720294 = match inv { | |
677 | 683 | case _ => | |
678 | 684 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
679 | 685 | then if ($isInstanceOf($match0._2, "Int")) | |
702 | 708 | } | |
703 | 709 | else throw("Couldn't cast types") | |
704 | 710 | } | |
705 | - | let outAmAmt = $ | |
706 | - | let outPrAmt = $ | |
707 | - | let amBalance = $ | |
708 | - | let prBalance = $ | |
709 | - | let lpEmission = $ | |
710 | - | let curPrice = $ | |
711 | - | let poolStatus = $ | |
711 | + | let outAmAmt = $t01979720294._1 | |
712 | + | let outPrAmt = $t01979720294._2 | |
713 | + | let amBalance = $t01979720294._3 | |
714 | + | let prBalance = $t01979720294._4 | |
715 | + | let lpEmission = $t01979720294._5 | |
716 | + | let curPrice = $t01979720294._6 | |
717 | + | let poolStatus = $t01979720294._7 | |
712 | 718 | $Tuple2(outAmAmt, outPrAmt) | |
713 | 719 | } | |
714 | 720 | else throw("Strict value is not equal to itself.") | |
725 | 731 | else throw("Strict value is not equal to itself.") | |
726 | 732 | } | |
727 | 733 | else unknownPoolType() | |
728 | - | let amountA = $ | |
729 | - | let amountB = $ | |
734 | + | let amountA = $t01930420539._1 | |
735 | + | let amountB = $t01930420539._2 | |
730 | 736 | $Tuple2(amountA, amountB) | |
731 | 737 | } | |
732 | 738 | ||
748 | 754 | } | |
749 | 755 | else if ((pType == WX_POOL)) | |
750 | 756 | then { | |
751 | - | let $ | |
752 | - | let aId = $ | |
753 | - | let bId = $ | |
754 | - | let aBal = $ | |
755 | - | let bBal = $ | |
756 | - | let lpId = $ | |
757 | + | let $t02090720986 = getWXPoolData(addressFromStringValue(pool)) | |
758 | + | let aId = $t02090720986._1 | |
759 | + | let bId = $t02090720986._2 | |
760 | + | let aBal = $t02090720986._3 | |
761 | + | let bBal = $t02090720986._4 | |
762 | + | let lpId = $t02090720986._5 | |
757 | 763 | let balBefore = accountBalance(WXID) | |
758 | 764 | if ((balBefore == balBefore)) | |
759 | 765 | then { | |
775 | 781 | if ((lpBalanceBefore == lpBalanceBefore)) | |
776 | 782 | then { | |
777 | 783 | let poolAddr = addressFromStringValue(pool) | |
778 | - | let $ | |
784 | + | let $t02158422000 = if (if ((pmtA > 0)) | |
779 | 785 | then (pmtB > 0) | |
780 | 786 | else false) | |
781 | 787 | then { | |
782 | - | let $ | |
783 | - | let pmtInA = $ | |
784 | - | let pmtInB = $ | |
785 | - | let change = $ | |
786 | - | let changeId = $ | |
788 | + | let $t02165021766 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
789 | + | let pmtInA = $t02165021766._1 | |
790 | + | let pmtInB = $t02165021766._2 | |
791 | + | let change = $t02165021766._3 | |
792 | + | let changeId = $t02165021766._4 | |
787 | 793 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
788 | 794 | if ((inv == inv)) | |
789 | 795 | then $Tuple2(change, changeId) | |
794 | 800 | else if ((pmtB > 0)) | |
795 | 801 | then $Tuple2(pmtB, bId) | |
796 | 802 | else throw("pmts must be > 0") | |
797 | - | let change = $ | |
798 | - | let changeId = $ | |
803 | + | let change = $t02158422000._1 | |
804 | + | let changeId = $t02158422000._2 | |
799 | 805 | let inv = if ((change > 0)) | |
800 | 806 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
801 | 807 | else nil | |
823 | 829 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
824 | 830 | let totalAmount = getPoolTotalShare(pool) | |
825 | 831 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
826 | - | let $ | |
832 | + | let $t02285723095 = if (withLoan) | |
827 | 833 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
828 | 834 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
829 | - | let curPoolInterest = $ | |
830 | - | let totalStakedWithLoan = $ | |
835 | + | let curPoolInterest = $t02285723095._1 | |
836 | + | let totalStakedWithLoan = $t02285723095._2 | |
831 | 837 | [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))] | |
832 | 838 | } | |
833 | 839 | ||
908 | 914 | ||
909 | 915 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
910 | 916 | let poolAddr = Address(fromBase58String(pool)) | |
911 | - | let $ | |
912 | - | let AId = $ | |
913 | - | let BId = $ | |
914 | - | let balA = $ | |
915 | - | let balB = $ | |
916 | - | let shareId = $ | |
917 | + | let $t02520225268 = getPoolData(poolAddr, pType) | |
918 | + | let AId = $t02520225268._1 | |
919 | + | let BId = $t02520225268._2 | |
920 | + | let balA = $t02520225268._3 | |
921 | + | let balB = $t02520225268._4 | |
922 | + | let shareId = $t02520225268._5 | |
917 | 923 | if (if ((tokenId != AId)) | |
918 | 924 | then (tokenId != BId) | |
919 | 925 | else false) | |
930 | 936 | let axlyFeeLoan = fraction(tokensForFeeLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
931 | 937 | let axlyFeeNoLoan = fraction(tokensForFeeNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
932 | 938 | let axlyFee = (axlyFeeLoan + axlyFeeNoLoan) | |
933 | - | let $ | |
939 | + | let $t02601326113 = if ((tokenId == AId)) | |
934 | 940 | then $Tuple2((tokenAmount - axlyFee), 0) | |
935 | 941 | else $Tuple2(0, (tokenAmount - axlyFee)) | |
936 | - | let pmtA = $ | |
937 | - | let pmtB = $ | |
938 | - | let $ | |
939 | - | let stakedAmount = $ | |
940 | - | let nf = $ | |
942 | + | let pmtA = $t02601326113._1 | |
943 | + | let pmtB = $t02601326113._2 | |
944 | + | let $t02611626220 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
945 | + | let stakedAmount = $t02611626220._1 | |
946 | + | let nf = $t02611626220._2 | |
941 | 947 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
942 | 948 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
943 | 949 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
983 | 989 | let userAddr = Address(fromBase58String(user)) | |
984 | 990 | let poolAddr = Address(fromBase58String(pool)) | |
985 | 991 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
986 | - | let $ | |
987 | - | let idAStr = $ | |
988 | - | let idBStr = $ | |
989 | - | let balA = $ | |
990 | - | let balB = $ | |
991 | - | let shareId = $ | |
992 | - | let $ | |
993 | - | let idA = $ | |
994 | - | let idB = $ | |
992 | + | let $t02874928821 = getPoolData(poolAddr, pType) | |
993 | + | let idAStr = $t02874928821._1 | |
994 | + | let idBStr = $t02874928821._2 | |
995 | + | let balA = $t02874928821._3 | |
996 | + | let balB = $t02874928821._4 | |
997 | + | let shareId = $t02874928821._5 | |
998 | + | let $t02882428891 = $Tuple2(assetIdFromStr(idAStr), assetIdFromStr(idBStr)) | |
999 | + | let idA = $t02882428891._1 | |
1000 | + | let idB = $t02882428891._2 | |
995 | 1001 | let stopLossFee = calcStopLossFee(pool, isBorrowed, stopLoss, userCanWithdraw) | |
996 | 1002 | let cBalABefore = accountBalance(idA) | |
997 | 1003 | if ((cBalABefore == cBalABefore)) | |
1022 | 1028 | let cBalBAfter = accountBalance(idB) | |
1023 | 1029 | if ((cBalBAfter == cBalBAfter)) | |
1024 | 1030 | then { | |
1025 | - | let $ | |
1026 | - | let tokensAmountA = $ | |
1027 | - | let tokensAmountB = $ | |
1028 | - | let $ | |
1031 | + | let $t02958629675 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
1032 | + | let tokensAmountA = $t02958629675._1 | |
1033 | + | let tokensAmountB = $t02958629675._2 | |
1034 | + | let $t02967830914 = if (isBorrowed) | |
1029 | 1035 | then { | |
1030 | 1036 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1031 | 1037 | let debt = { | |
1074 | 1080 | else throw("Strict value is not equal to itself.") | |
1075 | 1081 | } | |
1076 | 1082 | else $Tuple2(tokensAmountA, tokensAmountB) | |
1077 | - | let toUserA = $ | |
1078 | - | let toUserB = $ | |
1083 | + | let toUserA = $t02967830914._1 | |
1084 | + | let toUserB = $t02967830914._2 | |
1079 | 1085 | let poolTotalLoanEntries = if (isBorrowed) | |
1080 | 1086 | then [IntegerEntry((pool + kPoolTotalLoan), ((poolTotalShareLoan - userCanWithdraw) - stopLossFee))] | |
1081 | 1087 | else nil | |
1121 | 1127 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
1122 | 1128 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
1123 | 1129 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
1124 | - | let $ | |
1130 | + | let $t03289632993 = if ((borrowId == aId)) | |
1125 | 1131 | then $Tuple2(dPriceA, decPrA) | |
1126 | 1132 | else $Tuple2(dPriceB, decPrB) | |
1127 | - | let borrowPrice = $ | |
1128 | - | let borrowDecPr = $ | |
1133 | + | let borrowPrice = $t03289632993._1 | |
1134 | + | let borrowDecPr = $t03289632993._2 | |
1129 | 1135 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
1130 | 1136 | } | |
1131 | 1137 | ||
1154 | 1160 | ||
1155 | 1161 | ||
1156 | 1162 | func claimAndCheckAmnt (pool,pType,claim,amount,change) = { | |
1157 | - | let $ | |
1163 | + | let $t03399334255 = if (claim) | |
1158 | 1164 | then claimFarmed(pType, pool) | |
1159 | 1165 | else { | |
1160 | 1166 | let claimedAsset = if ((pType == SF_POOL)) | |
1164 | 1170 | else unknownPoolType() | |
1165 | 1171 | $Tuple2(amount, claimedAsset) | |
1166 | 1172 | } | |
1167 | - | if (($ | |
1173 | + | if (($t03399334255 == $t03399334255)) | |
1168 | 1174 | then { | |
1169 | - | let claimAsset = $ | |
1170 | - | let claimAmount = $ | |
1175 | + | let claimAsset = $t03399334255._2 | |
1176 | + | let claimAmount = $t03399334255._1 | |
1171 | 1177 | let bal = accountBalance(claimAsset) | |
1172 | 1178 | if ((bal == bal)) | |
1173 | 1179 | then if ((amount > bal)) | |
1183 | 1189 | func getPoolInfoREADONLY (pool) = { | |
1184 | 1190 | let poolAddr = addressFromStringValue(pool) | |
1185 | 1191 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1186 | - | let $ | |
1187 | - | let AId = $ | |
1188 | - | let BId = $ | |
1189 | - | let balA = $ | |
1190 | - | let balB = $ | |
1191 | - | let shareId = $ | |
1192 | + | let $t03462234712 = getPoolData(Address(fromBase58String(pool)), pType) | |
1193 | + | let AId = $t03462234712._1 | |
1194 | + | let BId = $t03462234712._2 | |
1195 | + | let balA = $t03462234712._3 | |
1196 | + | let balB = $t03462234712._4 | |
1197 | + | let shareId = $t03462234712._5 | |
1192 | 1198 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
1193 | 1199 | $Tuple2(nil, $Tuple6(AId, BId, shareId, balA, balB, shareSupply)) | |
1194 | 1200 | } | |
1216 | 1222 | @Callable(i) | |
1217 | 1223 | func getUserPositionREADONLY (user,pools,posNum) = { | |
1218 | 1224 | func userPos (a,pool) = { | |
1219 | - | let $ | |
1220 | - | let wAmountsA = $ | |
1221 | - | let wAmountsB = $ | |
1222 | - | let debts = $ | |
1223 | - | let eqWAmountsA = $ | |
1224 | - | let eqWAmountsB = $ | |
1225 | - | let index = $ | |
1225 | + | let $t03558535655 = a | |
1226 | + | let wAmountsA = $t03558535655._1 | |
1227 | + | let wAmountsB = $t03558535655._2 | |
1228 | + | let debts = $t03558535655._3 | |
1229 | + | let eqWAmountsA = $t03558535655._4 | |
1230 | + | let eqWAmountsB = $t03558535655._5 | |
1231 | + | let index = $t03558535655._6 | |
1226 | 1232 | if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition))))) | |
1227 | 1233 | then $Tuple6((wAmountsA :+ 0), (wAmountsB :+ 0), (debts :+ 0), (eqWAmountsA :+ 0), (eqWAmountsB :+ 0), (index + 1)) | |
1228 | 1234 | else { | |
1229 | 1235 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1230 | - | let $ | |
1231 | - | let AId = $ | |
1232 | - | let BId = $ | |
1233 | - | let balA = $ | |
1234 | - | let balB = $ | |
1235 | - | let shareId = $ | |
1236 | + | let $t03593436024 = getPoolData(Address(fromBase58String(pool)), pType) | |
1237 | + | let AId = $t03593436024._1 | |
1238 | + | let BId = $t03593436024._2 | |
1239 | + | let balA = $t03593436024._3 | |
1240 | + | let balB = $t03593436024._4 | |
1241 | + | let shareId = $t03593436024._5 | |
1236 | 1242 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1237 | 1243 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1238 | - | let $ | |
1239 | - | let wAmountA = $ | |
1240 | - | let wAmountB = $ | |
1244 | + | let $t03624036360 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1245 | + | let wAmountA = $t03624036360._1 | |
1246 | + | let wAmountB = $t03624036360._2 | |
1241 | 1247 | if ((borrowAmount > 0)) | |
1242 | 1248 | then { | |
1243 | 1249 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1271 | 1277 | } | |
1272 | 1278 | else unknownPoolType() | |
1273 | 1279 | else 0 | |
1274 | - | let $ | |
1280 | + | let $t03727237491 = if ((borrowAsset == AId)) | |
1275 | 1281 | then $Tuple2(((wAmountA + amountToGetEx) - debt), (wAmountB - amountToPay)) | |
1276 | 1282 | else $Tuple2((wAmountA - amountToPay), ((wAmountB + amountToGetEx) - debt)) | |
1277 | - | let eqWAmountA = $ | |
1278 | - | let eqWAmountB = $ | |
1283 | + | let eqWAmountA = $t03727237491._1 | |
1284 | + | let eqWAmountB = $t03727237491._2 | |
1279 | 1285 | $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (eqWAmountsA :+ eqWAmountA), (eqWAmountsB :+ eqWAmountB), (index + 1)) | |
1280 | 1286 | } | |
1281 | 1287 | else throw("Strict value is not equal to itself.") | |
1284 | 1290 | } | |
1285 | 1291 | } | |
1286 | 1292 | ||
1287 | - | let $ | |
1293 | + | let $t03774637857 = { | |
1288 | 1294 | let $l = pools | |
1289 | 1295 | let $s = size($l) | |
1290 | 1296 | let $acc0 = $Tuple6(nil, nil, nil, nil, nil, 0) | |
1298 | 1304 | ||
1299 | 1305 | $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) | |
1300 | 1306 | } | |
1301 | - | let wAmountsA = $ | |
1302 | - | let wAmountsB = $ | |
1303 | - | let debts = $ | |
1304 | - | let eqWAmountsA = $ | |
1305 | - | let eqWAmountsB = $ | |
1307 | + | let wAmountsA = $t03774637857._1 | |
1308 | + | let wAmountsB = $t03774637857._2 | |
1309 | + | let debts = $t03774637857._3 | |
1310 | + | let eqWAmountsA = $t03774637857._4 | |
1311 | + | let eqWAmountsB = $t03774637857._5 | |
1306 | 1312 | $Tuple2(nil, $Tuple5(wAmountsA, wAmountsB, debts, eqWAmountsA, eqWAmountsB)) | |
1307 | 1313 | } | |
1308 | 1314 | ||
1322 | 1328 | else false) | |
1323 | 1329 | then throw("You can't borrow in this pool") | |
1324 | 1330 | else { | |
1325 | - | let $ | |
1326 | - | let AId = $ | |
1327 | - | let BId = $ | |
1328 | - | let balA = $ | |
1329 | - | let balB = $ | |
1330 | - | let shareId = $ | |
1331 | + | let $t03845538545 = getPoolData(Address(fromBase58String(pool)), pType) | |
1332 | + | let AId = $t03845538545._1 | |
1333 | + | let BId = $t03845538545._2 | |
1334 | + | let balA = $t03845538545._3 | |
1335 | + | let balB = $t03845538545._4 | |
1336 | + | let shareId = $t03845538545._5 | |
1331 | 1337 | if (if ((borrowId != AId)) | |
1332 | 1338 | then (borrowId != BId) | |
1333 | 1339 | else false) | |
1334 | 1340 | then throw("Wrong borrow asset") | |
1335 | 1341 | else { | |
1336 | - | let $ | |
1337 | - | let pmtA = $ | |
1338 | - | let pmtB = $ | |
1342 | + | let $t03862638685 = parseReplenishPmts(i.payments, AId, BId) | |
1343 | + | let pmtA = $t03862638685._1 | |
1344 | + | let pmtB = $t03862638685._2 | |
1339 | 1345 | let user = toString(i.caller) | |
1340 | 1346 | let newPosNum = getNewUserPositionNumber(user) | |
1341 | 1347 | if ((leverage > 100)) | |
1355 | 1361 | if ((inv == inv)) | |
1356 | 1362 | then { | |
1357 | 1363 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1358 | - | let $ | |
1359 | - | if (($ | |
1364 | + | let $t03967439768 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1365 | + | if (($t03967439768 == $t03967439768)) | |
1360 | 1366 | then { | |
1361 | - | let newBalB = $ | |
1362 | - | let newBalA = $ | |
1367 | + | let newBalB = $t03967439768._2 | |
1368 | + | let newBalA = $t03967439768._1 | |
1363 | 1369 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1364 | - | let $ | |
1365 | - | let wAmountA = $ | |
1366 | - | let wAmountB = $ | |
1370 | + | let $t03983839953 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1371 | + | let wAmountA = $t03983839953._1 | |
1372 | + | let wAmountB = $t03983839953._2 | |
1367 | 1373 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1368 | 1374 | } | |
1369 | 1375 | else throw("Strict value is not equal to itself.") | |
1373 | 1379 | else throw("Strict value is not equal to itself.") | |
1374 | 1380 | } | |
1375 | 1381 | else { | |
1376 | - | let $ | |
1377 | - | if (($ | |
1382 | + | let $t04000640121 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1383 | + | if (($t04000640121 == $t04000640121)) | |
1378 | 1384 | then { | |
1379 | - | let axlyFee = $ | |
1380 | - | let userStaked = $ | |
1381 | - | let $ | |
1382 | - | if (($ | |
1385 | + | let axlyFee = $t04000640121._2 | |
1386 | + | let userStaked = $t04000640121._1 | |
1387 | + | let $t04012740221 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1388 | + | if (($t04012740221 == $t04012740221)) | |
1383 | 1389 | then { | |
1384 | - | let newBalB = $ | |
1385 | - | let newBalA = $ | |
1390 | + | let newBalB = $t04012740221._2 | |
1391 | + | let newBalA = $t04012740221._1 | |
1386 | 1392 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1387 | - | let $ | |
1388 | - | let wAmountA = $ | |
1389 | - | let wAmountB = $ | |
1393 | + | let $t04029140406 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1394 | + | let wAmountA = $t04029140406._1 | |
1395 | + | let wAmountB = $t04029140406._2 | |
1390 | 1396 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1391 | 1397 | } | |
1392 | 1398 | else throw("Strict value is not equal to itself.") | |
1479 | 1485 | ||
1480 | 1486 | @Callable(i) | |
1481 | 1487 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1482 | - | let $ | |
1483 | - | let user = $ | |
1484 | - | let pool = $ | |
1485 | - | let pmtA = $ | |
1486 | - | let AId = $ | |
1487 | - | let pmtB = $ | |
1488 | - | let BId = $ | |
1489 | - | let balA = $ | |
1490 | - | let balB = $ | |
1491 | - | let shareId = $ | |
1492 | - | let bwAsset = $ | |
1493 | - | let bwAmount = $ | |
1488 | + | let $t04524545349 = parseRequest(requestId) | |
1489 | + | let user = $t04524545349._1 | |
1490 | + | let pool = $t04524545349._2 | |
1491 | + | let pmtA = $t04524545349._3 | |
1492 | + | let AId = $t04524545349._4 | |
1493 | + | let pmtB = $t04524545349._5 | |
1494 | + | let BId = $t04524545349._6 | |
1495 | + | let balA = $t04524545349._7 | |
1496 | + | let balB = $t04524545349._8 | |
1497 | + | let shareId = $t04524545349._9 | |
1498 | + | let bwAsset = $t04524545349._10 | |
1499 | + | let bwAmount = $t04524545349._11 | |
1494 | 1500 | if ((size(i.payments) != 1)) | |
1495 | 1501 | then throw("Wrong payment size") | |
1496 | 1502 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1498 | 1504 | else (i.payments[0].amount != bwAmount)) | |
1499 | 1505 | then throw("Wrong payment") | |
1500 | 1506 | else { | |
1501 | - | let $ | |
1507 | + | let $t04553945639 = if ((AId == bwAsset)) | |
1502 | 1508 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1503 | 1509 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1504 | - | let pmtAllA = $ | |
1505 | - | let pmtAllB = $ | |
1510 | + | let pmtAllA = $t04553945639._1 | |
1511 | + | let pmtAllB = $t04553945639._2 | |
1506 | 1512 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1507 | - | let $ | |
1508 | - | let userStaked = $ | |
1509 | - | let axlyFee = $ | |
1513 | + | let $t04572145836 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1514 | + | let userStaked = $t04572145836._1 | |
1515 | + | let axlyFee = $t04572145836._2 | |
1510 | 1516 | let posNum = getNewUserPositionNumber(user) | |
1511 | 1517 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1512 | 1518 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1513 | - | let $ | |
1514 | - | let wAmountA = $ | |
1515 | - | let wAmountB = $ | |
1519 | + | let $t04619646311 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1520 | + | let wAmountA = $t04619646311._1 | |
1521 | + | let wAmountB = $t04619646311._2 | |
1516 | 1522 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1517 | 1523 | } | |
1518 | 1524 | })) | |
1523 | 1529 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1524 | 1530 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1525 | 1531 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1526 | - | let $ | |
1527 | - | let AId = $ | |
1528 | - | let BId = $ | |
1529 | - | let balA = $ | |
1530 | - | let balB = $ | |
1531 | - | let shareId = $ | |
1532 | + | let $t04683246922 = getPoolData(Address(fromBase58String(pool)), pType) | |
1533 | + | let AId = $t04683246922._1 | |
1534 | + | let BId = $t04683246922._2 | |
1535 | + | let balA = $t04683246922._3 | |
1536 | + | let balB = $t04683246922._4 | |
1537 | + | let shareId = $t04683246922._5 | |
1532 | 1538 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1533 | 1539 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1534 | 1540 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1560 | 1566 | func capitalizeEx (pool,route,tokenToId,amountToExchange,claim) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1561 | 1567 | let pType = getStringValue(this, (kPool + pool)) | |
1562 | 1568 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1563 | - | let $ | |
1564 | - | if (($ | |
1569 | + | let $t04889248994 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1570 | + | if (($t04889248994 == $t04889248994)) | |
1565 | 1571 | then { | |
1566 | - | let claimedAsset = $ | |
1567 | - | let claimedAmount = $ | |
1572 | + | let claimedAsset = $t04889248994._2 | |
1573 | + | let claimedAmount = $t04889248994._1 | |
1568 | 1574 | let rArgs = split(route, "__") | |
1569 | 1575 | let exchangedAmount = if ((rArgs[0] == "directSwopfiCPMM")) | |
1570 | 1576 | then directSwopfiCPMM(rArgs, tokenToId) | |
1589 | 1595 | @Callable(i) | |
1590 | 1596 | func capitalizeNoEx (pool,claim,amountFromBalance) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1591 | 1597 | let pType = getStringValue(this, (kPool + pool)) | |
1592 | - | let $ | |
1593 | - | if (($ | |
1598 | + | let $t04967849776 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1599 | + | if (($t04967849776 == $t04967849776)) | |
1594 | 1600 | then { | |
1595 | - | let claimedAsset = $ | |
1596 | - | let claimedAmount = $ | |
1601 | + | let claimedAsset = $t04967849776._2 | |
1602 | + | let claimedAmount = $t04967849776._1 | |
1597 | 1603 | capitalize(pool, pType, assetIdToStr(claimedAsset), (claimedAmount + amountFromBalance)) | |
1598 | 1604 | } | |
1599 | 1605 | else throw("Strict value is not equal to itself.") | |
1611 | 1617 | else false) | |
1612 | 1618 | then throw("Wrong pool type") | |
1613 | 1619 | else { | |
1614 | - | let $ | |
1615 | - | let aId = $ | |
1616 | - | let bId = $ | |
1617 | - | let aBal = $ | |
1618 | - | let bBal = $ | |
1619 | - | let shareId = $ | |
1620 | + | let $t05029750391 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1621 | + | let aId = $t05029750391._1 | |
1622 | + | let bId = $t05029750391._2 | |
1623 | + | let aBal = $t05029750391._3 | |
1624 | + | let bBal = $t05029750391._4 | |
1625 | + | let shareId = $t05029750391._5 | |
1620 | 1626 | if ((0 > inFeeNoLoan)) | |
1621 | 1627 | then throw("inFeeNoLoan must be greater than 0") | |
1622 | 1628 | else if ((0 > inFeeLoan)) | |
1726 | 1732 | else [BooleanEntry((pool + kPoolActive), false)]) | |
1727 | 1733 | ||
1728 | 1734 | ||
1735 | + | @Verifier(tx) | |
1736 | + | func verify () = match tx { | |
1737 | + | case inv: InvokeScriptTransaction => | |
1738 | + | let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1739 | + | let isRightFee = if ((inv.fee == 900000)) | |
1740 | + | then (inv.feeAssetId == unit) | |
1741 | + | else false | |
1742 | + | let isInitCall = (inv.function == "init") | |
1743 | + | let isnoPayments = (size(inv.payments) == 0) | |
1744 | + | if (if (if (isRightFee) | |
1745 | + | then isInitCall | |
1746 | + | else false) | |
1747 | + | then isSelf | |
1748 | + | else false) | |
1749 | + | then isnoPayments | |
1750 | + | else false | |
1751 | + | case _ => | |
1752 | + | let group1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], group1Admin1PK)) | |
1753 | + | then 1 | |
1754 | + | else (0 + (if (sigVerify(tx.bodyBytes, tx.proofs[0], group1Admin2PK)) | |
1755 | + | then 1 | |
1756 | + | else 0)) | |
1757 | + | let group2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], group2Admin1PK)) | |
1758 | + | then 1 | |
1759 | + | else (0 + (if (sigVerify(tx.bodyBytes, tx.proofs[1], group2Admin2PK)) | |
1760 | + | then 1 | |
1761 | + | else 0)) | |
1762 | + | ((group1Signed + group2Signed) == 2) | |
1763 | + | } | |
1764 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let CONF = addressFromStringValue(getStringValue(this, "config")) | |
5 | + | ||
4 | 6 | let SF_POOL = "SF" | |
5 | 7 | ||
6 | 8 | let WX_POOL = "WX" | |
7 | 9 | ||
8 | 10 | let CPMM = "cpmm" | |
9 | 11 | ||
10 | 12 | let FLAT = "flat" | |
11 | 13 | ||
12 | 14 | let CAP_FEE_NO_LOAN = "capNoLoan" | |
13 | 15 | ||
14 | 16 | let CAP_FEE_LOAN = "capLoan" | |
15 | 17 | ||
16 | 18 | let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan" | |
17 | 19 | ||
18 | 20 | let STOPLOSS_LOAN = "stopLossLoan" | |
19 | 21 | ||
20 | 22 | let LOAN_FEE = "loan" | |
21 | 23 | ||
22 | 24 | let NO_LOAN_FEE = "noLoan" | |
23 | 25 | ||
24 | 26 | let NO_FEE = "noFee" | |
25 | 27 | ||
26 | 28 | let SCALE8 = 100000000 | |
27 | 29 | ||
28 | 30 | let SCALE10 = 10000000000 | |
29 | 31 | ||
30 | 32 | let SCALE16 = toBigInt(10000000000000000) | |
31 | 33 | ||
32 | 34 | let FEE_SCALE6 = 1000000 | |
33 | 35 | ||
34 | 36 | let kSFPoolAAssetBalance = "A_asset_balance" | |
35 | 37 | ||
36 | 38 | let kSFPoolBAssetBalance = "B_asset_balance" | |
37 | 39 | ||
38 | 40 | let kSFPoolAAssetId = "A_asset_id" | |
39 | 41 | ||
40 | 42 | let kSFPoolBAssetId = "B_asset_id" | |
41 | 43 | ||
42 | 44 | let kSFPoolShareId = "share_asset_id" | |
43 | 45 | ||
44 | 46 | let kSFPoolShareSupply = "share_asset_supply" | |
45 | 47 | ||
46 | 48 | let kSFPoolFee = "commission" | |
47 | 49 | ||
48 | 50 | let kUserPosition = "_userPosition" | |
49 | 51 | ||
50 | 52 | let kUserPositionPool = "_userPositionPool" | |
51 | 53 | ||
52 | 54 | let kUserBorrowAmount = "_userPositionBorrowAmount" | |
53 | 55 | ||
54 | 56 | let kUserBorrowAssetId = "_userPositionBorrowAssetId" | |
55 | 57 | ||
56 | 58 | let kUserPositionNum = "_userPositionNumber" | |
57 | 59 | ||
58 | 60 | let kUserPositionInterest = "_userPositionInterest" | |
59 | 61 | ||
60 | 62 | let kPoolTotal = "_poolTotal" | |
61 | 63 | ||
62 | 64 | let kPoolTotalLoan = "_poolTotalLoan" | |
63 | 65 | ||
64 | 66 | let kPoolInterestLoan = "_poolInterestLoan" | |
65 | 67 | ||
66 | 68 | let kPoolInterestNoLoan = "_poolInterestNoLoan" | |
67 | 69 | ||
68 | 70 | let kPoolCanBorrow = "_poolCanBorrow" | |
69 | 71 | ||
70 | 72 | let kAxlyInFeeWithoutLoan = "_axlyFeeNoLoan" | |
71 | 73 | ||
72 | 74 | let kAxlyInFeeWithLoan = "_axlyFeeWithLoan" | |
73 | 75 | ||
74 | 76 | let kAxlyNoLoanCapFee = "_axlyFeeCapNoLoan" | |
75 | 77 | ||
76 | 78 | let kAxlyWithLoanCapFee = "_axlyFeeCapWithLoan" | |
77 | 79 | ||
78 | 80 | let kAxlyStopLossNoLoanFee = "_axlyFeeStoplossWithLoan" | |
79 | 81 | ||
80 | 82 | let kAxlyStopLossLoanFee = "_axlyFeeStoplossNoLoan" | |
81 | 83 | ||
82 | 84 | let kRequestId = "_request_id" | |
83 | 85 | ||
84 | 86 | let kRequestIter = "requests_iter" | |
85 | 87 | ||
86 | 88 | let kPool = "pool_" | |
87 | 89 | ||
88 | 90 | let kPoolType = "_poolType" | |
89 | 91 | ||
90 | 92 | let kSharePool = "_poolShareId" | |
91 | 93 | ||
92 | 94 | let kPoolCapChange = "_poolCapChange" | |
93 | 95 | ||
94 | 96 | let kTokenLastPrice = "last_price" | |
95 | 97 | ||
96 | 98 | let kPriceInOracle = "_twap5B" | |
97 | 99 | ||
98 | 100 | let kActive = "active" | |
99 | 101 | ||
100 | 102 | let kActiveUsers = "activeUsers" | |
101 | 103 | ||
102 | 104 | let kActiveSFWX = "_active" | |
103 | 105 | ||
104 | 106 | let kPoolActive = "_activePool" | |
105 | 107 | ||
106 | 108 | let kUserStopLoss = "_stopLoss" | |
107 | 109 | ||
108 | 110 | let kFallbackExchangeSwopfi = "_fallbackExchangeSwopfi" | |
109 | 111 | ||
110 | 112 | let kMoneyBox = "axly_money_box" | |
111 | 113 | ||
112 | 114 | let kSFFarmingAddr = "swopfi_farming_addr" | |
113 | 115 | ||
114 | 116 | let kLendService = "lend_service_addr" | |
115 | 117 | ||
116 | 118 | let kOperatorCallPK = "admin_call_pub_key" | |
117 | 119 | ||
118 | 120 | let kPriceOracle = "price_oracle" | |
119 | 121 | ||
120 | 122 | let kExContract = "exchange_contract" | |
121 | 123 | ||
122 | 124 | let kWxSwapContract = "wx_swap_contract" | |
123 | 125 | ||
126 | + | let kWxRest = "wx_rest_addr" | |
127 | + | ||
124 | 128 | let kSwopId = "swop_id" | |
125 | 129 | ||
126 | 130 | let kWxId = "wx_id" | |
127 | 131 | ||
128 | 132 | let kGroup1Admin1PK = "group1_admin1_pub_key" | |
129 | 133 | ||
130 | 134 | let kGroup1Admin2PK = "group1_admin2_pub_key" | |
131 | 135 | ||
132 | 136 | let kGroup2Admin1PK = "group2_admin1_pub_key" | |
133 | 137 | ||
134 | 138 | let kGroup2Admin2PK = "group2_admin2_pub_key" | |
135 | 139 | ||
136 | - | let moneyBox = | |
140 | + | let moneyBox = addressFromStringValue(valueOrErrorMessage(getString(CONF, kMoneyBox), "No axly moneyBox address")) | |
137 | 141 | ||
138 | - | let exContract = | |
142 | + | let exContract = addressFromStringValue(valueOrErrorMessage(getString(CONF, kExContract), "No exchange contract address")) | |
139 | 143 | ||
140 | - | let priceOracleAddr = | |
144 | + | let priceOracleAddr = addressFromStringValue(valueOrErrorMessage(getString(CONF, kPriceOracle), "No price oracle address")) | |
141 | 145 | ||
142 | - | let wxSwapContract = | |
146 | + | let wxSwapContract = addressFromStringValue(valueOrErrorMessage(getString(CONF, kWxSwapContract), "No wx swap address")) | |
143 | 147 | ||
144 | - | let | |
148 | + | let wxRest = addressFromStringValue(valueOrErrorMessage(getString(CONF, kWxRest), "No wx rest address")) | |
145 | 149 | ||
146 | - | let | |
150 | + | let SWOPID = fromBase58String(valueOrErrorMessage(getString(CONF, kSwopId), "No swop id")) | |
147 | 151 | ||
148 | - | let | |
152 | + | let WXID = fromBase58String(valueOrErrorMessage(getString(CONF, kWxId), "No wx id")) | |
149 | 153 | ||
150 | - | let group1Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup1Admin2PK), "Can't get kGroup1Admin2PK")) | |
154 | + | let group1Admin1PK = fromBase58String(valueOrErrorMessage(getString(CONF, kGroup1Admin1PK), "Can't get kGroup1Admin1PK")) | |
155 | + | ||
156 | + | let group1Admin2PK = fromBase58String(valueOrErrorMessage(getString(CONF, kGroup1Admin2PK), "Can't get kGroup1Admin2PK")) | |
151 | 157 | ||
152 | 158 | let group2Admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin1PK), "Can't get kGroup2Admin1PK")) | |
153 | 159 | ||
154 | 160 | let group2Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin2PK), "Can't get kGroup2Admin1PK")) | |
155 | 161 | ||
156 | - | let operatorPK = fromBase58String(valueOrErrorMessage(getString( | |
162 | + | let operatorPK = fromBase58String(valueOrErrorMessage(getString(CONF, kOperatorCallPK), "Can't get operatorPK")) | |
157 | 163 | ||
158 | 164 | func unknownPoolType () = throw("Wrong pool type") | |
159 | 165 | ||
160 | 166 | ||
161 | - | func getLendSrvAddr () = | |
167 | + | func getLendSrvAddr () = addressFromStringValue(valueOrErrorMessage(getString(CONF, kLendService), "Can't get lend service addr")) | |
162 | 168 | ||
163 | 169 | ||
164 | 170 | func isOperatorCall (i) = if ((i.callerPublicKey == operatorPK)) | |
165 | 171 | then unit | |
166 | 172 | else throw("Only operator can call this function") | |
167 | 173 | ||
168 | 174 | ||
169 | 175 | func isAdminCall (i) = if (if ((i.callerPublicKey == group1Admin1PK)) | |
170 | 176 | then true | |
171 | 177 | else (i.callerPublicKey == group1Admin2PK)) | |
172 | 178 | then unit | |
173 | 179 | else throw("Only admin group1 can call this function") | |
174 | 180 | ||
175 | 181 | ||
176 | 182 | func isSelfCall (i) = if ((i.caller == this)) | |
177 | 183 | then unit | |
178 | 184 | else throw("Only contract itself can call this function") | |
179 | 185 | ||
180 | 186 | ||
181 | 187 | func isLandCall (i) = if ((i.caller == getLendSrvAddr())) | |
182 | 188 | then unit | |
183 | 189 | else throw("Only land contract can call this function") | |
184 | 190 | ||
185 | 191 | ||
186 | 192 | func isActive () = if ((valueOrElse(getBoolean(this, kActive), true) == true)) | |
187 | 193 | then unit | |
188 | 194 | else throw("DApp is inactive at this moment") | |
189 | 195 | ||
190 | 196 | ||
191 | 197 | func isActiveForUsers () = if (if (valueOrElse(getBoolean(this, kActive), true)) | |
192 | 198 | then (valueOrElse(getBoolean(this, kActiveUsers), true) == true) | |
193 | 199 | else false) | |
194 | 200 | then unit | |
195 | 201 | else throw("DApp is inactive for users at this moment") | |
196 | 202 | ||
197 | 203 | ||
198 | 204 | func isPoolActive (pool,type) = { | |
199 | 205 | let WXSFActive = valueOrElse(getBoolean(this, (type + kActiveSFWX)), true) | |
200 | 206 | let poolActive = valueOrElse(getBoolean(this, (pool + kPoolActive)), true) | |
201 | 207 | if (if (WXSFActive) | |
202 | 208 | then poolActive | |
203 | 209 | else false) | |
204 | 210 | then true | |
205 | 211 | else false | |
206 | 212 | } | |
207 | 213 | ||
208 | 214 | ||
209 | 215 | func accountBalance (assetId) = match assetId { | |
210 | 216 | case id: ByteVector => | |
211 | 217 | assetBalance(this, id) | |
212 | 218 | case waves: Unit => | |
213 | 219 | wavesBalance(this).available | |
214 | 220 | case _ => | |
215 | 221 | throw("Match error") | |
216 | 222 | } | |
217 | 223 | ||
218 | 224 | ||
219 | 225 | func getSFPoolBalances (poolAddr) = $Tuple2(valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance")) | |
220 | 226 | ||
221 | 227 | ||
222 | 228 | func getWXPoolBalances (poolAddr,aId,bId) = $Tuple2({ | |
223 | 229 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
224 | 230 | if ($isInstanceOf(@, "Int")) | |
225 | 231 | then @ | |
226 | 232 | else throw(($getType(@) + " couldn't be cast to Int")) | |
227 | 233 | }, { | |
228 | 234 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
229 | 235 | if ($isInstanceOf(@, "Int")) | |
230 | 236 | then @ | |
231 | 237 | else throw(($getType(@) + " couldn't be cast to Int")) | |
232 | 238 | }) | |
233 | 239 | ||
234 | 240 | ||
235 | 241 | func getPoolBalances (poolAddr,type,aId,bId) = if ((type == SF_POOL)) | |
236 | 242 | then getSFPoolBalances(poolAddr) | |
237 | 243 | else if ((type == WX_POOL)) | |
238 | 244 | then getWXPoolBalances(poolAddr, aId, bId) | |
239 | 245 | else unknownPoolType() | |
240 | 246 | ||
241 | 247 | ||
242 | 248 | func getSFPoolData (poolAddr) = { | |
243 | - | let $ | |
244 | - | if (($ | |
249 | + | let $t082738322 = getSFPoolBalances(poolAddr) | |
250 | + | if (($t082738322 == $t082738322)) | |
245 | 251 | then { | |
246 | - | let balB = $ | |
247 | - | let balA = $ | |
252 | + | let balB = $t082738322._2 | |
253 | + | let balA = $t082738322._1 | |
248 | 254 | $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), balA, balB, valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id")) | |
249 | 255 | } | |
250 | 256 | else throw("Strict value is not equal to itself.") | |
251 | 257 | } | |
252 | 258 | ||
253 | 259 | ||
254 | 260 | func getWXPoolData (poolAddr) = { | |
255 | 261 | let cfg = { | |
256 | 262 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
257 | 263 | if ($isInstanceOf(@, "List[Any]")) | |
258 | 264 | then @ | |
259 | 265 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
260 | 266 | } | |
261 | 267 | if ((cfg == cfg)) | |
262 | 268 | then { | |
263 | 269 | let aId = valueOrErrorMessage({ | |
264 | 270 | let @ = cfg[4] | |
265 | 271 | if ($isInstanceOf(@, "String")) | |
266 | 272 | then @ | |
267 | 273 | else unit | |
268 | 274 | }, "Can't get pool A asset id") | |
269 | 275 | let bId = valueOrErrorMessage({ | |
270 | 276 | let @ = cfg[5] | |
271 | 277 | if ($isInstanceOf(@, "String")) | |
272 | 278 | then @ | |
273 | 279 | else unit | |
274 | 280 | }, "Can't get pool B asset id") | |
275 | 281 | let shareId = valueOrErrorMessage({ | |
276 | 282 | let @ = cfg[3] | |
277 | 283 | if ($isInstanceOf(@, "String")) | |
278 | 284 | then @ | |
279 | 285 | else unit | |
280 | 286 | }, "Can't get pool LP asset id") | |
281 | - | let $ | |
282 | - | if (($ | |
287 | + | let $t090199078 = getWXPoolBalances(poolAddr, aId, bId) | |
288 | + | if (($t090199078 == $t090199078)) | |
283 | 289 | then { | |
284 | - | let balB = $ | |
285 | - | let balA = $ | |
290 | + | let balB = $t090199078._2 | |
291 | + | let balA = $t090199078._1 | |
286 | 292 | $Tuple5(aId, bId, balA, balB, shareId) | |
287 | 293 | } | |
288 | 294 | else throw("Strict value is not equal to itself.") | |
289 | 295 | } | |
290 | 296 | else throw("Strict value is not equal to itself.") | |
291 | 297 | } | |
292 | 298 | ||
293 | 299 | ||
294 | 300 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
295 | 301 | then getSFPoolData(poolAddr) | |
296 | 302 | else if ((type == WX_POOL)) | |
297 | 303 | then getWXPoolData(poolAddr) | |
298 | 304 | else unknownPoolType() | |
299 | 305 | ||
300 | 306 | ||
301 | 307 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
302 | 308 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
303 | 309 | else if ((type == WX_POOL)) | |
304 | 310 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
305 | 311 | else unknownPoolType() | |
306 | 312 | ||
307 | 313 | ||
308 | 314 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
309 | 315 | ||
310 | 316 | ||
311 | 317 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
312 | 318 | ||
313 | 319 | ||
314 | 320 | func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
315 | 321 | ||
316 | 322 | ||
317 | 323 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
318 | 324 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
319 | 325 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
320 | 326 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
321 | 327 | else if ((feeType == LOAN_FEE)) | |
322 | 328 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
323 | 329 | else if ((feeType == NO_LOAN_FEE)) | |
324 | 330 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
325 | 331 | else if ((feeType == NO_FEE)) | |
326 | 332 | then 0 | |
327 | 333 | else throw("Wrong fee type") | |
328 | 334 | ||
329 | 335 | ||
330 | 336 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
331 | 337 | ||
332 | 338 | ||
333 | 339 | func getWXFarmingAddr (poolAddr) = { | |
334 | 340 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
335 | 341 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
336 | 342 | Address(fromBase58String(factroyCfg[1])) | |
337 | 343 | } | |
338 | 344 | ||
339 | 345 | ||
340 | 346 | func assetIdToStr (assetId) = match assetId { | |
341 | 347 | case id: ByteVector => | |
342 | 348 | toBase58String(id) | |
343 | 349 | case waves: Unit => | |
344 | 350 | "WAVES" | |
345 | 351 | case _ => | |
346 | 352 | throw("Not Asset id") | |
347 | 353 | } | |
348 | 354 | ||
349 | 355 | ||
350 | 356 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
351 | 357 | then unit | |
352 | 358 | else fromBase58String(assetId) | |
353 | 359 | ||
354 | 360 | ||
355 | 361 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
356 | 362 | then 8 | |
357 | 363 | else match assetInfo(fromBase58String(assetId)) { | |
358 | 364 | case asset: Asset => | |
359 | 365 | asset.decimals | |
360 | 366 | case _ => | |
361 | 367 | throw("Can't find asset") | |
362 | 368 | } | |
363 | 369 | ||
364 | 370 | ||
365 | 371 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
366 | 372 | ||
367 | 373 | ||
368 | 374 | func getAssetsPrice (assetIds) = { | |
369 | 375 | func getPrices (a,assetId) = { | |
370 | 376 | let assetPrice = valueOrElse(getInteger(priceOracleAddr, (assetId + kPriceInOracle)), -1) | |
371 | 377 | (a :+ assetPrice) | |
372 | 378 | } | |
373 | 379 | ||
374 | 380 | let $l = assetIds | |
375 | 381 | let $s = size($l) | |
376 | 382 | let $acc0 = nil | |
377 | 383 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
378 | 384 | then $a | |
379 | 385 | else getPrices($a, $l[$i]) | |
380 | 386 | ||
381 | 387 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
382 | 388 | then $a | |
383 | 389 | else throw("List size exceeds 50") | |
384 | 390 | ||
385 | 391 | $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) | |
386 | 392 | } | |
387 | 393 | ||
388 | 394 | ||
389 | 395 | func getSharePrice (shareId) = { | |
390 | 396 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
391 | 397 | let poolAddr = Address(fromBase58String(pool)) | |
392 | 398 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
393 | - | let $ | |
394 | - | let aId = $ | |
395 | - | let bId = $ | |
396 | - | let aBalance = $ | |
397 | - | let bBalance = $ | |
399 | + | let $t01206712132 = getPoolData(poolAddr, pType) | |
400 | + | let aId = $t01206712132._1 | |
401 | + | let bId = $t01206712132._2 | |
402 | + | let aBalance = $t01206712132._3 | |
403 | + | let bBalance = $t01206712132._4 | |
398 | 404 | let prices = getAssetsPrice([aId, bId]) | |
399 | 405 | let dPriceA = prices[0] | |
400 | 406 | let dPriceB = prices[1] | |
401 | 407 | if (if ((0 > dPriceA)) | |
402 | 408 | then true | |
403 | 409 | else (0 > dPriceB)) | |
404 | 410 | then -1 | |
405 | 411 | else { | |
406 | 412 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
407 | 413 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
408 | 414 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
409 | 415 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
410 | 416 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
411 | 417 | fraction(sum, sharePrecision, shareSupply) | |
412 | 418 | } | |
413 | 419 | } | |
414 | 420 | ||
415 | 421 | ||
416 | 422 | func getSharePrices (shareIds) = { | |
417 | 423 | func getPrices (a,shareId) = (a :+ getSharePrice(shareId)) | |
418 | 424 | ||
419 | 425 | let $l = shareIds | |
420 | 426 | let $s = size($l) | |
421 | 427 | let $acc0 = nil | |
422 | 428 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
423 | 429 | then $a | |
424 | 430 | else getPrices($a, $l[$i]) | |
425 | 431 | ||
426 | 432 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
427 | 433 | then $a | |
428 | 434 | else throw("List size exceeds 20") | |
429 | 435 | ||
430 | 436 | $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) | |
431 | 437 | } | |
432 | 438 | ||
433 | 439 | ||
434 | 440 | func getCursEntries (aId,bId,shareId,wAmounts) = { | |
435 | 441 | let assetsPrices = getAssetsPrice([aId, bId]) | |
436 | 442 | let sharePrice = getSharePrice(shareId) | |
437 | 443 | let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts) | |
438 | 444 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
439 | 445 | } | |
440 | 446 | ||
441 | 447 | ||
442 | 448 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL)) | |
443 | 449 | then { | |
444 | 450 | let repl = { | |
445 | 451 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil) | |
446 | 452 | if ($isInstanceOf(@, "List[Any]")) | |
447 | 453 | then @ | |
448 | 454 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
449 | 455 | } | |
450 | 456 | if ((repl == repl)) | |
451 | 457 | then $Tuple5({ | |
452 | 458 | let @ = repl[3] | |
453 | 459 | if ($isInstanceOf(@, "Int")) | |
454 | 460 | then @ | |
455 | 461 | else throw(($getType(@) + " couldn't be cast to Int")) | |
456 | 462 | }, { | |
457 | 463 | let @ = repl[4] | |
458 | 464 | if ($isInstanceOf(@, "Int")) | |
459 | 465 | then @ | |
460 | 466 | else throw(($getType(@) + " couldn't be cast to Int")) | |
461 | 467 | }, { | |
462 | 468 | let @ = repl[1] | |
463 | 469 | if ($isInstanceOf(@, "Int")) | |
464 | 470 | then @ | |
465 | 471 | else throw(($getType(@) + " couldn't be cast to Int")) | |
466 | 472 | }, assetIdToStr(repl[2]), { | |
467 | 473 | let @ = repl[0] | |
468 | 474 | if ($isInstanceOf(@, "Int")) | |
469 | 475 | then @ | |
470 | 476 | else throw(($getType(@) + " couldn't be cast to Int")) | |
471 | 477 | }) | |
472 | 478 | else throw("Strict value is not equal to itself.") | |
473 | 479 | } | |
474 | 480 | else if ((pType == WX_POOL)) | |
475 | 481 | then { | |
476 | - | let $ | |
482 | + | let $t01367613926 = $Tuple2(split({ | |
477 | 483 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
478 | 484 | if ($isInstanceOf(@, "String")) | |
479 | 485 | then @ | |
480 | 486 | else throw(($getType(@) + " couldn't be cast to String")) | |
481 | 487 | }, "__"), split({ | |
482 | 488 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
483 | 489 | if ($isInstanceOf(@, "String")) | |
484 | 490 | then @ | |
485 | 491 | else throw(($getType(@) + " couldn't be cast to String")) | |
486 | 492 | }, "__")) | |
487 | - | if (($ | |
493 | + | if (($t01367613926 == $t01367613926)) | |
488 | 494 | then { | |
489 | - | let evalPutInB = $ | |
490 | - | let evalPutInA = $ | |
495 | + | let evalPutInB = $t01367613926._2 | |
496 | + | let evalPutInA = $t01367613926._1 | |
491 | 497 | let lpInA = parseIntValue(evalPutInA[1]) | |
492 | 498 | let lpInB = parseIntValue(evalPutInB[1]) | |
493 | 499 | if ((lpInB > lpInA)) | |
494 | 500 | then { | |
495 | 501 | let pmt = parseIntValue(evalPutInA[8]) | |
496 | 502 | $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB) | |
497 | 503 | } | |
498 | 504 | else { | |
499 | 505 | let pmt = parseIntValue(evalPutInB[7]) | |
500 | 506 | $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA) | |
501 | 507 | } | |
502 | 508 | } | |
503 | 509 | else throw("Strict value is not equal to itself.") | |
504 | 510 | } | |
505 | 511 | else unknownPoolType() | |
506 | 512 | ||
507 | 513 | ||
508 | 514 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
509 | 515 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
510 | 516 | if ((pType == SF_POOL)) | |
511 | 517 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
512 | 518 | else if ((pType == WX_POOL)) | |
513 | 519 | then invoke(poolAddr, "put", [1000000, false], payments) | |
514 | 520 | else unknownPoolType() | |
515 | 521 | } | |
516 | 522 | ||
517 | 523 | ||
518 | 524 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
519 | 525 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
520 | 526 | if ((pType == SF_POOL)) | |
521 | 527 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
522 | 528 | else if ((pType == WX_POOL)) | |
523 | 529 | then { | |
524 | 530 | let fc = if ((valueOrElse(getString(this, (toString(poolAddr) + kPoolType)), "cpmm") == FLAT)) | |
525 | 531 | then "putOneTknV2" | |
526 | 532 | else "putOneTkn" | |
527 | 533 | invoke(poolAddr, fc, [0, false], payments) | |
528 | 534 | } | |
529 | 535 | else unknownPoolType() | |
530 | 536 | } | |
531 | 537 | ||
532 | 538 | ||
533 | 539 | func stakeLP (pool,pType,shareId,amount) = { | |
534 | 540 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
535 | 541 | if ((pType == SF_POOL)) | |
536 | 542 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
537 | 543 | else if ((pType == WX_POOL)) | |
538 | 544 | then invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
539 | 545 | else unknownPoolType() | |
540 | 546 | } | |
541 | 547 | ||
542 | 548 | ||
543 | 549 | func unstakeLP (pool,pType,shareId,amount) = { | |
544 | - | let $ | |
550 | + | let $t01570416054 = if ((pType == SF_POOL)) | |
545 | 551 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
546 | 552 | else if ((pType == WX_POOL)) | |
547 | 553 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
548 | 554 | else unknownPoolType() | |
549 | - | let farmAddr = $ | |
550 | - | let fName = $ | |
551 | - | let params = $ | |
555 | + | let farmAddr = $t01570416054._1 | |
556 | + | let fName = $t01570416054._2 | |
557 | + | let params = $t01570416054._3 | |
552 | 558 | let inv = invoke(farmAddr, fName, params, nil) | |
553 | 559 | if ((inv == inv)) | |
554 | 560 | then amount | |
555 | 561 | else throw("Strict value is not equal to itself.") | |
556 | 562 | } | |
557 | 563 | ||
558 | 564 | ||
559 | 565 | func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
560 | 566 | let poolAddr = Address(fromBase58String(pool)) | |
561 | 567 | let feeScale6 = 1000000 | |
562 | 568 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
563 | 569 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
564 | - | let $ | |
570 | + | let $t01647616782 = if ((assetTokenToGet == assetIdA)) | |
565 | 571 | then { | |
566 | 572 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
567 | 573 | $Tuple2(amountToPay, assetIdB) | |
568 | 574 | } | |
569 | 575 | else { | |
570 | 576 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
571 | 577 | $Tuple2(amountToPay, assetIdA) | |
572 | 578 | } | |
573 | - | let amountToPay = $ | |
574 | - | let assetToPay = $ | |
579 | + | let amountToPay = $t01647616782._1 | |
580 | + | let assetToPay = $t01647616782._2 | |
575 | 581 | $Tuple2(assetToPay, amountToPay) | |
576 | 582 | } | |
577 | 583 | ||
578 | 584 | ||
579 | 585 | func getWXSwapFees (pool) = { | |
580 | 586 | let poolAddr = addressFromStringValue(pool) | |
581 | 587 | let fContract = addressFromStringValue(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")) | |
582 | 588 | let poolFeeDefault = value(getInteger(wxSwapContract, "%s__poolFee")) | |
583 | 589 | let protocolFeeDefault = value(getInteger(wxSwapContract, "%s__protocolFee")) | |
584 | 590 | match invoke(fContract, "getSwapFeeREADONLY", [toString(poolAddr)], nil) { | |
585 | 591 | case fees: (Int, Int) => | |
586 | 592 | $Tuple2(fees._1, fees._2) | |
587 | 593 | case _ => | |
588 | 594 | $Tuple2(poolFeeDefault, protocolFeeDefault) | |
589 | 595 | } | |
590 | 596 | } | |
591 | 597 | ||
592 | 598 | ||
593 | 599 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
594 | - | let $ | |
595 | - | let pFee = $ | |
596 | - | let prFee = $ | |
600 | + | let $t01752217561 = getWXSwapFees(pool) | |
601 | + | let pFee = $t01752217561._1 | |
602 | + | let prFee = $t01752217561._2 | |
597 | 603 | let feeScale = toBigInt(100000000) | |
598 | - | let $ | |
604 | + | let $t01760117909 = if ((assetTokenToGet == assetIdA)) | |
599 | 605 | then { | |
600 | 606 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
601 | 607 | $Tuple2(amountToPay, assetIdB) | |
602 | 608 | } | |
603 | 609 | else { | |
604 | 610 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
605 | 611 | $Tuple2(amountToPay, assetIdA) | |
606 | 612 | } | |
607 | - | let amountToPay = $ | |
608 | - | let assetToPay = $ | |
613 | + | let amountToPay = $t01760117909._1 | |
614 | + | let assetToPay = $t01760117909._2 | |
609 | 615 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
610 | 616 | $Tuple2(assetToPay, amountToPayWithFee) | |
611 | 617 | } | |
612 | 618 | ||
613 | 619 | ||
614 | 620 | func exchangeDirectly (pType,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
615 | 621 | let poolFB = valueOrElse(getString(this, (pool + kFallbackExchangeSwopfi)), "") | |
616 | 622 | if (if ((pType == SF_POOL)) | |
617 | 623 | then true | |
618 | 624 | else (poolFB != "")) | |
619 | 625 | then { | |
620 | - | let $ | |
626 | + | let $t01835018562 = if ((poolFB == "")) | |
621 | 627 | then $Tuple3(balA, balB, pool) | |
622 | 628 | else { | |
623 | - | let $ | |
624 | - | let sfBalA = $ | |
625 | - | let sfBalB = $ | |
629 | + | let $t01845618529 = getSFPoolBalances(addressFromStringValue(poolFB)) | |
630 | + | let sfBalA = $t01845618529._1 | |
631 | + | let sfBalB = $t01845618529._2 | |
626 | 632 | $Tuple3(sfBalA, sfBalB, poolFB) | |
627 | 633 | } | |
628 | - | let pBalA = $ | |
629 | - | let pBalB = $ | |
630 | - | let exPool = $ | |
631 | - | let $ | |
632 | - | let assetToPay = $ | |
633 | - | let amountToPay = $ | |
634 | + | let pBalA = $t01835018562._1 | |
635 | + | let pBalB = $t01835018562._2 | |
636 | + | let exPool = $t01835018562._3 | |
637 | + | let $t01856718693 = calcAmountToPaySF(exPool, assetIdA, assetIdB, pBalA, pBalB, amountTokenToGet, assetTokenToGet) | |
638 | + | let assetToPay = $t01856718693._1 | |
639 | + | let amountToPay = $t01856718693._2 | |
634 | 640 | invoke(addressFromStringValue(exPool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
635 | 641 | } | |
636 | 642 | else if ((pType == WX_POOL)) | |
637 | 643 | then { | |
638 | - | let $ | |
639 | - | let assetToPay = $ | |
640 | - | let amountToPay = $ | |
644 | + | let $t01889519017 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
645 | + | let assetToPay = $t01889519017._1 | |
646 | + | let amountToPay = $t01889519017._2 | |
641 | 647 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
642 | 648 | } | |
643 | 649 | else unknownPoolType() | |
644 | 650 | } | |
645 | 651 | ||
646 | 652 | ||
647 | 653 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
648 | - | let $ | |
654 | + | let $t01930420539 = if ((pType == SF_POOL)) | |
649 | 655 | then { | |
650 | 656 | let inv = { | |
651 | 657 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
652 | 658 | if ($isInstanceOf(@, "List[Any]")) | |
653 | 659 | then @ | |
654 | 660 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
655 | 661 | } | |
656 | 662 | if ((inv == inv)) | |
657 | 663 | then $Tuple2({ | |
658 | 664 | let @ = inv[0] | |
659 | 665 | if ($isInstanceOf(@, "Int")) | |
660 | 666 | then @ | |
661 | 667 | else throw(($getType(@) + " couldn't be cast to Int")) | |
662 | 668 | }, { | |
663 | 669 | let @ = inv[1] | |
664 | 670 | if ($isInstanceOf(@, "Int")) | |
665 | 671 | then @ | |
666 | 672 | else throw(($getType(@) + " couldn't be cast to Int")) | |
667 | 673 | }) | |
668 | 674 | else throw("Strict value is not equal to itself.") | |
669 | 675 | } | |
670 | 676 | else if ((pType == WX_POOL)) | |
671 | 677 | then if ((valueOrElse(getString(this, (toString(poolAddr) + kPoolType)), "cpmm") == FLAT)) | |
672 | 678 | then { | |
673 | 679 | let inv = invoke(poolAddr, "estimateGetOperationWrapperREADONLY", ["", shareId, userCanWithdraw, toString(this)], nil) | |
674 | 680 | if ((inv == inv)) | |
675 | 681 | then { | |
676 | - | let $ | |
682 | + | let $t01979720294 = match inv { | |
677 | 683 | case _ => | |
678 | 684 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
679 | 685 | then if ($isInstanceOf($match0._2, "Int")) | |
680 | 686 | then if ($isInstanceOf($match0._5, "Int")) | |
681 | 687 | then if ($isInstanceOf($match0._6, "Int")) | |
682 | 688 | then if ($isInstanceOf($match0._7, "Int")) | |
683 | 689 | then if ($isInstanceOf($match0._8, "String")) | |
684 | 690 | then $isInstanceOf($match0._9, "String") | |
685 | 691 | else false | |
686 | 692 | else false | |
687 | 693 | else false | |
688 | 694 | else false | |
689 | 695 | else false | |
690 | 696 | else false) | |
691 | 697 | then (size($match0) == 10) | |
692 | 698 | else false) | |
693 | 699 | then { | |
694 | 700 | let outAmAmt = $match0._1 | |
695 | 701 | let outPrAmt = $match0._2 | |
696 | 702 | let amBalance = $match0._5 | |
697 | 703 | let prBalance = $match0._6 | |
698 | 704 | let lpEmission = $match0._7 | |
699 | 705 | let curPrice = $match0._8 | |
700 | 706 | let poolStatus = $match0._9 | |
701 | 707 | $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus) | |
702 | 708 | } | |
703 | 709 | else throw("Couldn't cast types") | |
704 | 710 | } | |
705 | - | let outAmAmt = $ | |
706 | - | let outPrAmt = $ | |
707 | - | let amBalance = $ | |
708 | - | let prBalance = $ | |
709 | - | let lpEmission = $ | |
710 | - | let curPrice = $ | |
711 | - | let poolStatus = $ | |
711 | + | let outAmAmt = $t01979720294._1 | |
712 | + | let outPrAmt = $t01979720294._2 | |
713 | + | let amBalance = $t01979720294._3 | |
714 | + | let prBalance = $t01979720294._4 | |
715 | + | let lpEmission = $t01979720294._5 | |
716 | + | let curPrice = $t01979720294._6 | |
717 | + | let poolStatus = $t01979720294._7 | |
712 | 718 | $Tuple2(outAmAmt, outPrAmt) | |
713 | 719 | } | |
714 | 720 | else throw("Strict value is not equal to itself.") | |
715 | 721 | } | |
716 | 722 | else { | |
717 | 723 | let inv = split({ | |
718 | 724 | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil) | |
719 | 725 | if ($isInstanceOf(@, "String")) | |
720 | 726 | then @ | |
721 | 727 | else throw(($getType(@) + " couldn't be cast to String")) | |
722 | 728 | }, "__") | |
723 | 729 | if ((inv == inv)) | |
724 | 730 | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
725 | 731 | else throw("Strict value is not equal to itself.") | |
726 | 732 | } | |
727 | 733 | else unknownPoolType() | |
728 | - | let amountA = $ | |
729 | - | let amountB = $ | |
734 | + | let amountA = $t01930420539._1 | |
735 | + | let amountB = $t01930420539._2 | |
730 | 736 | $Tuple2(amountA, amountB) | |
731 | 737 | } | |
732 | 738 | ||
733 | 739 | ||
734 | 740 | func claimFarmed (pType,pool) = if ((pType == SF_POOL)) | |
735 | 741 | then { | |
736 | 742 | let balBefore = accountBalance(SWOPID) | |
737 | 743 | if ((balBefore == balBefore)) | |
738 | 744 | then { | |
739 | 745 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
740 | 746 | if ((inv == inv)) | |
741 | 747 | then { | |
742 | 748 | let balAfter = accountBalance(SWOPID) | |
743 | 749 | $Tuple2((balAfter - balBefore), SWOPID) | |
744 | 750 | } | |
745 | 751 | else throw("Strict value is not equal to itself.") | |
746 | 752 | } | |
747 | 753 | else throw("Strict value is not equal to itself.") | |
748 | 754 | } | |
749 | 755 | else if ((pType == WX_POOL)) | |
750 | 756 | then { | |
751 | - | let $ | |
752 | - | let aId = $ | |
753 | - | let bId = $ | |
754 | - | let aBal = $ | |
755 | - | let bBal = $ | |
756 | - | let lpId = $ | |
757 | + | let $t02090720986 = getWXPoolData(addressFromStringValue(pool)) | |
758 | + | let aId = $t02090720986._1 | |
759 | + | let bId = $t02090720986._2 | |
760 | + | let aBal = $t02090720986._3 | |
761 | + | let bBal = $t02090720986._4 | |
762 | + | let lpId = $t02090720986._5 | |
757 | 763 | let balBefore = accountBalance(WXID) | |
758 | 764 | if ((balBefore == balBefore)) | |
759 | 765 | then { | |
760 | 766 | let inv = invoke(getWXFarmingAddr(addressFromStringValue(pool)), "claimWx", [lpId], nil) | |
761 | 767 | if ((inv == inv)) | |
762 | 768 | then { | |
763 | 769 | let balAfter = accountBalance(WXID) | |
764 | 770 | $Tuple2((balAfter - balBefore), WXID) | |
765 | 771 | } | |
766 | 772 | else throw("Strict value is not equal to itself.") | |
767 | 773 | } | |
768 | 774 | else throw("Strict value is not equal to itself.") | |
769 | 775 | } | |
770 | 776 | else unknownPoolType() | |
771 | 777 | ||
772 | 778 | ||
773 | 779 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
774 | 780 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
775 | 781 | if ((lpBalanceBefore == lpBalanceBefore)) | |
776 | 782 | then { | |
777 | 783 | let poolAddr = addressFromStringValue(pool) | |
778 | - | let $ | |
784 | + | let $t02158422000 = if (if ((pmtA > 0)) | |
779 | 785 | then (pmtB > 0) | |
780 | 786 | else false) | |
781 | 787 | then { | |
782 | - | let $ | |
783 | - | let pmtInA = $ | |
784 | - | let pmtInB = $ | |
785 | - | let change = $ | |
786 | - | let changeId = $ | |
788 | + | let $t02165021766 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
789 | + | let pmtInA = $t02165021766._1 | |
790 | + | let pmtInB = $t02165021766._2 | |
791 | + | let change = $t02165021766._3 | |
792 | + | let changeId = $t02165021766._4 | |
787 | 793 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
788 | 794 | if ((inv == inv)) | |
789 | 795 | then $Tuple2(change, changeId) | |
790 | 796 | else throw("Strict value is not equal to itself.") | |
791 | 797 | } | |
792 | 798 | else if ((pmtA > 0)) | |
793 | 799 | then $Tuple2(pmtA, aId) | |
794 | 800 | else if ((pmtB > 0)) | |
795 | 801 | then $Tuple2(pmtB, bId) | |
796 | 802 | else throw("pmts must be > 0") | |
797 | - | let change = $ | |
798 | - | let changeId = $ | |
803 | + | let change = $t02158422000._1 | |
804 | + | let changeId = $t02158422000._2 | |
799 | 805 | let inv = if ((change > 0)) | |
800 | 806 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
801 | 807 | else nil | |
802 | 808 | if ((inv == inv)) | |
803 | 809 | then { | |
804 | 810 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
805 | 811 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
806 | 812 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
807 | 813 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
808 | 814 | if ((0 >= userShareForStake)) | |
809 | 815 | then throw("amount of staked sharetokens must be > 0") | |
810 | 816 | else { | |
811 | 817 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
812 | 818 | if ((invLP == invLP)) | |
813 | 819 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
814 | 820 | else throw("Strict value is not equal to itself.") | |
815 | 821 | } | |
816 | 822 | } | |
817 | 823 | else throw("Strict value is not equal to itself.") | |
818 | 824 | } | |
819 | 825 | else throw("Strict value is not equal to itself.") | |
820 | 826 | } | |
821 | 827 | ||
822 | 828 | ||
823 | 829 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
824 | 830 | let totalAmount = getPoolTotalShare(pool) | |
825 | 831 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
826 | - | let $ | |
832 | + | let $t02285723095 = if (withLoan) | |
827 | 833 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
828 | 834 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
829 | - | let curPoolInterest = $ | |
830 | - | let totalStakedWithLoan = $ | |
835 | + | let curPoolInterest = $t02285723095._1 | |
836 | + | let totalStakedWithLoan = $t02285723095._2 | |
831 | 837 | [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))] | |
832 | 838 | } | |
833 | 839 | ||
834 | 840 | ||
835 | 841 | func listToInt (a,item) = (a :+ parseIntValue(item)) | |
836 | 842 | ||
837 | 843 | ||
838 | 844 | func directSwopfiCPMM (rArgs,tokenTo) = { | |
839 | 845 | let dApp = addressFromStringValue(rArgs[1]) | |
840 | 846 | let pmtP = split(rArgs[2], "|") | |
841 | 847 | let tokenBalanceBefore = accountBalance(assetIdFromStr(tokenTo)) | |
842 | 848 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
843 | 849 | then { | |
844 | 850 | let pmt = [AttachedPayment(assetIdFromStr(pmtP[0]), parseIntValue(pmtP[1]))] | |
845 | 851 | let minToRecive = rArgs[3] | |
846 | 852 | let inv = invoke(dApp, "callFunction", ["exchange", [minToRecive]], pmt) | |
847 | 853 | if ((inv == inv)) | |
848 | 854 | then (accountBalance(assetIdFromStr(tokenTo)) - tokenBalanceBefore) | |
849 | 855 | else throw("Strict value is not equal to itself.") | |
850 | 856 | } | |
851 | 857 | else throw("Strict value is not equal to itself.") | |
852 | 858 | } | |
853 | 859 | ||
854 | 860 | ||
855 | 861 | func directRoutingSwopfi (rArgs,tokenTo) = { | |
856 | 862 | let dApp = addressFromStringValue(rArgs[1]) | |
857 | 863 | let tokenBalanceBefore = accountBalance(assetIdFromStr(tokenTo)) | |
858 | 864 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
859 | 865 | then { | |
860 | 866 | let pmt = { | |
861 | 867 | let pmtP = split(rArgs[2], "|") | |
862 | 868 | [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))] | |
863 | 869 | } | |
864 | 870 | let args = { | |
865 | 871 | let eArgs = split(rArgs[3], "|") | |
866 | 872 | let exchangers = split(eArgs[0], ",") | |
867 | 873 | let exchangersType = split(eArgs[1], ",") | |
868 | 874 | let args1 = { | |
869 | 875 | let $l = split(eArgs[2], ",") | |
870 | 876 | let $s = size($l) | |
871 | 877 | let $acc0 = nil | |
872 | 878 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
873 | 879 | then $a | |
874 | 880 | else listToInt($a, $l[$i]) | |
875 | 881 | ||
876 | 882 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
877 | 883 | then $a | |
878 | 884 | else throw("List size exceeds 3") | |
879 | 885 | ||
880 | 886 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
881 | 887 | } | |
882 | 888 | let args2 = { | |
883 | 889 | let $l = split(eArgs[3], ",") | |
884 | 890 | let $s = size($l) | |
885 | 891 | let $acc0 = nil | |
886 | 892 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
887 | 893 | then $a | |
888 | 894 | else listToInt($a, $l[$i]) | |
889 | 895 | ||
890 | 896 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
891 | 897 | then $a | |
892 | 898 | else throw("List size exceeds 3") | |
893 | 899 | ||
894 | 900 | $f1_2($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3) | |
895 | 901 | } | |
896 | 902 | let routingAssetsKeys = split(eArgs[4], ",") | |
897 | 903 | let minToRecive = parseIntValue(eArgs[5]) | |
898 | 904 | [exchangers, exchangersType, args1, args2, routingAssetsKeys, minToRecive] | |
899 | 905 | } | |
900 | 906 | let inv = invoke(dApp, "routingTrade", args, pmt) | |
901 | 907 | if ((inv == inv)) | |
902 | 908 | then (accountBalance(assetIdFromStr(tokenTo)) - tokenBalanceBefore) | |
903 | 909 | else throw("Strict value is not equal to itself.") | |
904 | 910 | } | |
905 | 911 | else throw("Strict value is not equal to itself.") | |
906 | 912 | } | |
907 | 913 | ||
908 | 914 | ||
909 | 915 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
910 | 916 | let poolAddr = Address(fromBase58String(pool)) | |
911 | - | let $ | |
912 | - | let AId = $ | |
913 | - | let BId = $ | |
914 | - | let balA = $ | |
915 | - | let balB = $ | |
916 | - | let shareId = $ | |
917 | + | let $t02520225268 = getPoolData(poolAddr, pType) | |
918 | + | let AId = $t02520225268._1 | |
919 | + | let BId = $t02520225268._2 | |
920 | + | let balA = $t02520225268._3 | |
921 | + | let balB = $t02520225268._4 | |
922 | + | let shareId = $t02520225268._5 | |
917 | 923 | if (if ((tokenId != AId)) | |
918 | 924 | then (tokenId != BId) | |
919 | 925 | else false) | |
920 | 926 | then throw("Wrong asset") | |
921 | 927 | else { | |
922 | 928 | let totalShareAmount = getPoolTotalShare(pool) | |
923 | 929 | if ((totalShareAmount == 0)) | |
924 | 930 | then [ScriptTransfer(moneyBox, tokenAmount, fromBase58String(tokenId))] | |
925 | 931 | else { | |
926 | 932 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
927 | 933 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
928 | 934 | let tokensForFeeLoan = fraction(tokenAmount, loanPercent, SCALE8) | |
929 | 935 | let tokensForFeeNoLoan = (tokenAmount - tokensForFeeLoan) | |
930 | 936 | let axlyFeeLoan = fraction(tokensForFeeLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
931 | 937 | let axlyFeeNoLoan = fraction(tokensForFeeNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
932 | 938 | let axlyFee = (axlyFeeLoan + axlyFeeNoLoan) | |
933 | - | let $ | |
939 | + | let $t02601326113 = if ((tokenId == AId)) | |
934 | 940 | then $Tuple2((tokenAmount - axlyFee), 0) | |
935 | 941 | else $Tuple2(0, (tokenAmount - axlyFee)) | |
936 | - | let pmtA = $ | |
937 | - | let pmtB = $ | |
938 | - | let $ | |
939 | - | let stakedAmount = $ | |
940 | - | let nf = $ | |
942 | + | let pmtA = $t02601326113._1 | |
943 | + | let pmtB = $t02601326113._2 | |
944 | + | let $t02611626220 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
945 | + | let stakedAmount = $t02611626220._1 | |
946 | + | let nf = $t02611626220._2 | |
941 | 947 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
942 | 948 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
943 | 949 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
944 | 950 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
945 | 951 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
946 | 952 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
947 | 953 | else 0 | |
948 | 954 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
949 | 955 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
950 | 956 | else 0 | |
951 | 957 | ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), (totalShareAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), (totalShareAmountWithLoan + stakedLoan)), ScriptTransfer(moneyBox, axlyFee, assetIdFromStr(tokenId))] ++ getCursEntries(AId, BId, shareId, nil)) | |
952 | 958 | } | |
953 | 959 | } | |
954 | 960 | } | |
955 | 961 | ||
956 | 962 | ||
957 | 963 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
958 | 964 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
959 | 965 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
960 | 966 | let poolInterest = if (borrowed) | |
961 | 967 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
962 | 968 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
963 | 969 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
964 | 970 | } | |
965 | 971 | ||
966 | 972 | ||
967 | 973 | func calcStopLossFee (pool,isBorrowed,stopLoss,lpWithdraw) = { | |
968 | 974 | let feeType = if (isBorrowed) | |
969 | 975 | then STOPLOSS_LOAN | |
970 | 976 | else STOPLOSS_FEE_NO_LOAN | |
971 | 977 | if (stopLoss) | |
972 | 978 | then fraction(lpWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6) | |
973 | 979 | else 0 | |
974 | 980 | } | |
975 | 981 | ||
976 | 982 | ||
977 | 983 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
978 | 984 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
979 | 985 | let isBorrowed = (valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) > 0) | |
980 | 986 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, isBorrowed) | |
981 | 987 | let poolTotalShare = getPoolTotalShare(pool) | |
982 | 988 | let poolTotalShareLoan = getPoolTotalShareWithLoan(pool) | |
983 | 989 | let userAddr = Address(fromBase58String(user)) | |
984 | 990 | let poolAddr = Address(fromBase58String(pool)) | |
985 | 991 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
986 | - | let $ | |
987 | - | let idAStr = $ | |
988 | - | let idBStr = $ | |
989 | - | let balA = $ | |
990 | - | let balB = $ | |
991 | - | let shareId = $ | |
992 | - | let $ | |
993 | - | let idA = $ | |
994 | - | let idB = $ | |
992 | + | let $t02874928821 = getPoolData(poolAddr, pType) | |
993 | + | let idAStr = $t02874928821._1 | |
994 | + | let idBStr = $t02874928821._2 | |
995 | + | let balA = $t02874928821._3 | |
996 | + | let balB = $t02874928821._4 | |
997 | + | let shareId = $t02874928821._5 | |
998 | + | let $t02882428891 = $Tuple2(assetIdFromStr(idAStr), assetIdFromStr(idBStr)) | |
999 | + | let idA = $t02882428891._1 | |
1000 | + | let idB = $t02882428891._2 | |
995 | 1001 | let stopLossFee = calcStopLossFee(pool, isBorrowed, stopLoss, userCanWithdraw) | |
996 | 1002 | let cBalABefore = accountBalance(idA) | |
997 | 1003 | if ((cBalABefore == cBalABefore)) | |
998 | 1004 | then { | |
999 | 1005 | let cBalBBefore = accountBalance(idB) | |
1000 | 1006 | if ((cBalBBefore == cBalBBefore)) | |
1001 | 1007 | then { | |
1002 | 1008 | let inv = if ((pType == SF_POOL)) | |
1003 | 1009 | then { | |
1004 | 1010 | let inv = unstakeLP(pool, pType, shareId, stopLossFee) | |
1005 | 1011 | if ((inv == inv)) | |
1006 | 1012 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
1007 | 1013 | else throw("Strict value is not equal to itself.") | |
1008 | 1014 | } | |
1009 | 1015 | else if ((pType == WX_POOL)) | |
1010 | 1016 | then { | |
1011 | 1017 | let inv = unstakeLP(pool, pType, shareId, (userCanWithdraw + stopLossFee)) | |
1012 | 1018 | if ((inv == inv)) | |
1013 | 1019 | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
1014 | 1020 | else throw("Strict value is not equal to itself.") | |
1015 | 1021 | } | |
1016 | 1022 | else unknownPoolType() | |
1017 | 1023 | if ((inv == inv)) | |
1018 | 1024 | then { | |
1019 | 1025 | let cBalAAfter = accountBalance(idA) | |
1020 | 1026 | if ((cBalAAfter == cBalAAfter)) | |
1021 | 1027 | then { | |
1022 | 1028 | let cBalBAfter = accountBalance(idB) | |
1023 | 1029 | if ((cBalBAfter == cBalBAfter)) | |
1024 | 1030 | then { | |
1025 | - | let $ | |
1026 | - | let tokensAmountA = $ | |
1027 | - | let tokensAmountB = $ | |
1028 | - | let $ | |
1031 | + | let $t02958629675 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
1032 | + | let tokensAmountA = $t02958629675._1 | |
1033 | + | let tokensAmountB = $t02958629675._2 | |
1034 | + | let $t02967830914 = if (isBorrowed) | |
1029 | 1035 | then { | |
1030 | 1036 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1031 | 1037 | let debt = { | |
1032 | 1038 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil) | |
1033 | 1039 | if ($isInstanceOf(@, "Int")) | |
1034 | 1040 | then @ | |
1035 | 1041 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1036 | 1042 | } | |
1037 | 1043 | if ((debt == debt)) | |
1038 | 1044 | then { | |
1039 | 1045 | let amountToGetEx = if (if ((borrowAsset == idAStr)) | |
1040 | 1046 | then (debt > tokensAmountA) | |
1041 | 1047 | else false) | |
1042 | 1048 | then (debt - tokensAmountA) | |
1043 | 1049 | else if (if ((borrowAsset == idBStr)) | |
1044 | 1050 | then (debt > tokensAmountB) | |
1045 | 1051 | else false) | |
1046 | 1052 | then (debt - tokensAmountB) | |
1047 | 1053 | else 0 | |
1048 | 1054 | let exInv = if ((amountToGetEx > 0)) | |
1049 | 1055 | then exchangeDirectly(pType, pool, idAStr, idBStr, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset) | |
1050 | 1056 | else nil | |
1051 | 1057 | if ((exInv == exInv)) | |
1052 | 1058 | then { | |
1053 | 1059 | let cBalAAfterRepay = accountBalance(idA) | |
1054 | 1060 | if ((cBalAAfterRepay == cBalAAfterRepay)) | |
1055 | 1061 | then { | |
1056 | 1062 | let cBalBAfterRepay = accountBalance(idB) | |
1057 | 1063 | if ((cBalBAfterRepay == cBalBAfterRepay)) | |
1058 | 1064 | then { | |
1059 | 1065 | let closeDbtInv = if ((debt > 0)) | |
1060 | 1066 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
1061 | 1067 | else 0 | |
1062 | 1068 | if ((closeDbtInv == closeDbtInv)) | |
1063 | 1069 | then if ((borrowAsset == idAStr)) | |
1064 | 1070 | then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore)) | |
1065 | 1071 | else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt)) | |
1066 | 1072 | else throw("Strict value is not equal to itself.") | |
1067 | 1073 | } | |
1068 | 1074 | else throw("Strict value is not equal to itself.") | |
1069 | 1075 | } | |
1070 | 1076 | else throw("Strict value is not equal to itself.") | |
1071 | 1077 | } | |
1072 | 1078 | else throw("Strict value is not equal to itself.") | |
1073 | 1079 | } | |
1074 | 1080 | else throw("Strict value is not equal to itself.") | |
1075 | 1081 | } | |
1076 | 1082 | else $Tuple2(tokensAmountA, tokensAmountB) | |
1077 | - | let toUserA = $ | |
1078 | - | let toUserB = $ | |
1083 | + | let toUserA = $t02967830914._1 | |
1084 | + | let toUserB = $t02967830914._2 | |
1079 | 1085 | let poolTotalLoanEntries = if (isBorrowed) | |
1080 | 1086 | then [IntegerEntry((pool + kPoolTotalLoan), ((poolTotalShareLoan - userCanWithdraw) - stopLossFee))] | |
1081 | 1087 | else nil | |
1082 | 1088 | let entries = (([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserA, idA), ScriptTransfer(userAddr, toUserB, idB), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ poolTotalLoanEntries) ++ getCursEntries(idAStr, idBStr, shareId, nil)) | |
1083 | 1089 | $Tuple2(entries, [toUserA, toUserB]) | |
1084 | 1090 | } | |
1085 | 1091 | else throw("Strict value is not equal to itself.") | |
1086 | 1092 | } | |
1087 | 1093 | else throw("Strict value is not equal to itself.") | |
1088 | 1094 | } | |
1089 | 1095 | else throw("Strict value is not equal to itself.") | |
1090 | 1096 | } | |
1091 | 1097 | else throw("Strict value is not equal to itself.") | |
1092 | 1098 | } | |
1093 | 1099 | else throw("Strict value is not equal to itself.") | |
1094 | 1100 | } | |
1095 | 1101 | ||
1096 | 1102 | ||
1097 | 1103 | func parseRequest (requestId) = { | |
1098 | 1104 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
1099 | 1105 | let user = request[0] | |
1100 | 1106 | let pool = request[1] | |
1101 | 1107 | let pmtA = parseIntValue(request[2]) | |
1102 | 1108 | let AId = request[3] | |
1103 | 1109 | let pmtB = parseIntValue(request[4]) | |
1104 | 1110 | let BId = request[5] | |
1105 | 1111 | let balA = parseIntValue(request[6]) | |
1106 | 1112 | let balB = parseIntValue(request[7]) | |
1107 | 1113 | let shareId = request[8] | |
1108 | 1114 | let bwAsset = request[9] | |
1109 | 1115 | let bwAmount = parseIntValue(request[10]) | |
1110 | 1116 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
1111 | 1117 | } | |
1112 | 1118 | ||
1113 | 1119 | ||
1114 | 1120 | func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = if (if ((borrowId != aId)) | |
1115 | 1121 | then (borrowId != bId) | |
1116 | 1122 | else false) | |
1117 | 1123 | then throw("Wrong borrow asset") | |
1118 | 1124 | else { | |
1119 | 1125 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
1120 | 1126 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
1121 | 1127 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
1122 | 1128 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
1123 | 1129 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
1124 | - | let $ | |
1130 | + | let $t03289632993 = if ((borrowId == aId)) | |
1125 | 1131 | then $Tuple2(dPriceA, decPrA) | |
1126 | 1132 | else $Tuple2(dPriceB, decPrB) | |
1127 | - | let borrowPrice = $ | |
1128 | - | let borrowDecPr = $ | |
1133 | + | let borrowPrice = $t03289632993._1 | |
1134 | + | let borrowDecPr = $t03289632993._2 | |
1129 | 1135 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
1130 | 1136 | } | |
1131 | 1137 | ||
1132 | 1138 | ||
1133 | 1139 | func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2)) | |
1134 | 1140 | then if ((assetIdToStr(pmts[0].assetId) != AId)) | |
1135 | 1141 | then throw("Wrong payment asset A") | |
1136 | 1142 | else if ((assetIdToStr(pmts[1].assetId) != BId)) | |
1137 | 1143 | then throw("Wrong payment asset B") | |
1138 | 1144 | else $Tuple2(pmts[0].amount, pmts[1].amount) | |
1139 | 1145 | else if ((size(pmts) == 1)) | |
1140 | 1146 | then if ((assetIdToStr(pmts[0].assetId) == AId)) | |
1141 | 1147 | then $Tuple2(pmts[0].amount, 0) | |
1142 | 1148 | else if ((assetIdToStr(pmts[0].assetId) == BId)) | |
1143 | 1149 | then $Tuple2(0, pmts[0].amount) | |
1144 | 1150 | else throw("Wrong payment") | |
1145 | 1151 | else throw("One or two payments expected") | |
1146 | 1152 | ||
1147 | 1153 | ||
1148 | 1154 | func calcPriceImpact (balA,balB,newBalA,newBalB) = { | |
1149 | 1155 | let pri = ((SCALE8 - fraction(fraction(balB, SCALE8, balA), SCALE8, fraction(newBalB, SCALE8, newBalA))) * 100) | |
1150 | 1156 | if ((0 > pri)) | |
1151 | 1157 | then (pri * -1) | |
1152 | 1158 | else pri | |
1153 | 1159 | } | |
1154 | 1160 | ||
1155 | 1161 | ||
1156 | 1162 | func claimAndCheckAmnt (pool,pType,claim,amount,change) = { | |
1157 | - | let $ | |
1163 | + | let $t03399334255 = if (claim) | |
1158 | 1164 | then claimFarmed(pType, pool) | |
1159 | 1165 | else { | |
1160 | 1166 | let claimedAsset = if ((pType == SF_POOL)) | |
1161 | 1167 | then SWOPID | |
1162 | 1168 | else if ((pType == WX_POOL)) | |
1163 | 1169 | then WXID | |
1164 | 1170 | else unknownPoolType() | |
1165 | 1171 | $Tuple2(amount, claimedAsset) | |
1166 | 1172 | } | |
1167 | - | if (($ | |
1173 | + | if (($t03399334255 == $t03399334255)) | |
1168 | 1174 | then { | |
1169 | - | let claimAsset = $ | |
1170 | - | let claimAmount = $ | |
1175 | + | let claimAsset = $t03399334255._2 | |
1176 | + | let claimAmount = $t03399334255._1 | |
1171 | 1177 | let bal = accountBalance(claimAsset) | |
1172 | 1178 | if ((bal == bal)) | |
1173 | 1179 | then if ((amount > bal)) | |
1174 | 1180 | then throw("To big amount to exchange") | |
1175 | 1181 | else $Tuple2(claimAmount, claimAsset) | |
1176 | 1182 | else throw("Strict value is not equal to itself.") | |
1177 | 1183 | } | |
1178 | 1184 | else throw("Strict value is not equal to itself.") | |
1179 | 1185 | } | |
1180 | 1186 | ||
1181 | 1187 | ||
1182 | 1188 | @Callable(i) | |
1183 | 1189 | func getPoolInfoREADONLY (pool) = { | |
1184 | 1190 | let poolAddr = addressFromStringValue(pool) | |
1185 | 1191 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1186 | - | let $ | |
1187 | - | let AId = $ | |
1188 | - | let BId = $ | |
1189 | - | let balA = $ | |
1190 | - | let balB = $ | |
1191 | - | let shareId = $ | |
1192 | + | let $t03462234712 = getPoolData(Address(fromBase58String(pool)), pType) | |
1193 | + | let AId = $t03462234712._1 | |
1194 | + | let BId = $t03462234712._2 | |
1195 | + | let balA = $t03462234712._3 | |
1196 | + | let balB = $t03462234712._4 | |
1197 | + | let shareId = $t03462234712._5 | |
1192 | 1198 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
1193 | 1199 | $Tuple2(nil, $Tuple6(AId, BId, shareId, balA, balB, shareSupply)) | |
1194 | 1200 | } | |
1195 | 1201 | ||
1196 | 1202 | ||
1197 | 1203 | ||
1198 | 1204 | @Callable(i) | |
1199 | 1205 | func getShareAssetPriceREADONLY (shareId) = { | |
1200 | 1206 | let sharePrices = getSharePrice(shareId) | |
1201 | 1207 | $Tuple2(nil, sharePrices) | |
1202 | 1208 | } | |
1203 | 1209 | ||
1204 | 1210 | ||
1205 | 1211 | ||
1206 | 1212 | @Callable(i) | |
1207 | 1213 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
1208 | 1214 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
1209 | 1215 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
1210 | 1216 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
1211 | 1217 | $Tuple2(nil, userCanWithdraw) | |
1212 | 1218 | } | |
1213 | 1219 | ||
1214 | 1220 | ||
1215 | 1221 | ||
1216 | 1222 | @Callable(i) | |
1217 | 1223 | func getUserPositionREADONLY (user,pools,posNum) = { | |
1218 | 1224 | func userPos (a,pool) = { | |
1219 | - | let $ | |
1220 | - | let wAmountsA = $ | |
1221 | - | let wAmountsB = $ | |
1222 | - | let debts = $ | |
1223 | - | let eqWAmountsA = $ | |
1224 | - | let eqWAmountsB = $ | |
1225 | - | let index = $ | |
1225 | + | let $t03558535655 = a | |
1226 | + | let wAmountsA = $t03558535655._1 | |
1227 | + | let wAmountsB = $t03558535655._2 | |
1228 | + | let debts = $t03558535655._3 | |
1229 | + | let eqWAmountsA = $t03558535655._4 | |
1230 | + | let eqWAmountsB = $t03558535655._5 | |
1231 | + | let index = $t03558535655._6 | |
1226 | 1232 | if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition))))) | |
1227 | 1233 | then $Tuple6((wAmountsA :+ 0), (wAmountsB :+ 0), (debts :+ 0), (eqWAmountsA :+ 0), (eqWAmountsB :+ 0), (index + 1)) | |
1228 | 1234 | else { | |
1229 | 1235 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1230 | - | let $ | |
1231 | - | let AId = $ | |
1232 | - | let BId = $ | |
1233 | - | let balA = $ | |
1234 | - | let balB = $ | |
1235 | - | let shareId = $ | |
1236 | + | let $t03593436024 = getPoolData(Address(fromBase58String(pool)), pType) | |
1237 | + | let AId = $t03593436024._1 | |
1238 | + | let BId = $t03593436024._2 | |
1239 | + | let balA = $t03593436024._3 | |
1240 | + | let balB = $t03593436024._4 | |
1241 | + | let shareId = $t03593436024._5 | |
1236 | 1242 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1237 | 1243 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1238 | - | let $ | |
1239 | - | let wAmountA = $ | |
1240 | - | let wAmountB = $ | |
1244 | + | let $t03624036360 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1245 | + | let wAmountA = $t03624036360._1 | |
1246 | + | let wAmountB = $t03624036360._2 | |
1241 | 1247 | if ((borrowAmount > 0)) | |
1242 | 1248 | then { | |
1243 | 1249 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1244 | 1250 | let debt = { | |
1245 | 1251 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil) | |
1246 | 1252 | if ($isInstanceOf(@, "Int")) | |
1247 | 1253 | then @ | |
1248 | 1254 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1249 | 1255 | } | |
1250 | 1256 | if ((debt == debt)) | |
1251 | 1257 | then { | |
1252 | 1258 | let amountToGetEx = if (if ((borrowAsset == AId)) | |
1253 | 1259 | then (debt > wAmountA) | |
1254 | 1260 | else false) | |
1255 | 1261 | then (debt - wAmountA) | |
1256 | 1262 | else if (if ((borrowAsset == BId)) | |
1257 | 1263 | then (debt > wAmountB) | |
1258 | 1264 | else false) | |
1259 | 1265 | then (debt - wAmountB) | |
1260 | 1266 | else 0 | |
1261 | 1267 | let amountToPay = if ((amountToGetEx > 0)) | |
1262 | 1268 | then if ((pType == SF_POOL)) | |
1263 | 1269 | then { | |
1264 | 1270 | let ex = calcAmountToPaySF(pool, AId, BId, balA, balB, amountToGetEx, borrowAsset) | |
1265 | 1271 | ex._2 | |
1266 | 1272 | } | |
1267 | 1273 | else if ((pType == WX_POOL)) | |
1268 | 1274 | then { | |
1269 | 1275 | let ex = calcAmountToPayWX(pool, AId, BId, balA, balB, amountToGetEx, borrowAsset) | |
1270 | 1276 | ex._2 | |
1271 | 1277 | } | |
1272 | 1278 | else unknownPoolType() | |
1273 | 1279 | else 0 | |
1274 | - | let $ | |
1280 | + | let $t03727237491 = if ((borrowAsset == AId)) | |
1275 | 1281 | then $Tuple2(((wAmountA + amountToGetEx) - debt), (wAmountB - amountToPay)) | |
1276 | 1282 | else $Tuple2((wAmountA - amountToPay), ((wAmountB + amountToGetEx) - debt)) | |
1277 | - | let eqWAmountA = $ | |
1278 | - | let eqWAmountB = $ | |
1283 | + | let eqWAmountA = $t03727237491._1 | |
1284 | + | let eqWAmountB = $t03727237491._2 | |
1279 | 1285 | $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (eqWAmountsA :+ eqWAmountA), (eqWAmountsB :+ eqWAmountB), (index + 1)) | |
1280 | 1286 | } | |
1281 | 1287 | else throw("Strict value is not equal to itself.") | |
1282 | 1288 | } | |
1283 | 1289 | else $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), debts, (wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1)) | |
1284 | 1290 | } | |
1285 | 1291 | } | |
1286 | 1292 | ||
1287 | - | let $ | |
1293 | + | let $t03774637857 = { | |
1288 | 1294 | let $l = pools | |
1289 | 1295 | let $s = size($l) | |
1290 | 1296 | let $acc0 = $Tuple6(nil, nil, nil, nil, nil, 0) | |
1291 | 1297 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1292 | 1298 | then $a | |
1293 | 1299 | else userPos($a, $l[$i]) | |
1294 | 1300 | ||
1295 | 1301 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1296 | 1302 | then $a | |
1297 | 1303 | else throw("List size exceeds 20") | |
1298 | 1304 | ||
1299 | 1305 | $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) | |
1300 | 1306 | } | |
1301 | - | let wAmountsA = $ | |
1302 | - | let wAmountsB = $ | |
1303 | - | let debts = $ | |
1304 | - | let eqWAmountsA = $ | |
1305 | - | let eqWAmountsB = $ | |
1307 | + | let wAmountsA = $t03774637857._1 | |
1308 | + | let wAmountsB = $t03774637857._2 | |
1309 | + | let debts = $t03774637857._3 | |
1310 | + | let eqWAmountsA = $t03774637857._4 | |
1311 | + | let eqWAmountsB = $t03774637857._5 | |
1306 | 1312 | $Tuple2(nil, $Tuple5(wAmountsA, wAmountsB, debts, eqWAmountsA, eqWAmountsB)) | |
1307 | 1313 | } | |
1308 | 1314 | ||
1309 | 1315 | ||
1310 | 1316 | ||
1311 | 1317 | @Callable(i) | |
1312 | 1318 | func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), { | |
1313 | 1319 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1314 | 1320 | if (!(isPoolActive(pool, pType))) | |
1315 | 1321 | then throw("Pool not active at this moment") | |
1316 | 1322 | else if (if ((100 > leverage)) | |
1317 | 1323 | then true | |
1318 | 1324 | else (leverage > 300)) | |
1319 | 1325 | then throw("Leverage can't be <100 and >300") | |
1320 | 1326 | else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow)))) | |
1321 | 1327 | then (leverage > 100) | |
1322 | 1328 | else false) | |
1323 | 1329 | then throw("You can't borrow in this pool") | |
1324 | 1330 | else { | |
1325 | - | let $ | |
1326 | - | let AId = $ | |
1327 | - | let BId = $ | |
1328 | - | let balA = $ | |
1329 | - | let balB = $ | |
1330 | - | let shareId = $ | |
1331 | + | let $t03845538545 = getPoolData(Address(fromBase58String(pool)), pType) | |
1332 | + | let AId = $t03845538545._1 | |
1333 | + | let BId = $t03845538545._2 | |
1334 | + | let balA = $t03845538545._3 | |
1335 | + | let balB = $t03845538545._4 | |
1336 | + | let shareId = $t03845538545._5 | |
1331 | 1337 | if (if ((borrowId != AId)) | |
1332 | 1338 | then (borrowId != BId) | |
1333 | 1339 | else false) | |
1334 | 1340 | then throw("Wrong borrow asset") | |
1335 | 1341 | else { | |
1336 | - | let $ | |
1337 | - | let pmtA = $ | |
1338 | - | let pmtB = $ | |
1342 | + | let $t03862638685 = parseReplenishPmts(i.payments, AId, BId) | |
1343 | + | let pmtA = $t03862638685._1 | |
1344 | + | let pmtB = $t03862638685._2 | |
1339 | 1345 | let user = toString(i.caller) | |
1340 | 1346 | let newPosNum = getNewUserPositionNumber(user) | |
1341 | 1347 | if ((leverage > 100)) | |
1342 | 1348 | then { | |
1343 | 1349 | let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId) | |
1344 | 1350 | let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",") | |
1345 | 1351 | let newRequestId = { | |
1346 | 1352 | let @ = invoke(this, "createNewRequest", [request], nil) | |
1347 | 1353 | if ($isInstanceOf(@, "Int")) | |
1348 | 1354 | then @ | |
1349 | 1355 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1350 | 1356 | } | |
1351 | 1357 | if ((newRequestId == newRequestId)) | |
1352 | 1358 | then { | |
1353 | 1359 | let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
1354 | 1360 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
1355 | 1361 | if ((inv == inv)) | |
1356 | 1362 | then { | |
1357 | 1363 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1358 | - | let $ | |
1359 | - | if (($ | |
1364 | + | let $t03967439768 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1365 | + | if (($t03967439768 == $t03967439768)) | |
1360 | 1366 | then { | |
1361 | - | let newBalB = $ | |
1362 | - | let newBalA = $ | |
1367 | + | let newBalB = $t03967439768._2 | |
1368 | + | let newBalA = $t03967439768._1 | |
1363 | 1369 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1364 | - | let $ | |
1365 | - | let wAmountA = $ | |
1366 | - | let wAmountB = $ | |
1370 | + | let $t03983839953 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1371 | + | let wAmountA = $t03983839953._1 | |
1372 | + | let wAmountB = $t03983839953._2 | |
1367 | 1373 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1368 | 1374 | } | |
1369 | 1375 | else throw("Strict value is not equal to itself.") | |
1370 | 1376 | } | |
1371 | 1377 | else throw("Strict value is not equal to itself.") | |
1372 | 1378 | } | |
1373 | 1379 | else throw("Strict value is not equal to itself.") | |
1374 | 1380 | } | |
1375 | 1381 | else { | |
1376 | - | let $ | |
1377 | - | if (($ | |
1382 | + | let $t04000640121 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1383 | + | if (($t04000640121 == $t04000640121)) | |
1378 | 1384 | then { | |
1379 | - | let axlyFee = $ | |
1380 | - | let userStaked = $ | |
1381 | - | let $ | |
1382 | - | if (($ | |
1385 | + | let axlyFee = $t04000640121._2 | |
1386 | + | let userStaked = $t04000640121._1 | |
1387 | + | let $t04012740221 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1388 | + | if (($t04012740221 == $t04012740221)) | |
1383 | 1389 | then { | |
1384 | - | let newBalB = $ | |
1385 | - | let newBalA = $ | |
1390 | + | let newBalB = $t04012740221._2 | |
1391 | + | let newBalA = $t04012740221._1 | |
1386 | 1392 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1387 | - | let $ | |
1388 | - | let wAmountA = $ | |
1389 | - | let wAmountB = $ | |
1393 | + | let $t04029140406 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1394 | + | let wAmountA = $t04029140406._1 | |
1395 | + | let wAmountB = $t04029140406._2 | |
1390 | 1396 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1391 | 1397 | } | |
1392 | 1398 | else throw("Strict value is not equal to itself.") | |
1393 | 1399 | } | |
1394 | 1400 | else throw("Strict value is not equal to itself.") | |
1395 | 1401 | } | |
1396 | 1402 | } | |
1397 | 1403 | } | |
1398 | 1404 | }) | |
1399 | 1405 | ||
1400 | 1406 | ||
1401 | 1407 | ||
1402 | 1408 | @Callable(i) | |
1403 | 1409 | func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), { | |
1404 | 1410 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1405 | 1411 | if (!(isPoolActive(pool, pType))) | |
1406 | 1412 | then throw("Pool not active at this moment") | |
1407 | 1413 | else withdrawToUser(toString(i.caller), pool, toString(posId), false) | |
1408 | 1414 | }) | |
1409 | 1415 | ||
1410 | 1416 | ||
1411 | 1417 | ||
1412 | 1418 | @Callable(i) | |
1413 | 1419 | func createUpdateStopLoss (posId,poolId,assetId,price) = valueOrElse(isActiveForUsers(), { | |
1414 | 1420 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1415 | 1421 | let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited") | |
1416 | 1422 | if (!(isPoolActive(poolId, pType))) | |
1417 | 1423 | then throw("Pool not active at this moment") | |
1418 | 1424 | else if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
1419 | 1425 | then throw("There are no user position") | |
1420 | 1426 | else if ((0 >= price)) | |
1421 | 1427 | then throw("Price must be greater than 0") | |
1422 | 1428 | else if ((price > tokenOraclePrice)) | |
1423 | 1429 | then throw("Price must be less than current token price") | |
1424 | 1430 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
1425 | 1431 | }) | |
1426 | 1432 | ||
1427 | 1433 | ||
1428 | 1434 | ||
1429 | 1435 | @Callable(i) | |
1430 | 1436 | func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), { | |
1431 | 1437 | let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited") | |
1432 | 1438 | if (!(isPoolActive(poolId, pType))) | |
1433 | 1439 | then throw("Pool not active at this moment") | |
1434 | 1440 | else if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
1435 | 1441 | then throw("No entry") | |
1436 | 1442 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))] | |
1437 | 1443 | }) | |
1438 | 1444 | ||
1439 | 1445 | ||
1440 | 1446 | ||
1441 | 1447 | @Callable(i) | |
1442 | 1448 | func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,operatorPubKey,group1Admin1PubKey,group1Admin2PubKey,group2Admin1PubKey,group2Admin2PubKey) = valueOrElse(isSelfCall(i), if (isDefined(getString(kOperatorCallPK))) | |
1443 | 1449 | then throw("Already inited") | |
1444 | 1450 | else if (!(isDefined(addressFromString(moneyBoxAddr)))) | |
1445 | 1451 | then throw("moneyBoxAddr is not correct address") | |
1446 | 1452 | else if (!(isDefined(addressFromString(sfFarmingAddr)))) | |
1447 | 1453 | then throw("sfFarmingAddr is not correct address") | |
1448 | 1454 | else if (!(isDefined(addressFromString(lendAddr)))) | |
1449 | 1455 | then throw("lendAddr is not correct address") | |
1450 | 1456 | else if (!(isDefined(addressFromString(priceOracleAddr)))) | |
1451 | 1457 | then throw("priceOracleAddr is not correct address") | |
1452 | 1458 | else if (!(isDefined(addressFromString(keeperExContract)))) | |
1453 | 1459 | then throw("keeperExContract is not correct address") | |
1454 | 1460 | else if (!(isDefined(assetInfo(fromBase58String(swopAssetId))))) | |
1455 | 1461 | then throw("swopAssetId is not correct asset id") | |
1456 | 1462 | else if (!(isDefined(assetInfo(fromBase58String(wxAssetId))))) | |
1457 | 1463 | then throw("swopAssetId is not correct asset id") | |
1458 | 1464 | else if ((size(fromBase58String(operatorPubKey)) != 32)) | |
1459 | 1465 | then throw("operatorPubKey is not correct") | |
1460 | 1466 | else if ((size(fromBase58String(group1Admin1PubKey)) != 32)) | |
1461 | 1467 | then throw("group1Admin1PubKey is not correct") | |
1462 | 1468 | else if ((size(fromBase58String(group1Admin2PubKey)) != 32)) | |
1463 | 1469 | then throw("group1Admin2PubKey is not correct") | |
1464 | 1470 | else if ((size(fromBase58String(group2Admin1PubKey)) != 32)) | |
1465 | 1471 | then throw("group2Admin1PubKey is not correct") | |
1466 | 1472 | else if ((size(fromBase58String(group2Admin2PubKey)) != 32)) | |
1467 | 1473 | then throw("group2Admin2PubKey is not correct") | |
1468 | 1474 | 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(kOperatorCallPK, operatorPubKey), StringEntry(kGroup1Admin1PK, group1Admin1PubKey), StringEntry(kGroup1Admin2PK, group1Admin2PubKey), StringEntry(kGroup2Admin1PK, group2Admin1PubKey), StringEntry(kGroup2Admin2PK, group2Admin2PubKey)]) | |
1469 | 1475 | ||
1470 | 1476 | ||
1471 | 1477 | ||
1472 | 1478 | @Callable(i) | |
1473 | 1479 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
1474 | 1480 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
1475 | 1481 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
1476 | 1482 | }) | |
1477 | 1483 | ||
1478 | 1484 | ||
1479 | 1485 | ||
1480 | 1486 | @Callable(i) | |
1481 | 1487 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1482 | - | let $ | |
1483 | - | let user = $ | |
1484 | - | let pool = $ | |
1485 | - | let pmtA = $ | |
1486 | - | let AId = $ | |
1487 | - | let pmtB = $ | |
1488 | - | let BId = $ | |
1489 | - | let balA = $ | |
1490 | - | let balB = $ | |
1491 | - | let shareId = $ | |
1492 | - | let bwAsset = $ | |
1493 | - | let bwAmount = $ | |
1488 | + | let $t04524545349 = parseRequest(requestId) | |
1489 | + | let user = $t04524545349._1 | |
1490 | + | let pool = $t04524545349._2 | |
1491 | + | let pmtA = $t04524545349._3 | |
1492 | + | let AId = $t04524545349._4 | |
1493 | + | let pmtB = $t04524545349._5 | |
1494 | + | let BId = $t04524545349._6 | |
1495 | + | let balA = $t04524545349._7 | |
1496 | + | let balB = $t04524545349._8 | |
1497 | + | let shareId = $t04524545349._9 | |
1498 | + | let bwAsset = $t04524545349._10 | |
1499 | + | let bwAmount = $t04524545349._11 | |
1494 | 1500 | if ((size(i.payments) != 1)) | |
1495 | 1501 | then throw("Wrong payment size") | |
1496 | 1502 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1497 | 1503 | then true | |
1498 | 1504 | else (i.payments[0].amount != bwAmount)) | |
1499 | 1505 | then throw("Wrong payment") | |
1500 | 1506 | else { | |
1501 | - | let $ | |
1507 | + | let $t04553945639 = if ((AId == bwAsset)) | |
1502 | 1508 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1503 | 1509 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1504 | - | let pmtAllA = $ | |
1505 | - | let pmtAllB = $ | |
1510 | + | let pmtAllA = $t04553945639._1 | |
1511 | + | let pmtAllB = $t04553945639._2 | |
1506 | 1512 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1507 | - | let $ | |
1508 | - | let userStaked = $ | |
1509 | - | let axlyFee = $ | |
1513 | + | let $t04572145836 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1514 | + | let userStaked = $t04572145836._1 | |
1515 | + | let axlyFee = $t04572145836._2 | |
1510 | 1516 | let posNum = getNewUserPositionNumber(user) | |
1511 | 1517 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1512 | 1518 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1513 | - | let $ | |
1514 | - | let wAmountA = $ | |
1515 | - | let wAmountB = $ | |
1519 | + | let $t04619646311 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1520 | + | let wAmountA = $t04619646311._1 | |
1521 | + | let wAmountB = $t04619646311._2 | |
1516 | 1522 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1517 | 1523 | } | |
1518 | 1524 | })) | |
1519 | 1525 | ||
1520 | 1526 | ||
1521 | 1527 | ||
1522 | 1528 | @Callable(i) | |
1523 | 1529 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1524 | 1530 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1525 | 1531 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1526 | - | let $ | |
1527 | - | let AId = $ | |
1528 | - | let BId = $ | |
1529 | - | let balA = $ | |
1530 | - | let balB = $ | |
1531 | - | let shareId = $ | |
1532 | + | let $t04683246922 = getPoolData(Address(fromBase58String(pool)), pType) | |
1533 | + | let AId = $t04683246922._1 | |
1534 | + | let BId = $t04683246922._2 | |
1535 | + | let balA = $t04683246922._3 | |
1536 | + | let balB = $t04683246922._4 | |
1537 | + | let shareId = $t04683246922._5 | |
1532 | 1538 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1533 | 1539 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1534 | 1540 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1535 | 1541 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1536 | 1542 | if ((liquidateAmount > userCanWithdraw)) | |
1537 | 1543 | then throw("You can't liquidate more than user have") | |
1538 | 1544 | else if ((borrowAmount == 0)) | |
1539 | 1545 | then throw("You can't liquidate position without borrow") | |
1540 | 1546 | 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))] | |
1541 | 1547 | })) | |
1542 | 1548 | ||
1543 | 1549 | ||
1544 | 1550 | ||
1545 | 1551 | @Callable(i) | |
1546 | 1552 | func stopLoss (user,posId,pool,assetId) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1547 | 1553 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1548 | 1554 | let stopLossPrice = valueOrErrorMessage(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)), "No entry") | |
1549 | 1555 | if ((tokenOraclePrice > stopLossPrice)) | |
1550 | 1556 | then throw("Token price greater stop loss price") | |
1551 | 1557 | else { | |
1552 | 1558 | let res = withdrawToUser(user, pool, toString(posId), true) | |
1553 | 1559 | $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2) | |
1554 | 1560 | } | |
1555 | 1561 | })) | |
1556 | 1562 | ||
1557 | 1563 | ||
1558 | 1564 | ||
1559 | 1565 | @Callable(i) | |
1560 | 1566 | func capitalizeEx (pool,route,tokenToId,amountToExchange,claim) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1561 | 1567 | let pType = getStringValue(this, (kPool + pool)) | |
1562 | 1568 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1563 | - | let $ | |
1564 | - | if (($ | |
1569 | + | let $t04889248994 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1570 | + | if (($t04889248994 == $t04889248994)) | |
1565 | 1571 | then { | |
1566 | - | let claimedAsset = $ | |
1567 | - | let claimedAmount = $ | |
1572 | + | let claimedAsset = $t04889248994._2 | |
1573 | + | let claimedAmount = $t04889248994._1 | |
1568 | 1574 | let rArgs = split(route, "__") | |
1569 | 1575 | let exchangedAmount = if ((rArgs[0] == "directSwopfiCPMM")) | |
1570 | 1576 | then directSwopfiCPMM(rArgs, tokenToId) | |
1571 | 1577 | else if ((rArgs[0] == "routingSwopfi")) | |
1572 | 1578 | then directRoutingSwopfi(rArgs, tokenToId) | |
1573 | 1579 | else throw("Wrong route") | |
1574 | 1580 | if ((exchangedAmount == exchangedAmount)) | |
1575 | 1581 | then { | |
1576 | 1582 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1577 | 1583 | let changeEntry = if ((newChange >= 0)) | |
1578 | 1584 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1579 | 1585 | else nil | |
1580 | 1586 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1581 | 1587 | } | |
1582 | 1588 | else throw("Strict value is not equal to itself.") | |
1583 | 1589 | } | |
1584 | 1590 | else throw("Strict value is not equal to itself.") | |
1585 | 1591 | })) | |
1586 | 1592 | ||
1587 | 1593 | ||
1588 | 1594 | ||
1589 | 1595 | @Callable(i) | |
1590 | 1596 | func capitalizeNoEx (pool,claim,amountFromBalance) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1591 | 1597 | let pType = getStringValue(this, (kPool + pool)) | |
1592 | - | let $ | |
1593 | - | if (($ | |
1598 | + | let $t04967849776 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1599 | + | if (($t04967849776 == $t04967849776)) | |
1594 | 1600 | then { | |
1595 | - | let claimedAsset = $ | |
1596 | - | let claimedAmount = $ | |
1601 | + | let claimedAsset = $t04967849776._2 | |
1602 | + | let claimedAmount = $t04967849776._1 | |
1597 | 1603 | capitalize(pool, pType, assetIdToStr(claimedAsset), (claimedAmount + amountFromBalance)) | |
1598 | 1604 | } | |
1599 | 1605 | else throw("Strict value is not equal to itself.") | |
1600 | 1606 | })) | |
1601 | 1607 | ||
1602 | 1608 | ||
1603 | 1609 | ||
1604 | 1610 | @Callable(i) | |
1605 | 1611 | func initNewPool (type,poolType,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (if ((type != SF_POOL)) | |
1606 | 1612 | then (type != WX_POOL) | |
1607 | 1613 | else false) | |
1608 | 1614 | then throw("Wrong type") | |
1609 | 1615 | else if (if ((poolType != CPMM)) | |
1610 | 1616 | then (poolType != FLAT) | |
1611 | 1617 | else false) | |
1612 | 1618 | then throw("Wrong pool type") | |
1613 | 1619 | else { | |
1614 | - | let $ | |
1615 | - | let aId = $ | |
1616 | - | let bId = $ | |
1617 | - | let aBal = $ | |
1618 | - | let bBal = $ | |
1619 | - | let shareId = $ | |
1620 | + | let $t05029750391 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1621 | + | let aId = $t05029750391._1 | |
1622 | + | let bId = $t05029750391._2 | |
1623 | + | let aBal = $t05029750391._3 | |
1624 | + | let bBal = $t05029750391._4 | |
1625 | + | let shareId = $t05029750391._5 | |
1620 | 1626 | if ((0 > inFeeNoLoan)) | |
1621 | 1627 | then throw("inFeeNoLoan must be greater than 0") | |
1622 | 1628 | else if ((0 > inFeeLoan)) | |
1623 | 1629 | then throw("inFeeLoan must be greater than 0") | |
1624 | 1630 | else if ((0 > capFeeNoLoan)) | |
1625 | 1631 | then throw("capFeeNoLoan must be greater than 0") | |
1626 | 1632 | else if ((0 > capFeeWithLoan)) | |
1627 | 1633 | then throw("capFeeWithLoan must be greater than 0") | |
1628 | 1634 | else if ((0 > stoplossFeeNoLoan)) | |
1629 | 1635 | then throw("stoplossFeeNoLoan must be greater than 0") | |
1630 | 1636 | else if ((0 > stoplossFeeWithLoan)) | |
1631 | 1637 | then throw("stoplossFeeWithLoan must be greater than 0") | |
1632 | 1638 | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((poolAddr + kPoolType), poolType), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)] | |
1633 | 1639 | })) | |
1634 | 1640 | ||
1635 | 1641 | ||
1636 | 1642 | ||
1637 | 1643 | @Callable(i) | |
1638 | 1644 | func updatePoolFees (poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + poolAddr))))) | |
1639 | 1645 | then throw(("Can't find pool with addr " + poolAddr)) | |
1640 | 1646 | else if ((0 > inFeeNoLoan)) | |
1641 | 1647 | then throw("inFeeNoLoan must be greater than 0") | |
1642 | 1648 | else if ((0 > inFeeLoan)) | |
1643 | 1649 | then throw("inFeeLoan must be greater than 0") | |
1644 | 1650 | else if ((0 > capFeeNoLoan)) | |
1645 | 1651 | then throw("capFeeNoLoan must be greater than 0") | |
1646 | 1652 | else if ((0 > capFeeWithLoan)) | |
1647 | 1653 | then throw("capFeeWithLoan must be greater than 0") | |
1648 | 1654 | else if ((0 > stoplossFeeNoLoan)) | |
1649 | 1655 | then throw("stoplossFeeNoLoan must be greater than 0") | |
1650 | 1656 | else if ((0 > stoplossFeeWithLoan)) | |
1651 | 1657 | then throw("stoplossFeeWithLoan must be greater than 0") | |
1652 | 1658 | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan)])) | |
1653 | 1659 | ||
1654 | 1660 | ||
1655 | 1661 | ||
1656 | 1662 | @Callable(i) | |
1657 | 1663 | func activate () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActive), true)) | |
1658 | 1664 | then throw("dApp already active") | |
1659 | 1665 | else [BooleanEntry(kActive, true)]) | |
1660 | 1666 | ||
1661 | 1667 | ||
1662 | 1668 | ||
1663 | 1669 | @Callable(i) | |
1664 | 1670 | func shutdown () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActive), true))) | |
1665 | 1671 | then throw("dApp already shutdown") | |
1666 | 1672 | else [BooleanEntry(kActive, false)]) | |
1667 | 1673 | ||
1668 | 1674 | ||
1669 | 1675 | ||
1670 | 1676 | @Callable(i) | |
1671 | 1677 | func activateForUsers () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActiveUsers), true)) | |
1672 | 1678 | then throw("dApp already active for users") | |
1673 | 1679 | else [BooleanEntry(kActiveUsers, true)]) | |
1674 | 1680 | ||
1675 | 1681 | ||
1676 | 1682 | ||
1677 | 1683 | @Callable(i) | |
1678 | 1684 | func shutdownForUsers () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActiveUsers), true))) | |
1679 | 1685 | then throw("dApp already shutdown for users") | |
1680 | 1686 | else [BooleanEntry(kActiveUsers, false)]) | |
1681 | 1687 | ||
1682 | 1688 | ||
1683 | 1689 | ||
1684 | 1690 | @Callable(i) | |
1685 | 1691 | func activateSF () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true)) | |
1686 | 1692 | then throw("SWOPFI already active") | |
1687 | 1693 | else [BooleanEntry((SF_POOL + kActiveSFWX), true)]) | |
1688 | 1694 | ||
1689 | 1695 | ||
1690 | 1696 | ||
1691 | 1697 | @Callable(i) | |
1692 | 1698 | func shutdownSF () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true))) | |
1693 | 1699 | then throw("SWOPFI already shutdown") | |
1694 | 1700 | else [BooleanEntry((SF_POOL + kActiveSFWX), false)]) | |
1695 | 1701 | ||
1696 | 1702 | ||
1697 | 1703 | ||
1698 | 1704 | @Callable(i) | |
1699 | 1705 | func activateWX () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true)) | |
1700 | 1706 | then throw("WX already active") | |
1701 | 1707 | else [BooleanEntry((WX_POOL + kActiveSFWX), true)]) | |
1702 | 1708 | ||
1703 | 1709 | ||
1704 | 1710 | ||
1705 | 1711 | @Callable(i) | |
1706 | 1712 | func shutdownWX () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true))) | |
1707 | 1713 | then throw("WX already shutdown") | |
1708 | 1714 | else [BooleanEntry((WX_POOL + kActiveSFWX), false)]) | |
1709 | 1715 | ||
1710 | 1716 | ||
1711 | 1717 | ||
1712 | 1718 | @Callable(i) | |
1713 | 1719 | func activatePool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1714 | 1720 | then throw("Unknown pool") | |
1715 | 1721 | else if (valueOrElse(getBoolean(this, (pool + kPoolActive)), true)) | |
1716 | 1722 | then throw("Pool already active") | |
1717 | 1723 | else [BooleanEntry((pool + kPoolActive), true)]) | |
1718 | 1724 | ||
1719 | 1725 | ||
1720 | 1726 | ||
1721 | 1727 | @Callable(i) | |
1722 | 1728 | func shutdownPool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1723 | 1729 | then throw("Unknown pool") | |
1724 | 1730 | else if (!(valueOrElse(getBoolean(this, (pool + kPoolActive)), true))) | |
1725 | 1731 | then throw("Pool already shutdown") | |
1726 | 1732 | else [BooleanEntry((pool + kPoolActive), false)]) | |
1727 | 1733 | ||
1728 | 1734 | ||
1735 | + | @Verifier(tx) | |
1736 | + | func verify () = match tx { | |
1737 | + | case inv: InvokeScriptTransaction => | |
1738 | + | let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1739 | + | let isRightFee = if ((inv.fee == 900000)) | |
1740 | + | then (inv.feeAssetId == unit) | |
1741 | + | else false | |
1742 | + | let isInitCall = (inv.function == "init") | |
1743 | + | let isnoPayments = (size(inv.payments) == 0) | |
1744 | + | if (if (if (isRightFee) | |
1745 | + | then isInitCall | |
1746 | + | else false) | |
1747 | + | then isSelf | |
1748 | + | else false) | |
1749 | + | then isnoPayments | |
1750 | + | else false | |
1751 | + | case _ => | |
1752 | + | let group1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], group1Admin1PK)) | |
1753 | + | then 1 | |
1754 | + | else (0 + (if (sigVerify(tx.bodyBytes, tx.proofs[0], group1Admin2PK)) | |
1755 | + | then 1 | |
1756 | + | else 0)) | |
1757 | + | let group2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], group2Admin1PK)) | |
1758 | + | then 1 | |
1759 | + | else (0 + (if (sigVerify(tx.bodyBytes, tx.proofs[1], group2Admin2PK)) | |
1760 | + | then 1 | |
1761 | + | else 0)) | |
1762 | + | ((group1Signed + group2Signed) == 2) | |
1763 | + | } | |
1764 | + |
github/deemru/w8io/026f985 332.02 ms ◑