tx · 2VkR1ADyCjUa3VgPDuYD6Lrz8UowiEFDFPh2p9ptL6QD 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.04500000 Waves 2023.07.05 16:20 [2652666] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "2VkR1ADyCjUa3VgPDuYD6Lrz8UowiEFDFPh2p9ptL6QD", "fee": 4500000, "feeAssetId": null, "timestamp": 1688563270923, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "66rkPdpswGH9GXu6MGQ81bcVrAcESndRZoLZz1ne6RRYHdCJ4ffS3TV2dvg1aQLCL3fPyndiQ1d4UNXbPJTNccpr" ], "script": "base64:BgKdAQgCEgcKBQgBCAEBEgMKAQgSAwoBCBIECgIICBIFCgMIGBgSBQoDCAEIEgQKAggBEgYKBAEICAESBQoDAQgIEgsKCQgICAgICAgICBIDCgEIEgMKAQgSBQoDCAgBEgYKBAgBCAgSDgoMCAgIAQQRGBgRAQEYEgoKCAgICAEECAEYEg4KDAgICAEEGBgYGBgBGBILCgkICAEBAQEBAQRrAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUAB1NDQUxFMTYJALYCAQCAgIT+pt7hEQAKRkVFX1NDQUxFNgDAhD0AFGtTRlBvb2x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 Next: 4uCgi9fCunMPoQfmBHk13j8x7aQY2QPNforZqdh9Grmf Diff:
Old | New | Differences | |
---|---|---|---|
339 | 339 | } | |
340 | 340 | ||
341 | 341 | ||
342 | - | func getCursEntries (aId,bId,shareId) = { | |
342 | + | func getCursEntries (aId,bId,shareId,wAmounts) = { | |
343 | 343 | let assetsPrices = getAssetsPrice([aId, bId]) | |
344 | 344 | let sharePrice = getSharePrice(shareId) | |
345 | - | let prices = [toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] | |
345 | + | let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts) | |
346 | 346 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
347 | 347 | } | |
348 | 348 | ||
380 | 380 | else throw("Strict value is not equal to itself.") | |
381 | 381 | } | |
382 | 382 | else { | |
383 | - | let $ | |
383 | + | let $t01079511045 = $Tuple2(split({ | |
384 | 384 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
385 | 385 | if ($isInstanceOf(@, "String")) | |
386 | 386 | then @ | |
391 | 391 | then @ | |
392 | 392 | else throw(($getType(@) + " couldn't be cast to String")) | |
393 | 393 | }, "__")) | |
394 | - | if (($ | |
394 | + | if (($t01079511045 == $t01079511045)) | |
395 | 395 | then { | |
396 | - | let evalPutInB = $ | |
397 | - | let evalPutInA = $ | |
396 | + | let evalPutInB = $t01079511045._2 | |
397 | + | let evalPutInA = $t01079511045._1 | |
398 | 398 | let lpInA = parseIntValue(evalPutInA[1]) | |
399 | 399 | let lpInB = parseIntValue(evalPutInB[1]) | |
400 | 400 | if ((lpInB > lpInA)) | |
436 | 436 | ||
437 | 437 | ||
438 | 438 | func unstakeLP (pool,pType,shareId,amount) = { | |
439 | - | let $ | |
439 | + | let $t01253012887 = if ((pType == SF_POOL)) | |
440 | 440 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
441 | 441 | else if ((pType == WX_POOL)) | |
442 | 442 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
443 | 443 | else throw("Wrong pool type") | |
444 | - | let farmAddr = $ | |
445 | - | let fName = $ | |
446 | - | let params = $ | |
444 | + | let farmAddr = $t01253012887._1 | |
445 | + | let fName = $t01253012887._2 | |
446 | + | let params = $t01253012887._3 | |
447 | 447 | let inv = invoke(farmAddr, fName, params, nil) | |
448 | 448 | if ((inv == inv)) | |
449 | 449 | then amount | |
456 | 456 | let feeScale6 = 1000000 | |
457 | 457 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
458 | 458 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
459 | - | let $ | |
459 | + | let $t01330913615 = if ((assetTokenToGet == assetIdA)) | |
460 | 460 | then { | |
461 | 461 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
462 | 462 | $Tuple2(amountToPay, assetIdB) | |
465 | 465 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
466 | 466 | $Tuple2(amountToPay, assetIdA) | |
467 | 467 | } | |
468 | - | let amountToPay = $ | |
469 | - | let assetToPay = $ | |
468 | + | let amountToPay = $t01330913615._1 | |
469 | + | let assetToPay = $t01330913615._2 | |
470 | 470 | $Tuple2(assetToPay, amountToPay) | |
471 | 471 | } | |
472 | 472 | ||
475 | 475 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
476 | 476 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
477 | 477 | let feeScale = toBigInt(100000000) | |
478 | - | let $ | |
478 | + | let $t01395414262 = if ((assetTokenToGet == assetIdA)) | |
479 | 479 | then { | |
480 | 480 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
481 | 481 | $Tuple2(amountToPay, assetIdB) | |
484 | 484 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
485 | 485 | $Tuple2(amountToPay, assetIdA) | |
486 | 486 | } | |
487 | - | let amountToPay = $ | |
488 | - | let assetToPay = $ | |
487 | + | let amountToPay = $t01395414262._1 | |
488 | + | let assetToPay = $t01395414262._2 | |
489 | 489 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
490 | 490 | $Tuple2(assetToPay, amountToPayWithFee) | |
491 | 491 | } | |
493 | 493 | ||
494 | 494 | func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL)) | |
495 | 495 | then { | |
496 | - | let $ | |
497 | - | let assetToPay = $ | |
498 | - | let amountToPay = $ | |
496 | + | let $t01460714729 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
497 | + | let assetToPay = $t01460714729._1 | |
498 | + | let amountToPay = $t01460714729._2 | |
499 | 499 | invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
500 | 500 | } | |
501 | 501 | else { | |
502 | - | let $ | |
503 | - | let assetToPay = $ | |
504 | - | let amountToPay = $ | |
502 | + | let $t01490415026 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
503 | + | let assetToPay = $t01490415026._1 | |
504 | + | let amountToPay = $t01490415026._2 | |
505 | 505 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
506 | 506 | } | |
507 | 507 | ||
532 | 532 | } | |
533 | 533 | else if ((pType == WX_POOL)) | |
534 | 534 | then { | |
535 | - | let $ | |
535 | + | let $t01562915970 = if (if ((pmtA > 0)) | |
536 | 536 | then (pmtB > 0) | |
537 | 537 | else false) | |
538 | 538 | then { | |
539 | - | let $ | |
540 | - | let pmtInA = $ | |
541 | - | let pmtInB = $ | |
542 | - | let change = $ | |
543 | - | let changeId = $ | |
544 | - | let lpAmount = $ | |
539 | + | let $t01571015836 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
540 | + | let pmtInA = $t01571015836._1 | |
541 | + | let pmtInB = $t01571015836._2 | |
542 | + | let change = $t01571015836._3 | |
543 | + | let changeId = $t01571015836._4 | |
544 | + | let lpAmount = $t01571015836._5 | |
545 | 545 | $Tuple3(change, changeId, lpAmount) | |
546 | 546 | } | |
547 | 547 | else if ((pmtA > 0)) | |
548 | 548 | then $Tuple3(pmtA, aId, 0) | |
549 | 549 | else $Tuple3(pmtB, bId, 0) | |
550 | - | let change = $ | |
551 | - | let changeId = $ | |
552 | - | let lpTwo = $ | |
553 | - | let $ | |
550 | + | let change = $t01562915970._1 | |
551 | + | let changeId = $t01562915970._2 | |
552 | + | let lpTwo = $t01562915970._3 | |
553 | + | let $t01597716193 = if ((change > 0)) | |
554 | 554 | then { | |
555 | 555 | let inv = { | |
556 | 556 | let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil) | |
563 | 563 | else throw("Strict value is not equal to itself.") | |
564 | 564 | } | |
565 | 565 | else $Tuple2(0, 0) | |
566 | - | let lpOne = $ | |
567 | - | let loss = $ | |
566 | + | let lpOne = $t01597716193._1 | |
567 | + | let loss = $t01597716193._2 | |
568 | 568 | $Tuple2((lpTwo + lpOne), loss) | |
569 | 569 | } | |
570 | 570 | else throw("Wrong pool type") | |
571 | 571 | } | |
572 | 572 | ||
573 | 573 | ||
574 | + | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
575 | + | let $t01636816755 = if ((pType == SF_POOL)) | |
576 | + | then { | |
577 | + | let inv = { | |
578 | + | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
579 | + | if ($isInstanceOf(@, "(Int, Int)")) | |
580 | + | then @ | |
581 | + | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
582 | + | } | |
583 | + | if ((inv == inv)) | |
584 | + | then $Tuple2(inv._1, inv._2) | |
585 | + | else throw("Strict value is not equal to itself.") | |
586 | + | } | |
587 | + | else { | |
588 | + | let inv = split({ | |
589 | + | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil) | |
590 | + | if ($isInstanceOf(@, "String")) | |
591 | + | then @ | |
592 | + | else throw(($getType(@) + " couldn't be cast to String")) | |
593 | + | }, "__") | |
594 | + | if ((inv == inv)) | |
595 | + | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
596 | + | else throw("Strict value is not equal to itself.") | |
597 | + | } | |
598 | + | let amountA = $t01636816755._1 | |
599 | + | let amountB = $t01636816755._2 | |
600 | + | $Tuple2(amountA, amountB) | |
601 | + | } | |
602 | + | ||
603 | + | ||
574 | 604 | func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = { | |
575 | 605 | let poolAddr = addressFromStringValue(pool) | |
576 | - | let $t01645116951 = if ((pType == SF_POOL)) | |
577 | - | then { | |
578 | - | let inv = { | |
579 | - | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil) | |
580 | - | if ($isInstanceOf(@, "List[Any]")) | |
581 | - | then @ | |
582 | - | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
583 | - | } | |
584 | - | if ((inv == inv)) | |
585 | - | then $Tuple2({ | |
586 | - | let @ = inv[0] | |
587 | - | if ($isInstanceOf(@, "Int")) | |
588 | - | then @ | |
589 | - | else throw(($getType(@) + " couldn't be cast to Int")) | |
590 | - | }, { | |
591 | - | let @ = inv[1] | |
592 | - | if ($isInstanceOf(@, "Int")) | |
593 | - | then @ | |
594 | - | else throw(($getType(@) + " couldn't be cast to Int")) | |
595 | - | }) | |
596 | - | else throw("Strict value is not equal to itself.") | |
597 | - | } | |
598 | - | else if ((pType == WX_POOL)) | |
599 | - | then { | |
600 | - | let get = split({ | |
601 | - | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, lpAmount], nil) | |
602 | - | if ($isInstanceOf(@, "String")) | |
603 | - | then @ | |
604 | - | else throw(($getType(@) + " couldn't be cast to String")) | |
605 | - | }, "__") | |
606 | - | if ((get == get)) | |
607 | - | then $Tuple2(parseIntValue(get[1]), parseIntValue(get[2])) | |
608 | - | else throw("Strict value is not equal to itself.") | |
609 | - | } | |
610 | - | else throw("Wrong pool type") | |
611 | - | let getAmountA = $t01645116951._1 | |
612 | - | let getAmountB = $t01645116951._2 | |
606 | + | let $t01700817101 = calcWithdrawLPFromPoolVirt(poolAddr, pType, shareId, lpAmount) | |
607 | + | let getAmountA = $t01700817101._1 | |
608 | + | let getAmountB = $t01700817101._2 | |
613 | 609 | if ((borrowAmount > 0)) | |
614 | 610 | then { | |
615 | 611 | let amountToGetEx = if (if ((borrowAssetId == aId)) | |
621 | 617 | else false) | |
622 | 618 | then (borrowAmount - getAmountB) | |
623 | 619 | else 0 | |
624 | - | let $ | |
620 | + | let $t01737917682 = if ((amountToGetEx > 0)) | |
625 | 621 | then if ((pType == SF_POOL)) | |
626 | 622 | then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId) | |
627 | 623 | else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId) | |
628 | 624 | else $Tuple2("", 0) | |
629 | - | let assetToPay = $ | |
630 | - | let amountToPay = $ | |
625 | + | let assetToPay = $t01737917682._1 | |
626 | + | let amountToPay = $t01737917682._2 | |
631 | 627 | if ((borrowAssetId == aId)) | |
632 | 628 | then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay)) | |
633 | 629 | else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount)) | |
674 | 670 | if ((lpBalanceBefore == lpBalanceBefore)) | |
675 | 671 | then { | |
676 | 672 | let poolAddr = addressFromStringValue(pool) | |
677 | - | let $ | |
673 | + | let $t01887919295 = if (if ((pmtA > 0)) | |
678 | 674 | then (pmtB > 0) | |
679 | 675 | else false) | |
680 | 676 | then { | |
681 | - | let $ | |
682 | - | let pmtInA = $ | |
683 | - | let pmtInB = $ | |
684 | - | let change = $ | |
685 | - | let changeId = $ | |
677 | + | let $t01894519061 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
678 | + | let pmtInA = $t01894519061._1 | |
679 | + | let pmtInB = $t01894519061._2 | |
680 | + | let change = $t01894519061._3 | |
681 | + | let changeId = $t01894519061._4 | |
686 | 682 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
687 | 683 | if ((inv == inv)) | |
688 | 684 | then $Tuple2(change, changeId) | |
693 | 689 | else if ((pmtB > 0)) | |
694 | 690 | then $Tuple2(pmtB, bId) | |
695 | 691 | else throw("pmts must be > 0") | |
696 | - | let change = $ | |
697 | - | let changeId = $ | |
692 | + | let change = $t01887919295._1 | |
693 | + | let changeId = $t01887919295._2 | |
698 | 694 | let inv = if ((change > 0)) | |
699 | 695 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
700 | 696 | else nil | |
722 | 718 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
723 | 719 | let totalAmount = getPoolTotalShare(pool) | |
724 | 720 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
725 | - | let $ | |
721 | + | let $t02015320391 = if (withLoan) | |
726 | 722 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
727 | 723 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
728 | - | let curPoolInterest = $ | |
729 | - | let totalStakedWithLoan = $ | |
724 | + | let curPoolInterest = $t02015320391._1 | |
725 | + | let totalStakedWithLoan = $t02015320391._2 | |
730 | 726 | [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))] | |
731 | 727 | } | |
732 | 728 | ||
772 | 768 | ||
773 | 769 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
774 | 770 | let poolAddr = Address(fromBase58String(pool)) | |
775 | - | let $ | |
776 | - | let AId = $ | |
777 | - | let BId = $ | |
778 | - | let balA = $ | |
779 | - | let balB = $ | |
780 | - | let shareId = $ | |
771 | + | let $t02274222808 = getPoolData(poolAddr, pType) | |
772 | + | let AId = $t02274222808._1 | |
773 | + | let BId = $t02274222808._2 | |
774 | + | let balA = $t02274222808._3 | |
775 | + | let balB = $t02274222808._4 | |
776 | + | let shareId = $t02274222808._5 | |
781 | 777 | if (if ((tokenId != AId)) | |
782 | 778 | then (tokenId != BId) | |
783 | 779 | else false) | |
784 | 780 | then throw("Wrong asset") | |
785 | 781 | else { | |
786 | - | let $ | |
782 | + | let $t02289322973 = if ((tokenId == AId)) | |
787 | 783 | then $Tuple2(tokenAmount, 0) | |
788 | 784 | else $Tuple2(0, tokenAmount) | |
789 | - | let pmtA = $ | |
790 | - | let pmtB = $ | |
791 | - | let $ | |
792 | - | let stakedAmount = $ | |
793 | - | let nf = $ | |
785 | + | let pmtA = $t02289322973._1 | |
786 | + | let pmtB = $t02289322973._2 | |
787 | + | let $t02297623080 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
788 | + | let stakedAmount = $t02297623080._1 | |
789 | + | let nf = $t02297623080._2 | |
794 | 790 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
795 | 791 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
796 | 792 | let totalShareAmount = getPoolTotalShare(pool) | |
808 | 804 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
809 | 805 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
810 | 806 | if ((axlyFee == axlyFee)) | |
811 | - | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId)) | |
807 | + | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId, nil)) | |
812 | 808 | else throw("Strict value is not equal to itself.") | |
813 | 809 | } | |
814 | 810 | } | |
817 | 813 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = { | |
818 | 814 | let poolAddr = Address(fromBase58String(pool)) | |
819 | 815 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
820 | - | let $ | |
821 | - | let assetIdA = $ | |
822 | - | let assetIdB = $ | |
823 | - | let balA = $ | |
824 | - | let balB = $ | |
825 | - | let shareId = $ | |
816 | + | let $t02485224928 = getPoolData(poolAddr, pType) | |
817 | + | let assetIdA = $t02485224928._1 | |
818 | + | let assetIdB = $t02485224928._2 | |
819 | + | let balA = $t02485224928._3 | |
820 | + | let balB = $t02485224928._4 | |
821 | + | let shareId = $t02485224928._5 | |
826 | 822 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
827 | 823 | if ((cBalABefore == cBalABefore)) | |
828 | 824 | then { | |
841 | 837 | then { | |
842 | 838 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
843 | 839 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
844 | - | let $ | |
845 | - | let tokensAmountA = $ | |
846 | - | let tokensAmountB = $ | |
847 | - | let $ | |
840 | + | let $t02549125580 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
841 | + | let tokensAmountA = $t02549125580._1 | |
842 | + | let tokensAmountB = $t02549125580._2 | |
843 | + | let $t02558326437 = if ((debt > 0)) | |
848 | 844 | then { | |
849 | 845 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
850 | 846 | then (debt > tokensAmountA) | |
869 | 865 | else throw("Strict value is not equal to itself.") | |
870 | 866 | } | |
871 | 867 | else $Tuple2(tokensAmountA, tokensAmountB) | |
872 | - | let toUserA = $ | |
873 | - | let toUserB = $ | |
868 | + | let toUserA = $t02558326437._1 | |
869 | + | let toUserB = $t02558326437._2 | |
874 | 870 | $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId) | |
875 | 871 | } | |
876 | 872 | else throw("Strict value is not equal to itself.") | |
906 | 902 | else throw(($getType(@) + " couldn't be cast to Int")) | |
907 | 903 | } | |
908 | 904 | else 0 | |
909 | - | let $ | |
910 | - | if (($ | |
905 | + | let $t02782527978 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
906 | + | if (($t02782527978 == $t02782527978)) | |
911 | 907 | then { | |
912 | - | let shareId = $ | |
913 | - | let cBalBAfter = $ | |
914 | - | let cBalAAfter = $ | |
915 | - | let assetIdB = $ | |
916 | - | let toUserAmountB = $ | |
917 | - | let assetIdA = $ | |
918 | - | let toUserAmountA = $ | |
908 | + | let shareId = $t02782527978._7 | |
909 | + | let cBalBAfter = $t02782527978._6 | |
910 | + | let cBalAAfter = $t02782527978._5 | |
911 | + | let assetIdB = $t02782527978._4 | |
912 | + | let toUserAmountB = $t02782527978._3 | |
913 | + | let assetIdA = $t02782527978._2 | |
914 | + | let toUserAmountA = $t02782527978._1 | |
919 | 915 | let closeDbtInv = if ((debt > 0)) | |
920 | 916 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
921 | 917 | else 0 | |
922 | 918 | if ((closeDbtInv == closeDbtInv)) | |
923 | - | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId)) | |
919 | + | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil)) | |
924 | 920 | else throw("Strict value is not equal to itself.") | |
925 | 921 | } | |
926 | 922 | else throw("Strict value is not equal to itself.") | |
950 | 946 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
951 | 947 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
952 | 948 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
953 | - | let $ | |
949 | + | let $t02962229719 = if ((borrowId == aId)) | |
954 | 950 | then $Tuple2(dPriceA, decPrA) | |
955 | 951 | else $Tuple2(dPriceB, decPrB) | |
956 | - | let borrowPrice = $ | |
957 | - | let borrowDecPr = $ | |
952 | + | let borrowPrice = $t02962229719._1 | |
953 | + | let borrowDecPr = $t02962229719._2 | |
958 | 954 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
959 | 955 | } | |
960 | 956 | ||
966 | 962 | then throw("Leverage can't be <100 and >300") | |
967 | 963 | else { | |
968 | 964 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
969 | - | let $ | |
970 | - | let AId = $ | |
971 | - | let BId = $ | |
972 | - | let balA = $ | |
973 | - | let balB = $ | |
974 | - | let shareId = $ | |
965 | + | let $t03013730227 = getPoolData(Address(fromBase58String(pool)), pType) | |
966 | + | let AId = $t03013730227._1 | |
967 | + | let BId = $t03013730227._2 | |
968 | + | let balA = $t03013730227._3 | |
969 | + | let balB = $t03013730227._4 | |
970 | + | let shareId = $t03013730227._5 | |
975 | 971 | let borrowAmount = if ((leverage > 100)) | |
976 | 972 | then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId) | |
977 | 973 | else 0 | |
978 | - | let $ | |
974 | + | let $t03036230469 = if ((borrowId == AId)) | |
979 | 975 | then $Tuple2((pmtA + borrowAmount), pmtB) | |
980 | 976 | else $Tuple2(pmtA, (pmtB + borrowAmount)) | |
981 | - | let payInA = $ | |
982 | - | let payInB = $ | |
983 | - | let $ | |
984 | - | let lpAmount = $ | |
985 | - | let loss = $ | |
977 | + | let payInA = $t03036230469._1 | |
978 | + | let payInB = $t03036230469._2 | |
979 | + | let $t03047230565 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB) | |
980 | + | let lpAmount = $t03047230565._1 | |
981 | + | let loss = $t03047230565._2 | |
986 | 982 | let impactMod = if ((0 > loss)) | |
987 | 983 | then (loss * -1) | |
988 | 984 | else loss | |
989 | 985 | $Tuple2(nil, [impactMod]) | |
990 | 986 | } | |
987 | + | ||
988 | + | ||
989 | + | ||
990 | + | @Callable(i) | |
991 | + | func replenishFromLandEVALONLY (requestId) = valueOrElse(isLandCall(i), { | |
992 | + | let $t03074230846 = parseRequest(requestId) | |
993 | + | let user = $t03074230846._1 | |
994 | + | let pool = $t03074230846._2 | |
995 | + | let pmtA = $t03074230846._3 | |
996 | + | let AId = $t03074230846._4 | |
997 | + | let pmtB = $t03074230846._5 | |
998 | + | let BId = $t03074230846._6 | |
999 | + | let balA = $t03074230846._7 | |
1000 | + | let balB = $t03074230846._8 | |
1001 | + | let shareId = $t03074230846._9 | |
1002 | + | let bwAsset = $t03074230846._10 | |
1003 | + | let bwAmount = $t03074230846._11 | |
1004 | + | if ((size(i.payments) != 1)) | |
1005 | + | then throw("Wrong payment size") | |
1006 | + | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1007 | + | then true | |
1008 | + | else (i.payments[0].amount != bwAmount)) | |
1009 | + | then throw("Wrong payment") | |
1010 | + | else { | |
1011 | + | let $t03103631160 = if ((AId == bwAsset)) | |
1012 | + | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
1013 | + | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
1014 | + | let pmtAllA = $t03103631160._1 | |
1015 | + | let pmtAllB = $t03103631160._2 | |
1016 | + | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1017 | + | let $t03124231357 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1018 | + | let userStaked = $t03124231357._1 | |
1019 | + | let axlyFee = $t03124231357._2 | |
1020 | + | let posNum = getNewUserPositionNumber(user) | |
1021 | + | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1022 | + | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1023 | + | nil | |
1024 | + | } | |
1025 | + | }) | |
991 | 1026 | ||
992 | 1027 | ||
993 | 1028 | ||
1012 | 1047 | @Callable(i) | |
1013 | 1048 | func getUserPositionInDollarsREADONLY (user,pools,posNum) = { | |
1014 | 1049 | func userPos (a,pool) = { | |
1015 | - | let $ | |
1016 | - | let totalPos = $ | |
1017 | - | let posDebt = $ | |
1018 | - | let index = $ | |
1050 | + | let $t03245532489 = a | |
1051 | + | let totalPos = $t03245532489._1 | |
1052 | + | let posDebt = $t03245532489._2 | |
1053 | + | let index = $t03245532489._3 | |
1019 | 1054 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1020 | - | let $ | |
1021 | - | let AId = $ | |
1022 | - | let BId = $ | |
1023 | - | let balA = $ | |
1024 | - | let balB = $ | |
1025 | - | let shareId = $ | |
1055 | + | let $t03258132671 = getPoolData(Address(fromBase58String(pool)), pType) | |
1056 | + | let AId = $t03258132671._1 | |
1057 | + | let BId = $t03258132671._2 | |
1058 | + | let balA = $t03258132671._3 | |
1059 | + | let balB = $t03258132671._4 | |
1060 | + | let shareId = $t03258132671._5 | |
1026 | 1061 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1027 | 1062 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1028 | 1063 | let sharePrices = getSharePrice(shareId) | |
1045 | 1080 | } | |
1046 | 1081 | } | |
1047 | 1082 | ||
1048 | - | let $ | |
1083 | + | let $t03369133746 = { | |
1049 | 1084 | let $l = pools | |
1050 | 1085 | let $s = size($l) | |
1051 | 1086 | let $acc0 = $Tuple3(nil, nil, 0) | |
1059 | 1094 | ||
1060 | 1095 | $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) | |
1061 | 1096 | } | |
1062 | - | let pos = $ | |
1063 | - | let debt = $ | |
1097 | + | let pos = $t03369133746._1 | |
1098 | + | let debt = $t03369133746._2 | |
1064 | 1099 | $Tuple2(nil, $Tuple2(pos, debt)) | |
1065 | 1100 | } | |
1066 | 1101 | ||
1077 | 1112 | then throw("You can't borrow in this pool") | |
1078 | 1113 | else { | |
1079 | 1114 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1080 | - | let $ | |
1081 | - | let AId = $ | |
1082 | - | let BId = $ | |
1083 | - | let balA = $ | |
1084 | - | let balB = $ | |
1085 | - | let shareId = $ | |
1086 | - | let $ | |
1115 | + | let $t03418634276 = getPoolData(Address(fromBase58String(pool)), pType) | |
1116 | + | let AId = $t03418634276._1 | |
1117 | + | let BId = $t03418634276._2 | |
1118 | + | let balA = $t03418634276._3 | |
1119 | + | let balB = $t03418634276._4 | |
1120 | + | let shareId = $t03418634276._5 | |
1121 | + | let $t03427934916 = if ((size(i.payments) == 2)) | |
1087 | 1122 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
1088 | 1123 | then throw("Wrong payment asset A") | |
1089 | 1124 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
1096 | 1131 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
1097 | 1132 | else throw("Wrong payment") | |
1098 | 1133 | else throw("One or two payments expected") | |
1099 | - | let pmtA = $ | |
1100 | - | let pmtAssetA = $ | |
1101 | - | let pmtB = $ | |
1102 | - | let pmtAssetB = $ | |
1134 | + | let pmtA = $t03427934916._1 | |
1135 | + | let pmtAssetA = $t03427934916._2 | |
1136 | + | let pmtB = $t03427934916._3 | |
1137 | + | let pmtAssetB = $t03427934916._4 | |
1103 | 1138 | let newPosNum = getNewUserPositionNumber(toString(i.caller)) | |
1104 | 1139 | if ((leverage > 100)) | |
1105 | 1140 | then { | |
1122 | 1157 | else throw("Strict value is not equal to itself.") | |
1123 | 1158 | } | |
1124 | 1159 | else { | |
1125 | - | let $t03460934721 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1126 | - | let userStaked = $t03460934721._1 | |
1127 | - | let axlyFee = $t03460934721._2 | |
1128 | - | (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId)) | |
1160 | + | let $t03584435956 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1161 | + | let userStaked = $t03584435956._1 | |
1162 | + | let axlyFee = $t03584435956._2 | |
1163 | + | let $t03596236077 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1164 | + | let wAmountA = $t03596236077._1 | |
1165 | + | let wAmountB = $t03596236077._2 | |
1166 | + | (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) | |
1129 | 1167 | } | |
1130 | 1168 | } | |
1131 | 1169 | ||
1174 | 1212 | ||
1175 | 1213 | @Callable(i) | |
1176 | 1214 | func replenishFromLand (requestId) = valueOrElse(isLandCall(i), { | |
1177 | - | let $ | |
1178 | - | let user = $ | |
1179 | - | let pool = $ | |
1180 | - | let pmtA = $ | |
1181 | - | let AId = $ | |
1182 | - | let pmtB = $ | |
1183 | - | let BId = $ | |
1184 | - | let balA = $ | |
1185 | - | let balB = $ | |
1186 | - | let shareId = $ | |
1187 | - | let bwAsset = $ | |
1188 | - | let bwAmount = $ | |
1215 | + | let $t03857738681 = parseRequest(requestId) | |
1216 | + | let user = $t03857738681._1 | |
1217 | + | let pool = $t03857738681._2 | |
1218 | + | let pmtA = $t03857738681._3 | |
1219 | + | let AId = $t03857738681._4 | |
1220 | + | let pmtB = $t03857738681._5 | |
1221 | + | let BId = $t03857738681._6 | |
1222 | + | let balA = $t03857738681._7 | |
1223 | + | let balB = $t03857738681._8 | |
1224 | + | let shareId = $t03857738681._9 | |
1225 | + | let bwAsset = $t03857738681._10 | |
1226 | + | let bwAmount = $t03857738681._11 | |
1189 | 1227 | if ((size(i.payments) != 1)) | |
1190 | 1228 | then throw("Wrong payment size") | |
1191 | 1229 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1193 | 1231 | else (i.payments[0].amount != bwAmount)) | |
1194 | 1232 | then throw("Wrong payment") | |
1195 | 1233 | else { | |
1196 | - | let $ | |
1234 | + | let $t03887138995 = if ((AId == bwAsset)) | |
1197 | 1235 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
1198 | 1236 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
1199 | - | let pmtAllA = $ | |
1200 | - | let pmtAllB = $ | |
1237 | + | let pmtAllA = $t03887138995._1 | |
1238 | + | let pmtAllB = $t03887138995._2 | |
1201 | 1239 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1202 | - | let $ | |
1203 | - | let userStaked = $ | |
1204 | - | let axlyFee = $ | |
1240 | + | let $t03907739192 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1241 | + | let userStaked = $t03907739192._1 | |
1242 | + | let axlyFee = $t03907739192._2 | |
1205 | 1243 | let posNum = getNewUserPositionNumber(user) | |
1206 | 1244 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1207 | 1245 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1208 | - | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1246 | + | let $t03955239667 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1247 | + | let wAmountA = $t03955239667._1 | |
1248 | + | let wAmountB = $t03955239667._2 | |
1249 | + | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1209 | 1250 | } | |
1210 | 1251 | }) | |
1211 | 1252 | ||
1215 | 1256 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), { | |
1216 | 1257 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1217 | 1258 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1218 | - | let $ | |
1219 | - | let AId = $ | |
1220 | - | let BId = $ | |
1221 | - | let balA = $ | |
1222 | - | let balB = $ | |
1223 | - | let shareId = $ | |
1259 | + | let $t04016140251 = getPoolData(Address(fromBase58String(pool)), pType) | |
1260 | + | let AId = $t04016140251._1 | |
1261 | + | let BId = $t04016140251._2 | |
1262 | + | let balA = $t04016140251._3 | |
1263 | + | let balB = $t04016140251._4 | |
1264 | + | let shareId = $t04016140251._5 | |
1224 | 1265 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1225 | 1266 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1226 | 1267 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1244 | 1285 | ||
1245 | 1286 | @Callable(i) | |
1246 | 1287 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), { | |
1247 | - | let $ | |
1288 | + | let $t04201442208 = if (claim) | |
1248 | 1289 | then claimFarmed(type, pool) | |
1249 | 1290 | else { | |
1250 | 1291 | let claimedAsset = if ((type == SF_POOL)) | |
1252 | 1293 | else WXID | |
1253 | 1294 | $Tuple2(amountToExchange, claimedAsset) | |
1254 | 1295 | } | |
1255 | - | let claimedAmount = $ | |
1256 | - | let claimedAsset = $ | |
1296 | + | let claimedAmount = $t04201442208._1 | |
1297 | + | let claimedAsset = $t04201442208._2 | |
1257 | 1298 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1258 | 1299 | let change = (claimedAmount - amountToExchange) | |
1259 | 1300 | let changeEntry = if ((change > 0)) | |
1266 | 1307 | ||
1267 | 1308 | @Callable(i) | |
1268 | 1309 | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), { | |
1269 | - | let $ | |
1310 | + | let $t04289343087 = if (claim) | |
1270 | 1311 | then claimFarmed(type, pool) | |
1271 | 1312 | else { | |
1272 | 1313 | let claimedAsset = if ((type == SF_POOL)) | |
1274 | 1315 | else WXID | |
1275 | 1316 | $Tuple2(amountToExchange, claimedAsset) | |
1276 | 1317 | } | |
1277 | - | let claimedAmount = $ | |
1278 | - | let claimedAsset = $ | |
1318 | + | let claimedAmount = $t04289343087._1 | |
1319 | + | let claimedAsset = $t04289343087._2 | |
1279 | 1320 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1280 | 1321 | let change = (claimedAmount - amountToExchange) | |
1281 | 1322 | let changeEntry = if ((change > 0)) | |
1288 | 1329 | ||
1289 | 1330 | @Callable(i) | |
1290 | 1331 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), { | |
1291 | - | let $ | |
1332 | + | let $t04383844032 = if (claim) | |
1292 | 1333 | then claimFarmed(type, pool) | |
1293 | 1334 | else { | |
1294 | 1335 | let claimedAsset = if ((type == SF_POOL)) | |
1296 | 1337 | else WXID | |
1297 | 1338 | $Tuple2(amountToExchange, claimedAsset) | |
1298 | 1339 | } | |
1299 | - | let claimedAmount = $ | |
1300 | - | let claimedAsset = $ | |
1340 | + | let claimedAmount = $t04383844032._1 | |
1341 | + | let claimedAsset = $t04383844032._2 | |
1301 | 1342 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1302 | 1343 | let change = (claimedAmount - amountToExchange) | |
1303 | 1344 | let changeEntry = if ((change > 0)) | |
1314 | 1355 | else false) | |
1315 | 1356 | then throw("Wrong type") | |
1316 | 1357 | else { | |
1317 | - | let $ | |
1318 | - | let aId = $ | |
1319 | - | let bId = $ | |
1320 | - | let aBal = $ | |
1321 | - | let bBal = $ | |
1322 | - | let shareId = $ | |
1358 | + | let $t04477344867 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1359 | + | let aId = $t04477344867._1 | |
1360 | + | let bId = $t04477344867._2 | |
1361 | + | let aBal = $t04477344867._3 | |
1362 | + | let bBal = $t04477344867._4 | |
1363 | + | let shareId = $t04477344867._5 | |
1323 | 1364 | [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)] | |
1324 | 1365 | }) | |
1325 | 1366 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SF_POOL = "SF" | |
5 | 5 | ||
6 | 6 | let WX_POOL = "WX" | |
7 | 7 | ||
8 | 8 | let CAP_FEE_NO_LOAN = "capNoLoan" | |
9 | 9 | ||
10 | 10 | let CAP_FEE_LOAN = "capLoan" | |
11 | 11 | ||
12 | 12 | let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan" | |
13 | 13 | ||
14 | 14 | let STOPLOSS_LOAN = "stopLossLoan" | |
15 | 15 | ||
16 | 16 | let LOAN_FEE = "loan" | |
17 | 17 | ||
18 | 18 | let NO_LOAN_FEE = "noLoan" | |
19 | 19 | ||
20 | 20 | let NO_FEE = "noFee" | |
21 | 21 | ||
22 | 22 | let SCALE8 = 100000000 | |
23 | 23 | ||
24 | 24 | let SCALE10 = 10000000000 | |
25 | 25 | ||
26 | 26 | let SCALE16 = toBigInt(10000000000000000) | |
27 | 27 | ||
28 | 28 | let FEE_SCALE6 = 1000000 | |
29 | 29 | ||
30 | 30 | let kSFPoolAAssetBalance = "A_asset_balance" | |
31 | 31 | ||
32 | 32 | let kSFPoolBAssetBalance = "B_asset_balance" | |
33 | 33 | ||
34 | 34 | let kSFPoolAAssetId = "A_asset_id" | |
35 | 35 | ||
36 | 36 | let kSFPoolBAssetId = "B_asset_id" | |
37 | 37 | ||
38 | 38 | let kSFPoolShareId = "share_asset_id" | |
39 | 39 | ||
40 | 40 | let kSFPoolShareSupply = "share_asset_supply" | |
41 | 41 | ||
42 | 42 | let kSFPoolFee = "commission" | |
43 | 43 | ||
44 | 44 | let kUserPosition = "_user_position" | |
45 | 45 | ||
46 | 46 | let kUserPositionPool = "_user_position_pool" | |
47 | 47 | ||
48 | 48 | let kUserBorrowAmount = "_user_position_borrow_amount" | |
49 | 49 | ||
50 | 50 | let kUserBorrowAssetId = "_user_position_borrow_asset_id" | |
51 | 51 | ||
52 | 52 | let kUserPositionNum = "_user_position_number" | |
53 | 53 | ||
54 | 54 | let kUserPositionInterest = "_user_position_interest" | |
55 | 55 | ||
56 | 56 | let kPoolTotal = "_pool_total" | |
57 | 57 | ||
58 | 58 | let kPoolTotalLoan = "_pool_total_loan" | |
59 | 59 | ||
60 | 60 | let kPoolInterestLoan = "_pool_interest_loan" | |
61 | 61 | ||
62 | 62 | let kPoolInterestNoLoan = "_pool_interest_no_loan" | |
63 | 63 | ||
64 | 64 | let kPoolCanBorrow = "_pool_can_borrow" | |
65 | 65 | ||
66 | 66 | let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan" | |
67 | 67 | ||
68 | 68 | let kAxlyInFeeWithLoan = "_axly_fee_with_loan" | |
69 | 69 | ||
70 | 70 | let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan" | |
71 | 71 | ||
72 | 72 | let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan" | |
73 | 73 | ||
74 | 74 | let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan" | |
75 | 75 | ||
76 | 76 | let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan" | |
77 | 77 | ||
78 | 78 | let kRequestId = "_request_id" | |
79 | 79 | ||
80 | 80 | let kRequestIter = "requests_iter" | |
81 | 81 | ||
82 | 82 | let kPool = "pool_" | |
83 | 83 | ||
84 | 84 | let kSharePool = "_pool_share_id" | |
85 | 85 | ||
86 | 86 | let kPoolCapChange = "_pool_cap_change" | |
87 | 87 | ||
88 | 88 | let kTokenLastPrice = "last_price" | |
89 | 89 | ||
90 | 90 | let kPriceInOracle = "_twap5B" | |
91 | 91 | ||
92 | 92 | let kUserStopLoss = "_stop_loss" | |
93 | 93 | ||
94 | 94 | let kMoneyBox = "axly_money_box" | |
95 | 95 | ||
96 | 96 | let kSFFarmingAddr = "swopfi_farming_addr" | |
97 | 97 | ||
98 | 98 | let kLendService = "lend_service_addr" | |
99 | 99 | ||
100 | 100 | let kAdminCallPK = "admin_call_pub_key" | |
101 | 101 | ||
102 | 102 | let kPriceOracle = "price_oracle" | |
103 | 103 | ||
104 | 104 | let kExContract = "exchange_contract" | |
105 | 105 | ||
106 | 106 | let kWxSwapContract = "wx_swap_contract" | |
107 | 107 | ||
108 | 108 | let kSwopId = "swop_id" | |
109 | 109 | ||
110 | 110 | let kWxId = "wx_id" | |
111 | 111 | ||
112 | 112 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
113 | 113 | ||
114 | 114 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
115 | 115 | ||
116 | 116 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
117 | 117 | ||
118 | 118 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
119 | 119 | ||
120 | 120 | let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id")) | |
121 | 121 | ||
122 | 122 | let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id")) | |
123 | 123 | ||
124 | 124 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr"))) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func isAdminCall (i) = if ((i.caller == getAdminCallAddr())) | |
131 | 131 | then unit | |
132 | 132 | else throw("Only admin can call this function") | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func isSelfCall (i) = if ((i.caller == this)) | |
136 | 136 | then unit | |
137 | 137 | else throw("Only contract itself can call this function") | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func isLandCall (i) = if ((i.caller == getLendSrvAddr())) | |
141 | 141 | then unit | |
142 | 142 | else throw("Only land contract can call this function") | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func accountBalance (assetId) = match assetId { | |
146 | 146 | case id: ByteVector => | |
147 | 147 | assetBalance(this, id) | |
148 | 148 | case waves: Unit => | |
149 | 149 | wavesBalance(this).available | |
150 | 150 | case _ => | |
151 | 151 | throw("Match error") | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func getSFPoolData (poolAddr) = $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance"), valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id")) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getWXPoolData (poolAddr) = { | |
159 | 159 | let cfg = { | |
160 | 160 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
161 | 161 | if ($isInstanceOf(@, "List[Any]")) | |
162 | 162 | then @ | |
163 | 163 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
164 | 164 | } | |
165 | 165 | if ((cfg == cfg)) | |
166 | 166 | then { | |
167 | 167 | let aId = valueOrErrorMessage({ | |
168 | 168 | let @ = cfg[4] | |
169 | 169 | if ($isInstanceOf(@, "String")) | |
170 | 170 | then @ | |
171 | 171 | else unit | |
172 | 172 | }, "Can't get pool A asset id") | |
173 | 173 | let bId = valueOrErrorMessage({ | |
174 | 174 | let @ = cfg[5] | |
175 | 175 | if ($isInstanceOf(@, "String")) | |
176 | 176 | then @ | |
177 | 177 | else unit | |
178 | 178 | }, "Can't get pool B asset id") | |
179 | 179 | let shareId = valueOrErrorMessage({ | |
180 | 180 | let @ = cfg[3] | |
181 | 181 | if ($isInstanceOf(@, "String")) | |
182 | 182 | then @ | |
183 | 183 | else unit | |
184 | 184 | }, "Can't get pool LP asset id") | |
185 | 185 | let balA = { | |
186 | 186 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
187 | 187 | if ($isInstanceOf(@, "Int")) | |
188 | 188 | then @ | |
189 | 189 | else throw(($getType(@) + " couldn't be cast to Int")) | |
190 | 190 | } | |
191 | 191 | if ((balA == balA)) | |
192 | 192 | then { | |
193 | 193 | let balB = { | |
194 | 194 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
195 | 195 | if ($isInstanceOf(@, "Int")) | |
196 | 196 | then @ | |
197 | 197 | else throw(($getType(@) + " couldn't be cast to Int")) | |
198 | 198 | } | |
199 | 199 | if ((balB == balB)) | |
200 | 200 | then $Tuple5(aId, bId, balA, balB, shareId) | |
201 | 201 | else throw("Strict value is not equal to itself.") | |
202 | 202 | } | |
203 | 203 | else throw("Strict value is not equal to itself.") | |
204 | 204 | } | |
205 | 205 | else throw("Strict value is not equal to itself.") | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
210 | 210 | then getSFPoolData(poolAddr) | |
211 | 211 | else if ((type == WX_POOL)) | |
212 | 212 | then getWXPoolData(poolAddr) | |
213 | 213 | else throw("Wrong pool type") | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
217 | 217 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
218 | 218 | else if ((type == WX_POOL)) | |
219 | 219 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
220 | 220 | else throw("Wrong pool type") | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
233 | 233 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
234 | 234 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
235 | 235 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
236 | 236 | else if ((feeType == LOAN_FEE)) | |
237 | 237 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
238 | 238 | else if ((feeType == NO_LOAN_FEE)) | |
239 | 239 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
240 | 240 | else if ((feeType == NO_FEE)) | |
241 | 241 | then 0 | |
242 | 242 | else throw("Wrong fee type") | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func getWXFarmingAddr (poolAddr) = { | |
249 | 249 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
250 | 250 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
251 | 251 | Address(fromBase58String(factroyCfg[1])) | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func assetIdToStr (assetId) = match assetId { | |
256 | 256 | case id: ByteVector => | |
257 | 257 | toBase58String(id) | |
258 | 258 | case waves: Unit => | |
259 | 259 | "WAVES" | |
260 | 260 | case _ => | |
261 | 261 | throw("Not Asset id") | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
266 | 266 | then unit | |
267 | 267 | else fromBase58String(assetId) | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
271 | 271 | then 8 | |
272 | 272 | else match assetInfo(fromBase58String(assetId)) { | |
273 | 273 | case asset: Asset => | |
274 | 274 | asset.decimals | |
275 | 275 | case _ => | |
276 | 276 | throw("Can't find asset") | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | func getAssetsPrice (assetIds) = { | |
284 | 284 | func getPrices (a,assetId) = { | |
285 | 285 | let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
286 | 286 | (a :+ assetPrice) | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | let $l = assetIds | |
290 | 290 | let $s = size($l) | |
291 | 291 | let $acc0 = nil | |
292 | 292 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
293 | 293 | then $a | |
294 | 294 | else getPrices($a, $l[$i]) | |
295 | 295 | ||
296 | 296 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
297 | 297 | then $a | |
298 | 298 | else throw("List size exceeds 50") | |
299 | 299 | ||
300 | 300 | $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) | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func getSharePrice (shareId) = { | |
305 | 305 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
306 | 306 | let poolAddr = Address(fromBase58String(pool)) | |
307 | 307 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
308 | 308 | let $t092109275 = getPoolData(poolAddr, pType) | |
309 | 309 | let aId = $t092109275._1 | |
310 | 310 | let bId = $t092109275._2 | |
311 | 311 | let aBalance = $t092109275._3 | |
312 | 312 | let bBalance = $t092109275._4 | |
313 | 313 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
314 | 314 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
315 | 315 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
316 | 316 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
317 | 317 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
318 | 318 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
319 | 319 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
320 | 320 | fraction(sum, sharePrecision, shareSupply) | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func getSharePrices (shareIds) = { | |
325 | 325 | func getPrices (a,shareId) = (a :+ getSharePrice(shareId)) | |
326 | 326 | ||
327 | 327 | let $l = shareIds | |
328 | 328 | let $s = size($l) | |
329 | 329 | let $acc0 = nil | |
330 | 330 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
331 | 331 | then $a | |
332 | 332 | else getPrices($a, $l[$i]) | |
333 | 333 | ||
334 | 334 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
335 | 335 | then $a | |
336 | 336 | else throw("List size exceeds 20") | |
337 | 337 | ||
338 | 338 | $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) | |
339 | 339 | } | |
340 | 340 | ||
341 | 341 | ||
342 | - | func getCursEntries (aId,bId,shareId) = { | |
342 | + | func getCursEntries (aId,bId,shareId,wAmounts) = { | |
343 | 343 | let assetsPrices = getAssetsPrice([aId, bId]) | |
344 | 344 | let sharePrice = getSharePrice(shareId) | |
345 | - | let prices = [toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] | |
345 | + | let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts) | |
346 | 346 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
347 | 347 | } | |
348 | 348 | ||
349 | 349 | ||
350 | 350 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL)) | |
351 | 351 | then { | |
352 | 352 | let repl = { | |
353 | 353 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil) | |
354 | 354 | if ($isInstanceOf(@, "List[Any]")) | |
355 | 355 | then @ | |
356 | 356 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
357 | 357 | } | |
358 | 358 | if ((repl == repl)) | |
359 | 359 | then $Tuple5({ | |
360 | 360 | let @ = repl[3] | |
361 | 361 | if ($isInstanceOf(@, "Int")) | |
362 | 362 | then @ | |
363 | 363 | else throw(($getType(@) + " couldn't be cast to Int")) | |
364 | 364 | }, { | |
365 | 365 | let @ = repl[4] | |
366 | 366 | if ($isInstanceOf(@, "Int")) | |
367 | 367 | then @ | |
368 | 368 | else throw(($getType(@) + " couldn't be cast to Int")) | |
369 | 369 | }, { | |
370 | 370 | let @ = repl[1] | |
371 | 371 | if ($isInstanceOf(@, "Int")) | |
372 | 372 | then @ | |
373 | 373 | else throw(($getType(@) + " couldn't be cast to Int")) | |
374 | 374 | }, assetIdToStr(repl[2]), { | |
375 | 375 | let @ = repl[0] | |
376 | 376 | if ($isInstanceOf(@, "Int")) | |
377 | 377 | then @ | |
378 | 378 | else throw(($getType(@) + " couldn't be cast to Int")) | |
379 | 379 | }) | |
380 | 380 | else throw("Strict value is not equal to itself.") | |
381 | 381 | } | |
382 | 382 | else { | |
383 | - | let $ | |
383 | + | let $t01079511045 = $Tuple2(split({ | |
384 | 384 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
385 | 385 | if ($isInstanceOf(@, "String")) | |
386 | 386 | then @ | |
387 | 387 | else throw(($getType(@) + " couldn't be cast to String")) | |
388 | 388 | }, "__"), split({ | |
389 | 389 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
390 | 390 | if ($isInstanceOf(@, "String")) | |
391 | 391 | then @ | |
392 | 392 | else throw(($getType(@) + " couldn't be cast to String")) | |
393 | 393 | }, "__")) | |
394 | - | if (($ | |
394 | + | if (($t01079511045 == $t01079511045)) | |
395 | 395 | then { | |
396 | - | let evalPutInB = $ | |
397 | - | let evalPutInA = $ | |
396 | + | let evalPutInB = $t01079511045._2 | |
397 | + | let evalPutInA = $t01079511045._1 | |
398 | 398 | let lpInA = parseIntValue(evalPutInA[1]) | |
399 | 399 | let lpInB = parseIntValue(evalPutInB[1]) | |
400 | 400 | if ((lpInB > lpInA)) | |
401 | 401 | then { | |
402 | 402 | let pmt = parseIntValue(evalPutInA[8]) | |
403 | 403 | $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB) | |
404 | 404 | } | |
405 | 405 | else { | |
406 | 406 | let pmt = parseIntValue(evalPutInB[7]) | |
407 | 407 | $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA) | |
408 | 408 | } | |
409 | 409 | } | |
410 | 410 | else throw("Strict value is not equal to itself.") | |
411 | 411 | } | |
412 | 412 | ||
413 | 413 | ||
414 | 414 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
415 | 415 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
416 | 416 | if ((pType == SF_POOL)) | |
417 | 417 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
418 | 418 | else invoke(poolAddr, "put", [1000000, false], payments) | |
419 | 419 | } | |
420 | 420 | ||
421 | 421 | ||
422 | 422 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
423 | 423 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
424 | 424 | if ((pType == SF_POOL)) | |
425 | 425 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
426 | 426 | else invoke(poolAddr, "putOneTkn", [0, false], payments) | |
427 | 427 | } | |
428 | 428 | ||
429 | 429 | ||
430 | 430 | func stakeLP (pool,pType,shareId,amount) = { | |
431 | 431 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
432 | 432 | if ((pType == SF_POOL)) | |
433 | 433 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
434 | 434 | else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
435 | 435 | } | |
436 | 436 | ||
437 | 437 | ||
438 | 438 | func unstakeLP (pool,pType,shareId,amount) = { | |
439 | - | let $ | |
439 | + | let $t01253012887 = if ((pType == SF_POOL)) | |
440 | 440 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
441 | 441 | else if ((pType == WX_POOL)) | |
442 | 442 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
443 | 443 | else throw("Wrong pool type") | |
444 | - | let farmAddr = $ | |
445 | - | let fName = $ | |
446 | - | let params = $ | |
444 | + | let farmAddr = $t01253012887._1 | |
445 | + | let fName = $t01253012887._2 | |
446 | + | let params = $t01253012887._3 | |
447 | 447 | let inv = invoke(farmAddr, fName, params, nil) | |
448 | 448 | if ((inv == inv)) | |
449 | 449 | then amount | |
450 | 450 | else throw("Strict value is not equal to itself.") | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | ||
454 | 454 | func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
455 | 455 | let poolAddr = Address(fromBase58String(pool)) | |
456 | 456 | let feeScale6 = 1000000 | |
457 | 457 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
458 | 458 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
459 | - | let $ | |
459 | + | let $t01330913615 = if ((assetTokenToGet == assetIdA)) | |
460 | 460 | then { | |
461 | 461 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
462 | 462 | $Tuple2(amountToPay, assetIdB) | |
463 | 463 | } | |
464 | 464 | else { | |
465 | 465 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
466 | 466 | $Tuple2(amountToPay, assetIdA) | |
467 | 467 | } | |
468 | - | let amountToPay = $ | |
469 | - | let assetToPay = $ | |
468 | + | let amountToPay = $t01330913615._1 | |
469 | + | let assetToPay = $t01330913615._2 | |
470 | 470 | $Tuple2(assetToPay, amountToPay) | |
471 | 471 | } | |
472 | 472 | ||
473 | 473 | ||
474 | 474 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
475 | 475 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
476 | 476 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
477 | 477 | let feeScale = toBigInt(100000000) | |
478 | - | let $ | |
478 | + | let $t01395414262 = if ((assetTokenToGet == assetIdA)) | |
479 | 479 | then { | |
480 | 480 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
481 | 481 | $Tuple2(amountToPay, assetIdB) | |
482 | 482 | } | |
483 | 483 | else { | |
484 | 484 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
485 | 485 | $Tuple2(amountToPay, assetIdA) | |
486 | 486 | } | |
487 | - | let amountToPay = $ | |
488 | - | let assetToPay = $ | |
487 | + | let amountToPay = $t01395414262._1 | |
488 | + | let assetToPay = $t01395414262._2 | |
489 | 489 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
490 | 490 | $Tuple2(assetToPay, amountToPayWithFee) | |
491 | 491 | } | |
492 | 492 | ||
493 | 493 | ||
494 | 494 | func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL)) | |
495 | 495 | then { | |
496 | - | let $ | |
497 | - | let assetToPay = $ | |
498 | - | let amountToPay = $ | |
496 | + | let $t01460714729 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
497 | + | let assetToPay = $t01460714729._1 | |
498 | + | let amountToPay = $t01460714729._2 | |
499 | 499 | invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
500 | 500 | } | |
501 | 501 | else { | |
502 | - | let $ | |
503 | - | let assetToPay = $ | |
504 | - | let amountToPay = $ | |
502 | + | let $t01490415026 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
503 | + | let assetToPay = $t01490415026._1 | |
504 | + | let amountToPay = $t01490415026._2 | |
505 | 505 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
506 | 506 | } | |
507 | 507 | ||
508 | 508 | ||
509 | 509 | func calcReplenishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = { | |
510 | 510 | let poolAddr = addressFromStringValue(pool) | |
511 | 511 | if ((pType == SF_POOL)) | |
512 | 512 | then { | |
513 | 513 | let inv = { | |
514 | 514 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(pmtA), toString(pmtB), "0"]], nil) | |
515 | 515 | if ($isInstanceOf(@, "List[Any]")) | |
516 | 516 | then @ | |
517 | 517 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
518 | 518 | } | |
519 | 519 | if ((inv == inv)) | |
520 | 520 | then $Tuple2({ | |
521 | 521 | let @ = inv[0] | |
522 | 522 | if ($isInstanceOf(@, "Int")) | |
523 | 523 | then @ | |
524 | 524 | else throw(($getType(@) + " couldn't be cast to Int")) | |
525 | 525 | }, { | |
526 | 526 | let @ = inv[1] | |
527 | 527 | if ($isInstanceOf(@, "Int")) | |
528 | 528 | then @ | |
529 | 529 | else throw(($getType(@) + " couldn't be cast to Int")) | |
530 | 530 | }) | |
531 | 531 | else throw("Strict value is not equal to itself.") | |
532 | 532 | } | |
533 | 533 | else if ((pType == WX_POOL)) | |
534 | 534 | then { | |
535 | - | let $ | |
535 | + | let $t01562915970 = if (if ((pmtA > 0)) | |
536 | 536 | then (pmtB > 0) | |
537 | 537 | else false) | |
538 | 538 | then { | |
539 | - | let $ | |
540 | - | let pmtInA = $ | |
541 | - | let pmtInB = $ | |
542 | - | let change = $ | |
543 | - | let changeId = $ | |
544 | - | let lpAmount = $ | |
539 | + | let $t01571015836 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
540 | + | let pmtInA = $t01571015836._1 | |
541 | + | let pmtInB = $t01571015836._2 | |
542 | + | let change = $t01571015836._3 | |
543 | + | let changeId = $t01571015836._4 | |
544 | + | let lpAmount = $t01571015836._5 | |
545 | 545 | $Tuple3(change, changeId, lpAmount) | |
546 | 546 | } | |
547 | 547 | else if ((pmtA > 0)) | |
548 | 548 | then $Tuple3(pmtA, aId, 0) | |
549 | 549 | else $Tuple3(pmtB, bId, 0) | |
550 | - | let change = $ | |
551 | - | let changeId = $ | |
552 | - | let lpTwo = $ | |
553 | - | let $ | |
550 | + | let change = $t01562915970._1 | |
551 | + | let changeId = $t01562915970._2 | |
552 | + | let lpTwo = $t01562915970._3 | |
553 | + | let $t01597716193 = if ((change > 0)) | |
554 | 554 | then { | |
555 | 555 | let inv = { | |
556 | 556 | let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil) | |
557 | 557 | if ($isInstanceOf(@, "(Int, Int, Int)")) | |
558 | 558 | then @ | |
559 | 559 | else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)")) | |
560 | 560 | } | |
561 | 561 | if ((inv == inv)) | |
562 | 562 | then $Tuple2(inv._1, inv._3) | |
563 | 563 | else throw("Strict value is not equal to itself.") | |
564 | 564 | } | |
565 | 565 | else $Tuple2(0, 0) | |
566 | - | let lpOne = $ | |
567 | - | let loss = $ | |
566 | + | let lpOne = $t01597716193._1 | |
567 | + | let loss = $t01597716193._2 | |
568 | 568 | $Tuple2((lpTwo + lpOne), loss) | |
569 | 569 | } | |
570 | 570 | else throw("Wrong pool type") | |
571 | 571 | } | |
572 | 572 | ||
573 | 573 | ||
574 | + | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
575 | + | let $t01636816755 = if ((pType == SF_POOL)) | |
576 | + | then { | |
577 | + | let inv = { | |
578 | + | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
579 | + | if ($isInstanceOf(@, "(Int, Int)")) | |
580 | + | then @ | |
581 | + | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
582 | + | } | |
583 | + | if ((inv == inv)) | |
584 | + | then $Tuple2(inv._1, inv._2) | |
585 | + | else throw("Strict value is not equal to itself.") | |
586 | + | } | |
587 | + | else { | |
588 | + | let inv = split({ | |
589 | + | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil) | |
590 | + | if ($isInstanceOf(@, "String")) | |
591 | + | then @ | |
592 | + | else throw(($getType(@) + " couldn't be cast to String")) | |
593 | + | }, "__") | |
594 | + | if ((inv == inv)) | |
595 | + | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
596 | + | else throw("Strict value is not equal to itself.") | |
597 | + | } | |
598 | + | let amountA = $t01636816755._1 | |
599 | + | let amountB = $t01636816755._2 | |
600 | + | $Tuple2(amountA, amountB) | |
601 | + | } | |
602 | + | ||
603 | + | ||
574 | 604 | func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = { | |
575 | 605 | let poolAddr = addressFromStringValue(pool) | |
576 | - | let $t01645116951 = if ((pType == SF_POOL)) | |
577 | - | then { | |
578 | - | let inv = { | |
579 | - | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil) | |
580 | - | if ($isInstanceOf(@, "List[Any]")) | |
581 | - | then @ | |
582 | - | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
583 | - | } | |
584 | - | if ((inv == inv)) | |
585 | - | then $Tuple2({ | |
586 | - | let @ = inv[0] | |
587 | - | if ($isInstanceOf(@, "Int")) | |
588 | - | then @ | |
589 | - | else throw(($getType(@) + " couldn't be cast to Int")) | |
590 | - | }, { | |
591 | - | let @ = inv[1] | |
592 | - | if ($isInstanceOf(@, "Int")) | |
593 | - | then @ | |
594 | - | else throw(($getType(@) + " couldn't be cast to Int")) | |
595 | - | }) | |
596 | - | else throw("Strict value is not equal to itself.") | |
597 | - | } | |
598 | - | else if ((pType == WX_POOL)) | |
599 | - | then { | |
600 | - | let get = split({ | |
601 | - | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, lpAmount], nil) | |
602 | - | if ($isInstanceOf(@, "String")) | |
603 | - | then @ | |
604 | - | else throw(($getType(@) + " couldn't be cast to String")) | |
605 | - | }, "__") | |
606 | - | if ((get == get)) | |
607 | - | then $Tuple2(parseIntValue(get[1]), parseIntValue(get[2])) | |
608 | - | else throw("Strict value is not equal to itself.") | |
609 | - | } | |
610 | - | else throw("Wrong pool type") | |
611 | - | let getAmountA = $t01645116951._1 | |
612 | - | let getAmountB = $t01645116951._2 | |
606 | + | let $t01700817101 = calcWithdrawLPFromPoolVirt(poolAddr, pType, shareId, lpAmount) | |
607 | + | let getAmountA = $t01700817101._1 | |
608 | + | let getAmountB = $t01700817101._2 | |
613 | 609 | if ((borrowAmount > 0)) | |
614 | 610 | then { | |
615 | 611 | let amountToGetEx = if (if ((borrowAssetId == aId)) | |
616 | 612 | then (borrowAmount > getAmountA) | |
617 | 613 | else false) | |
618 | 614 | then (borrowAmount - getAmountA) | |
619 | 615 | else if (if ((borrowAssetId == bId)) | |
620 | 616 | then (borrowAmount > getAmountB) | |
621 | 617 | else false) | |
622 | 618 | then (borrowAmount - getAmountB) | |
623 | 619 | else 0 | |
624 | - | let $ | |
620 | + | let $t01737917682 = if ((amountToGetEx > 0)) | |
625 | 621 | then if ((pType == SF_POOL)) | |
626 | 622 | then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId) | |
627 | 623 | else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId) | |
628 | 624 | else $Tuple2("", 0) | |
629 | - | let assetToPay = $ | |
630 | - | let amountToPay = $ | |
625 | + | let assetToPay = $t01737917682._1 | |
626 | + | let amountToPay = $t01737917682._2 | |
631 | 627 | if ((borrowAssetId == aId)) | |
632 | 628 | then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay)) | |
633 | 629 | else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount)) | |
634 | 630 | } | |
635 | 631 | else $Tuple2(getAmountA, getAmountB) | |
636 | 632 | } | |
637 | 633 | ||
638 | 634 | ||
639 | 635 | func claimFarmed (type,pool) = if ((type == SF_POOL)) | |
640 | 636 | then { | |
641 | 637 | let balBefore = accountBalance(SWOPID) | |
642 | 638 | if ((balBefore == balBefore)) | |
643 | 639 | then { | |
644 | 640 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
645 | 641 | if ((inv == inv)) | |
646 | 642 | then { | |
647 | 643 | let balAfter = accountBalance(SWOPID) | |
648 | 644 | $Tuple2((balAfter - balBefore), SWOPID) | |
649 | 645 | } | |
650 | 646 | else throw("Strict value is not equal to itself.") | |
651 | 647 | } | |
652 | 648 | else throw("Strict value is not equal to itself.") | |
653 | 649 | } | |
654 | 650 | else if ((type == WX_POOL)) | |
655 | 651 | then { | |
656 | 652 | let balBefore = accountBalance(WXID) | |
657 | 653 | if ((balBefore == balBefore)) | |
658 | 654 | then { | |
659 | 655 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
660 | 656 | if ((inv == inv)) | |
661 | 657 | then { | |
662 | 658 | let balAfter = accountBalance(WXID) | |
663 | 659 | $Tuple2((balAfter - balBefore), WXID) | |
664 | 660 | } | |
665 | 661 | else throw("Strict value is not equal to itself.") | |
666 | 662 | } | |
667 | 663 | else throw("Strict value is not equal to itself.") | |
668 | 664 | } | |
669 | 665 | else throw("Wrong pool type") | |
670 | 666 | ||
671 | 667 | ||
672 | 668 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
673 | 669 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
674 | 670 | if ((lpBalanceBefore == lpBalanceBefore)) | |
675 | 671 | then { | |
676 | 672 | let poolAddr = addressFromStringValue(pool) | |
677 | - | let $ | |
673 | + | let $t01887919295 = if (if ((pmtA > 0)) | |
678 | 674 | then (pmtB > 0) | |
679 | 675 | else false) | |
680 | 676 | then { | |
681 | - | let $ | |
682 | - | let pmtInA = $ | |
683 | - | let pmtInB = $ | |
684 | - | let change = $ | |
685 | - | let changeId = $ | |
677 | + | let $t01894519061 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
678 | + | let pmtInA = $t01894519061._1 | |
679 | + | let pmtInB = $t01894519061._2 | |
680 | + | let change = $t01894519061._3 | |
681 | + | let changeId = $t01894519061._4 | |
686 | 682 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
687 | 683 | if ((inv == inv)) | |
688 | 684 | then $Tuple2(change, changeId) | |
689 | 685 | else throw("Strict value is not equal to itself.") | |
690 | 686 | } | |
691 | 687 | else if ((pmtA > 0)) | |
692 | 688 | then $Tuple2(pmtA, aId) | |
693 | 689 | else if ((pmtB > 0)) | |
694 | 690 | then $Tuple2(pmtB, bId) | |
695 | 691 | else throw("pmts must be > 0") | |
696 | - | let change = $ | |
697 | - | let changeId = $ | |
692 | + | let change = $t01887919295._1 | |
693 | + | let changeId = $t01887919295._2 | |
698 | 694 | let inv = if ((change > 0)) | |
699 | 695 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
700 | 696 | else nil | |
701 | 697 | if ((inv == inv)) | |
702 | 698 | then { | |
703 | 699 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
704 | 700 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
705 | 701 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
706 | 702 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
707 | 703 | if ((0 >= userShareForStake)) | |
708 | 704 | then throw("amount of staked sharetokens must be > 0") | |
709 | 705 | else { | |
710 | 706 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
711 | 707 | if ((invLP == invLP)) | |
712 | 708 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
713 | 709 | else throw("Strict value is not equal to itself.") | |
714 | 710 | } | |
715 | 711 | } | |
716 | 712 | else throw("Strict value is not equal to itself.") | |
717 | 713 | } | |
718 | 714 | else throw("Strict value is not equal to itself.") | |
719 | 715 | } | |
720 | 716 | ||
721 | 717 | ||
722 | 718 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
723 | 719 | let totalAmount = getPoolTotalShare(pool) | |
724 | 720 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
725 | - | let $ | |
721 | + | let $t02015320391 = if (withLoan) | |
726 | 722 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
727 | 723 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
728 | - | let curPoolInterest = $ | |
729 | - | let totalStakedWithLoan = $ | |
724 | + | let curPoolInterest = $t02015320391._1 | |
725 | + | let totalStakedWithLoan = $t02015320391._2 | |
730 | 726 | [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))] | |
731 | 727 | } | |
732 | 728 | ||
733 | 729 | ||
734 | 730 | func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
735 | 731 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
736 | 732 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
737 | 733 | then { | |
738 | 734 | let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
739 | 735 | if ((inv == inv)) | |
740 | 736 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
741 | 737 | else throw("Strict value is not equal to itself.") | |
742 | 738 | } | |
743 | 739 | else throw("Strict value is not equal to itself.") | |
744 | 740 | } | |
745 | 741 | ||
746 | 742 | ||
747 | 743 | func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = { | |
748 | 744 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
749 | 745 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
750 | 746 | then { | |
751 | 747 | let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
752 | 748 | if ((inv == inv)) | |
753 | 749 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
754 | 750 | else throw("Strict value is not equal to itself.") | |
755 | 751 | } | |
756 | 752 | else throw("Strict value is not equal to itself.") | |
757 | 753 | } | |
758 | 754 | ||
759 | 755 | ||
760 | 756 | func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
761 | 757 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
762 | 758 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
763 | 759 | then { | |
764 | 760 | let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
765 | 761 | if ((inv == inv)) | |
766 | 762 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
767 | 763 | else throw("Strict value is not equal to itself.") | |
768 | 764 | } | |
769 | 765 | else throw("Strict value is not equal to itself.") | |
770 | 766 | } | |
771 | 767 | ||
772 | 768 | ||
773 | 769 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
774 | 770 | let poolAddr = Address(fromBase58String(pool)) | |
775 | - | let $ | |
776 | - | let AId = $ | |
777 | - | let BId = $ | |
778 | - | let balA = $ | |
779 | - | let balB = $ | |
780 | - | let shareId = $ | |
771 | + | let $t02274222808 = getPoolData(poolAddr, pType) | |
772 | + | let AId = $t02274222808._1 | |
773 | + | let BId = $t02274222808._2 | |
774 | + | let balA = $t02274222808._3 | |
775 | + | let balB = $t02274222808._4 | |
776 | + | let shareId = $t02274222808._5 | |
781 | 777 | if (if ((tokenId != AId)) | |
782 | 778 | then (tokenId != BId) | |
783 | 779 | else false) | |
784 | 780 | then throw("Wrong asset") | |
785 | 781 | else { | |
786 | - | let $ | |
782 | + | let $t02289322973 = if ((tokenId == AId)) | |
787 | 783 | then $Tuple2(tokenAmount, 0) | |
788 | 784 | else $Tuple2(0, tokenAmount) | |
789 | - | let pmtA = $ | |
790 | - | let pmtB = $ | |
791 | - | let $ | |
792 | - | let stakedAmount = $ | |
793 | - | let nf = $ | |
785 | + | let pmtA = $t02289322973._1 | |
786 | + | let pmtB = $t02289322973._2 | |
787 | + | let $t02297623080 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
788 | + | let stakedAmount = $t02297623080._1 | |
789 | + | let nf = $t02297623080._2 | |
794 | 790 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
795 | 791 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
796 | 792 | let totalShareAmount = getPoolTotalShare(pool) | |
797 | 793 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
798 | 794 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
799 | 795 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
800 | 796 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
801 | 797 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
802 | 798 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
803 | 799 | else 0 | |
804 | 800 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
805 | 801 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
806 | 802 | else 0 | |
807 | 803 | let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
808 | 804 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
809 | 805 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
810 | 806 | if ((axlyFee == axlyFee)) | |
811 | - | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId)) | |
807 | + | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId, nil)) | |
812 | 808 | else throw("Strict value is not equal to itself.") | |
813 | 809 | } | |
814 | 810 | } | |
815 | 811 | ||
816 | 812 | ||
817 | 813 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = { | |
818 | 814 | let poolAddr = Address(fromBase58String(pool)) | |
819 | 815 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
820 | - | let $ | |
821 | - | let assetIdA = $ | |
822 | - | let assetIdB = $ | |
823 | - | let balA = $ | |
824 | - | let balB = $ | |
825 | - | let shareId = $ | |
816 | + | let $t02485224928 = getPoolData(poolAddr, pType) | |
817 | + | let assetIdA = $t02485224928._1 | |
818 | + | let assetIdB = $t02485224928._2 | |
819 | + | let balA = $t02485224928._3 | |
820 | + | let balB = $t02485224928._4 | |
821 | + | let shareId = $t02485224928._5 | |
826 | 822 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
827 | 823 | if ((cBalABefore == cBalABefore)) | |
828 | 824 | then { | |
829 | 825 | let cBalBBefore = accountBalance(assetIdFromStr(assetIdB)) | |
830 | 826 | if ((cBalBBefore == cBalBBefore)) | |
831 | 827 | then { | |
832 | 828 | let inv = if ((pType == SF_POOL)) | |
833 | 829 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
834 | 830 | else { | |
835 | 831 | let inv = unstakeLP(pool, pType, shareId, userCanWithdraw) | |
836 | 832 | if ((inv == inv)) | |
837 | 833 | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
838 | 834 | else throw("Strict value is not equal to itself.") | |
839 | 835 | } | |
840 | 836 | if ((inv == inv)) | |
841 | 837 | then { | |
842 | 838 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
843 | 839 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
844 | - | let $ | |
845 | - | let tokensAmountA = $ | |
846 | - | let tokensAmountB = $ | |
847 | - | let $ | |
840 | + | let $t02549125580 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
841 | + | let tokensAmountA = $t02549125580._1 | |
842 | + | let tokensAmountB = $t02549125580._2 | |
843 | + | let $t02558326437 = if ((debt > 0)) | |
848 | 844 | then { | |
849 | 845 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
850 | 846 | then (debt > tokensAmountA) | |
851 | 847 | else false) | |
852 | 848 | then (debt - tokensAmountA) | |
853 | 849 | else if (if ((borrowAsset == assetIdB)) | |
854 | 850 | then (debt > tokensAmountB) | |
855 | 851 | else false) | |
856 | 852 | then (debt - tokensAmountB) | |
857 | 853 | else 0 | |
858 | 854 | let exInv = if ((amountToGetEx > 0)) | |
859 | 855 | then exchangeDirectly(pType, pool, assetIdA, assetIdB, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset) | |
860 | 856 | else nil | |
861 | 857 | if ((exInv == exInv)) | |
862 | 858 | then { | |
863 | 859 | let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA)) | |
864 | 860 | let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB)) | |
865 | 861 | if ((borrowAsset == assetIdA)) | |
866 | 862 | then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore)) | |
867 | 863 | else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt)) | |
868 | 864 | } | |
869 | 865 | else throw("Strict value is not equal to itself.") | |
870 | 866 | } | |
871 | 867 | else $Tuple2(tokensAmountA, tokensAmountB) | |
872 | - | let toUserA = $ | |
873 | - | let toUserB = $ | |
868 | + | let toUserA = $t02558326437._1 | |
869 | + | let toUserB = $t02558326437._2 | |
874 | 870 | $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId) | |
875 | 871 | } | |
876 | 872 | else throw("Strict value is not equal to itself.") | |
877 | 873 | } | |
878 | 874 | else throw("Strict value is not equal to itself.") | |
879 | 875 | } | |
880 | 876 | else throw("Strict value is not equal to itself.") | |
881 | 877 | } | |
882 | 878 | ||
883 | 879 | ||
884 | 880 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
885 | 881 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
886 | 882 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
887 | 883 | let poolInterest = if (borrowed) | |
888 | 884 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
889 | 885 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
890 | 886 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
891 | 887 | } | |
892 | 888 | ||
893 | 889 | ||
894 | 890 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
895 | 891 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
896 | 892 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) | |
897 | 893 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
898 | 894 | let poolTotalShare = getPoolTotalShare(pool) | |
899 | 895 | let userAddr = Address(fromBase58String(user)) | |
900 | 896 | let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "") | |
901 | 897 | let debt = if ((borrowAmount > 0)) | |
902 | 898 | then { | |
903 | 899 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil) | |
904 | 900 | if ($isInstanceOf(@, "Int")) | |
905 | 901 | then @ | |
906 | 902 | else throw(($getType(@) + " couldn't be cast to Int")) | |
907 | 903 | } | |
908 | 904 | else 0 | |
909 | - | let $ | |
910 | - | if (($ | |
905 | + | let $t02782527978 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
906 | + | if (($t02782527978 == $t02782527978)) | |
911 | 907 | then { | |
912 | - | let shareId = $ | |
913 | - | let cBalBAfter = $ | |
914 | - | let cBalAAfter = $ | |
915 | - | let assetIdB = $ | |
916 | - | let toUserAmountB = $ | |
917 | - | let assetIdA = $ | |
918 | - | let toUserAmountA = $ | |
908 | + | let shareId = $t02782527978._7 | |
909 | + | let cBalBAfter = $t02782527978._6 | |
910 | + | let cBalAAfter = $t02782527978._5 | |
911 | + | let assetIdB = $t02782527978._4 | |
912 | + | let toUserAmountB = $t02782527978._3 | |
913 | + | let assetIdA = $t02782527978._2 | |
914 | + | let toUserAmountA = $t02782527978._1 | |
919 | 915 | let closeDbtInv = if ((debt > 0)) | |
920 | 916 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
921 | 917 | else 0 | |
922 | 918 | if ((closeDbtInv == closeDbtInv)) | |
923 | - | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId)) | |
919 | + | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil)) | |
924 | 920 | else throw("Strict value is not equal to itself.") | |
925 | 921 | } | |
926 | 922 | else throw("Strict value is not equal to itself.") | |
927 | 923 | } | |
928 | 924 | ||
929 | 925 | ||
930 | 926 | func parseRequest (requestId) = { | |
931 | 927 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
932 | 928 | let user = request[0] | |
933 | 929 | let pool = request[1] | |
934 | 930 | let pmtA = parseIntValue(request[2]) | |
935 | 931 | let AId = request[3] | |
936 | 932 | let pmtB = parseIntValue(request[4]) | |
937 | 933 | let BId = request[5] | |
938 | 934 | let balA = parseIntValue(request[6]) | |
939 | 935 | let balB = parseIntValue(request[7]) | |
940 | 936 | let shareId = request[8] | |
941 | 937 | let bwAsset = request[9] | |
942 | 938 | let bwAmount = parseIntValue(request[10]) | |
943 | 939 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
944 | 940 | } | |
945 | 941 | ||
946 | 942 | ||
947 | 943 | func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = { | |
948 | 944 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
949 | 945 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
950 | 946 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
951 | 947 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
952 | 948 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
953 | - | let $ | |
949 | + | let $t02962229719 = if ((borrowId == aId)) | |
954 | 950 | then $Tuple2(dPriceA, decPrA) | |
955 | 951 | else $Tuple2(dPriceB, decPrB) | |
956 | - | let borrowPrice = $ | |
957 | - | let borrowDecPr = $ | |
952 | + | let borrowPrice = $t02962229719._1 | |
953 | + | let borrowDecPr = $t02962229719._2 | |
958 | 954 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
959 | 955 | } | |
960 | 956 | ||
961 | 957 | ||
962 | 958 | @Callable(i) | |
963 | 959 | func calcPriceImpactEVALONLY (pool,leverage,borrowId,pmtA,pmtB) = if (if ((100 > leverage)) | |
964 | 960 | then true | |
965 | 961 | else (leverage > 300)) | |
966 | 962 | then throw("Leverage can't be <100 and >300") | |
967 | 963 | else { | |
968 | 964 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
969 | - | let $ | |
970 | - | let AId = $ | |
971 | - | let BId = $ | |
972 | - | let balA = $ | |
973 | - | let balB = $ | |
974 | - | let shareId = $ | |
965 | + | let $t03013730227 = getPoolData(Address(fromBase58String(pool)), pType) | |
966 | + | let AId = $t03013730227._1 | |
967 | + | let BId = $t03013730227._2 | |
968 | + | let balA = $t03013730227._3 | |
969 | + | let balB = $t03013730227._4 | |
970 | + | let shareId = $t03013730227._5 | |
975 | 971 | let borrowAmount = if ((leverage > 100)) | |
976 | 972 | then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId) | |
977 | 973 | else 0 | |
978 | - | let $ | |
974 | + | let $t03036230469 = if ((borrowId == AId)) | |
979 | 975 | then $Tuple2((pmtA + borrowAmount), pmtB) | |
980 | 976 | else $Tuple2(pmtA, (pmtB + borrowAmount)) | |
981 | - | let payInA = $ | |
982 | - | let payInB = $ | |
983 | - | let $ | |
984 | - | let lpAmount = $ | |
985 | - | let loss = $ | |
977 | + | let payInA = $t03036230469._1 | |
978 | + | let payInB = $t03036230469._2 | |
979 | + | let $t03047230565 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB) | |
980 | + | let lpAmount = $t03047230565._1 | |
981 | + | let loss = $t03047230565._2 | |
986 | 982 | let impactMod = if ((0 > loss)) | |
987 | 983 | then (loss * -1) | |
988 | 984 | else loss | |
989 | 985 | $Tuple2(nil, [impactMod]) | |
990 | 986 | } | |
987 | + | ||
988 | + | ||
989 | + | ||
990 | + | @Callable(i) | |
991 | + | func replenishFromLandEVALONLY (requestId) = valueOrElse(isLandCall(i), { | |
992 | + | let $t03074230846 = parseRequest(requestId) | |
993 | + | let user = $t03074230846._1 | |
994 | + | let pool = $t03074230846._2 | |
995 | + | let pmtA = $t03074230846._3 | |
996 | + | let AId = $t03074230846._4 | |
997 | + | let pmtB = $t03074230846._5 | |
998 | + | let BId = $t03074230846._6 | |
999 | + | let balA = $t03074230846._7 | |
1000 | + | let balB = $t03074230846._8 | |
1001 | + | let shareId = $t03074230846._9 | |
1002 | + | let bwAsset = $t03074230846._10 | |
1003 | + | let bwAmount = $t03074230846._11 | |
1004 | + | if ((size(i.payments) != 1)) | |
1005 | + | then throw("Wrong payment size") | |
1006 | + | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1007 | + | then true | |
1008 | + | else (i.payments[0].amount != bwAmount)) | |
1009 | + | then throw("Wrong payment") | |
1010 | + | else { | |
1011 | + | let $t03103631160 = if ((AId == bwAsset)) | |
1012 | + | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
1013 | + | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
1014 | + | let pmtAllA = $t03103631160._1 | |
1015 | + | let pmtAllB = $t03103631160._2 | |
1016 | + | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1017 | + | let $t03124231357 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1018 | + | let userStaked = $t03124231357._1 | |
1019 | + | let axlyFee = $t03124231357._2 | |
1020 | + | let posNum = getNewUserPositionNumber(user) | |
1021 | + | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1022 | + | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1023 | + | nil | |
1024 | + | } | |
1025 | + | }) | |
991 | 1026 | ||
992 | 1027 | ||
993 | 1028 | ||
994 | 1029 | @Callable(i) | |
995 | 1030 | func getShareAssetPriceREADONLY (shareId) = { | |
996 | 1031 | let sharePrices = getSharePrice(shareId) | |
997 | 1032 | $Tuple2(nil, sharePrices) | |
998 | 1033 | } | |
999 | 1034 | ||
1000 | 1035 | ||
1001 | 1036 | ||
1002 | 1037 | @Callable(i) | |
1003 | 1038 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
1004 | 1039 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
1005 | 1040 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
1006 | 1041 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
1007 | 1042 | $Tuple2(nil, userCanWithdraw) | |
1008 | 1043 | } | |
1009 | 1044 | ||
1010 | 1045 | ||
1011 | 1046 | ||
1012 | 1047 | @Callable(i) | |
1013 | 1048 | func getUserPositionInDollarsREADONLY (user,pools,posNum) = { | |
1014 | 1049 | func userPos (a,pool) = { | |
1015 | - | let $ | |
1016 | - | let totalPos = $ | |
1017 | - | let posDebt = $ | |
1018 | - | let index = $ | |
1050 | + | let $t03245532489 = a | |
1051 | + | let totalPos = $t03245532489._1 | |
1052 | + | let posDebt = $t03245532489._2 | |
1053 | + | let index = $t03245532489._3 | |
1019 | 1054 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1020 | - | let $ | |
1021 | - | let AId = $ | |
1022 | - | let BId = $ | |
1023 | - | let balA = $ | |
1024 | - | let balB = $ | |
1025 | - | let shareId = $ | |
1055 | + | let $t03258132671 = getPoolData(Address(fromBase58String(pool)), pType) | |
1056 | + | let AId = $t03258132671._1 | |
1057 | + | let BId = $t03258132671._2 | |
1058 | + | let balA = $t03258132671._3 | |
1059 | + | let balB = $t03258132671._4 | |
1060 | + | let shareId = $t03258132671._5 | |
1026 | 1061 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1027 | 1062 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1028 | 1063 | let sharePrices = getSharePrice(shareId) | |
1029 | 1064 | let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
1030 | 1065 | let shareD = fraction(userCanWithdraw, sharePrices, decPrShare) | |
1031 | 1066 | if ((borrowAmount == 0)) | |
1032 | 1067 | then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1)) | |
1033 | 1068 | else { | |
1034 | 1069 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1035 | 1070 | let debt = { | |
1036 | 1071 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil) | |
1037 | 1072 | if ($isInstanceOf(@, "Int")) | |
1038 | 1073 | then @ | |
1039 | 1074 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1040 | 1075 | } | |
1041 | 1076 | let borrowAssetPrice = getIntegerValue(priceOracleAddr, (borrowAsset + kPriceInOracle)) | |
1042 | 1077 | let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN) | |
1043 | 1078 | let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId) | |
1044 | 1079 | $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1)) | |
1045 | 1080 | } | |
1046 | 1081 | } | |
1047 | 1082 | ||
1048 | - | let $ | |
1083 | + | let $t03369133746 = { | |
1049 | 1084 | let $l = pools | |
1050 | 1085 | let $s = size($l) | |
1051 | 1086 | let $acc0 = $Tuple3(nil, nil, 0) | |
1052 | 1087 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1053 | 1088 | then $a | |
1054 | 1089 | else userPos($a, $l[$i]) | |
1055 | 1090 | ||
1056 | 1091 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1057 | 1092 | then $a | |
1058 | 1093 | else throw("List size exceeds 20") | |
1059 | 1094 | ||
1060 | 1095 | $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) | |
1061 | 1096 | } | |
1062 | - | let pos = $ | |
1063 | - | let debt = $ | |
1097 | + | let pos = $t03369133746._1 | |
1098 | + | let debt = $t03369133746._2 | |
1064 | 1099 | $Tuple2(nil, $Tuple2(pos, debt)) | |
1065 | 1100 | } | |
1066 | 1101 | ||
1067 | 1102 | ||
1068 | 1103 | ||
1069 | 1104 | @Callable(i) | |
1070 | 1105 | func replenish (pool,leverage,borrowId) = if (if ((100 > leverage)) | |
1071 | 1106 | then true | |
1072 | 1107 | else (leverage > 300)) | |
1073 | 1108 | then throw("Leverage can't be <100 and >300") | |
1074 | 1109 | else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow)))) | |
1075 | 1110 | then (leverage > 100) | |
1076 | 1111 | else false) | |
1077 | 1112 | then throw("You can't borrow in this pool") | |
1078 | 1113 | else { | |
1079 | 1114 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1080 | - | let $ | |
1081 | - | let AId = $ | |
1082 | - | let BId = $ | |
1083 | - | let balA = $ | |
1084 | - | let balB = $ | |
1085 | - | let shareId = $ | |
1086 | - | let $ | |
1115 | + | let $t03418634276 = getPoolData(Address(fromBase58String(pool)), pType) | |
1116 | + | let AId = $t03418634276._1 | |
1117 | + | let BId = $t03418634276._2 | |
1118 | + | let balA = $t03418634276._3 | |
1119 | + | let balB = $t03418634276._4 | |
1120 | + | let shareId = $t03418634276._5 | |
1121 | + | let $t03427934916 = if ((size(i.payments) == 2)) | |
1087 | 1122 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
1088 | 1123 | then throw("Wrong payment asset A") | |
1089 | 1124 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
1090 | 1125 | then throw("Wrong payment asset B") | |
1091 | 1126 | else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId) | |
1092 | 1127 | else if ((size(i.payments) == 1)) | |
1093 | 1128 | then if ((assetIdToStr(i.payments[0].assetId) == AId)) | |
1094 | 1129 | then $Tuple4(i.payments[0].amount, AId, 0, BId) | |
1095 | 1130 | else if ((assetIdToStr(i.payments[0].assetId) == BId)) | |
1096 | 1131 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
1097 | 1132 | else throw("Wrong payment") | |
1098 | 1133 | else throw("One or two payments expected") | |
1099 | - | let pmtA = $ | |
1100 | - | let pmtAssetA = $ | |
1101 | - | let pmtB = $ | |
1102 | - | let pmtAssetB = $ | |
1134 | + | let pmtA = $t03427934916._1 | |
1135 | + | let pmtAssetA = $t03427934916._2 | |
1136 | + | let pmtB = $t03427934916._3 | |
1137 | + | let pmtAssetB = $t03427934916._4 | |
1103 | 1138 | let newPosNum = getNewUserPositionNumber(toString(i.caller)) | |
1104 | 1139 | if ((leverage > 100)) | |
1105 | 1140 | then { | |
1106 | 1141 | let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId) | |
1107 | 1142 | let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",") | |
1108 | 1143 | let newRequestId = { | |
1109 | 1144 | let @ = invoke(this, "createNewRequest", [request], nil) | |
1110 | 1145 | if ($isInstanceOf(@, "Int")) | |
1111 | 1146 | then @ | |
1112 | 1147 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1113 | 1148 | } | |
1114 | 1149 | if ((newRequestId == newRequestId)) | |
1115 | 1150 | then { | |
1116 | 1151 | let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
1117 | 1152 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
1118 | 1153 | if ((inv == inv)) | |
1119 | 1154 | then nil | |
1120 | 1155 | else throw("Strict value is not equal to itself.") | |
1121 | 1156 | } | |
1122 | 1157 | else throw("Strict value is not equal to itself.") | |
1123 | 1158 | } | |
1124 | 1159 | else { | |
1125 | - | let $t03460934721 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1126 | - | let userStaked = $t03460934721._1 | |
1127 | - | let axlyFee = $t03460934721._2 | |
1128 | - | (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId)) | |
1160 | + | let $t03584435956 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1161 | + | let userStaked = $t03584435956._1 | |
1162 | + | let axlyFee = $t03584435956._2 | |
1163 | + | let $t03596236077 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1164 | + | let wAmountA = $t03596236077._1 | |
1165 | + | let wAmountB = $t03596236077._2 | |
1166 | + | (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) | |
1129 | 1167 | } | |
1130 | 1168 | } | |
1131 | 1169 | ||
1132 | 1170 | ||
1133 | 1171 | ||
1134 | 1172 | @Callable(i) | |
1135 | 1173 | func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false) | |
1136 | 1174 | ||
1137 | 1175 | ||
1138 | 1176 | ||
1139 | 1177 | @Callable(i) | |
1140 | 1178 | func createUpdateStopLoss (posId,poolId,assetId,price) = { | |
1141 | 1179 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1142 | 1180 | if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
1143 | 1181 | then throw("There are no user position") | |
1144 | 1182 | else if ((0 >= price)) | |
1145 | 1183 | then throw("Price must be greater than 0") | |
1146 | 1184 | else if ((price > tokenOraclePrice)) | |
1147 | 1185 | then throw("Price must be less than current token price") | |
1148 | 1186 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
1149 | 1187 | } | |
1150 | 1188 | ||
1151 | 1189 | ||
1152 | 1190 | ||
1153 | 1191 | @Callable(i) | |
1154 | 1192 | func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
1155 | 1193 | then throw("No entry") | |
1156 | 1194 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))] | |
1157 | 1195 | ||
1158 | 1196 | ||
1159 | 1197 | ||
1160 | 1198 | @Callable(i) | |
1161 | 1199 | func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox))) | |
1162 | 1200 | then throw("Already inited") | |
1163 | 1201 | else [StringEntry(kMoneyBox, moneyBoxAddr), StringEntry(kSFFarmingAddr, sfFarmingAddr), StringEntry(kLendService, lendAddr), StringEntry(kPriceOracle, priceOracleAddr), StringEntry(kExContract, keeperExContract), StringEntry(kWxSwapContract, wxSwapContract), StringEntry(kSwopId, swopAssetId), StringEntry(kWxId, wxAssetId), StringEntry(kAdminCallPK, adminPubKey)] | |
1164 | 1202 | ||
1165 | 1203 | ||
1166 | 1204 | ||
1167 | 1205 | @Callable(i) | |
1168 | 1206 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
1169 | 1207 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
1170 | 1208 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
1171 | 1209 | }) | |
1172 | 1210 | ||
1173 | 1211 | ||
1174 | 1212 | ||
1175 | 1213 | @Callable(i) | |
1176 | 1214 | func replenishFromLand (requestId) = valueOrElse(isLandCall(i), { | |
1177 | - | let $ | |
1178 | - | let user = $ | |
1179 | - | let pool = $ | |
1180 | - | let pmtA = $ | |
1181 | - | let AId = $ | |
1182 | - | let pmtB = $ | |
1183 | - | let BId = $ | |
1184 | - | let balA = $ | |
1185 | - | let balB = $ | |
1186 | - | let shareId = $ | |
1187 | - | let bwAsset = $ | |
1188 | - | let bwAmount = $ | |
1215 | + | let $t03857738681 = parseRequest(requestId) | |
1216 | + | let user = $t03857738681._1 | |
1217 | + | let pool = $t03857738681._2 | |
1218 | + | let pmtA = $t03857738681._3 | |
1219 | + | let AId = $t03857738681._4 | |
1220 | + | let pmtB = $t03857738681._5 | |
1221 | + | let BId = $t03857738681._6 | |
1222 | + | let balA = $t03857738681._7 | |
1223 | + | let balB = $t03857738681._8 | |
1224 | + | let shareId = $t03857738681._9 | |
1225 | + | let bwAsset = $t03857738681._10 | |
1226 | + | let bwAmount = $t03857738681._11 | |
1189 | 1227 | if ((size(i.payments) != 1)) | |
1190 | 1228 | then throw("Wrong payment size") | |
1191 | 1229 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1192 | 1230 | then true | |
1193 | 1231 | else (i.payments[0].amount != bwAmount)) | |
1194 | 1232 | then throw("Wrong payment") | |
1195 | 1233 | else { | |
1196 | - | let $ | |
1234 | + | let $t03887138995 = if ((AId == bwAsset)) | |
1197 | 1235 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
1198 | 1236 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
1199 | - | let pmtAllA = $ | |
1200 | - | let pmtAllB = $ | |
1237 | + | let pmtAllA = $t03887138995._1 | |
1238 | + | let pmtAllB = $t03887138995._2 | |
1201 | 1239 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1202 | - | let $ | |
1203 | - | let userStaked = $ | |
1204 | - | let axlyFee = $ | |
1240 | + | let $t03907739192 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1241 | + | let userStaked = $t03907739192._1 | |
1242 | + | let axlyFee = $t03907739192._2 | |
1205 | 1243 | let posNum = getNewUserPositionNumber(user) | |
1206 | 1244 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1207 | 1245 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1208 | - | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1246 | + | let $t03955239667 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1247 | + | let wAmountA = $t03955239667._1 | |
1248 | + | let wAmountB = $t03955239667._2 | |
1249 | + | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1209 | 1250 | } | |
1210 | 1251 | }) | |
1211 | 1252 | ||
1212 | 1253 | ||
1213 | 1254 | ||
1214 | 1255 | @Callable(i) | |
1215 | 1256 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), { | |
1216 | 1257 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1217 | 1258 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1218 | - | let $ | |
1219 | - | let AId = $ | |
1220 | - | let BId = $ | |
1221 | - | let balA = $ | |
1222 | - | let balB = $ | |
1223 | - | let shareId = $ | |
1259 | + | let $t04016140251 = getPoolData(Address(fromBase58String(pool)), pType) | |
1260 | + | let AId = $t04016140251._1 | |
1261 | + | let BId = $t04016140251._2 | |
1262 | + | let balA = $t04016140251._3 | |
1263 | + | let balB = $t04016140251._4 | |
1264 | + | let shareId = $t04016140251._5 | |
1224 | 1265 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1225 | 1266 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1226 | 1267 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1227 | 1268 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1228 | 1269 | if ((borrowAmount == 0)) | |
1229 | 1270 | then throw("You can't liquidate position without borrow") | |
1230 | 1271 | 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))] | |
1231 | 1272 | }) | |
1232 | 1273 | ||
1233 | 1274 | ||
1234 | 1275 | ||
1235 | 1276 | @Callable(i) | |
1236 | 1277 | func stopLoss (user,posId,pool,assetId) = valueOrElse(isAdminCall(i), { | |
1237 | 1278 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1238 | 1279 | if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))))) | |
1239 | 1280 | then throw("No entry") | |
1240 | 1281 | else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))) | |
1241 | 1282 | }) | |
1242 | 1283 | ||
1243 | 1284 | ||
1244 | 1285 | ||
1245 | 1286 | @Callable(i) | |
1246 | 1287 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), { | |
1247 | - | let $ | |
1288 | + | let $t04201442208 = if (claim) | |
1248 | 1289 | then claimFarmed(type, pool) | |
1249 | 1290 | else { | |
1250 | 1291 | let claimedAsset = if ((type == SF_POOL)) | |
1251 | 1292 | then SWOPID | |
1252 | 1293 | else WXID | |
1253 | 1294 | $Tuple2(amountToExchange, claimedAsset) | |
1254 | 1295 | } | |
1255 | - | let claimedAmount = $ | |
1256 | - | let claimedAsset = $ | |
1296 | + | let claimedAmount = $t04201442208._1 | |
1297 | + | let claimedAsset = $t04201442208._2 | |
1257 | 1298 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1258 | 1299 | let change = (claimedAmount - amountToExchange) | |
1259 | 1300 | let changeEntry = if ((change > 0)) | |
1260 | 1301 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1261 | 1302 | else nil | |
1262 | 1303 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1263 | 1304 | }) | |
1264 | 1305 | ||
1265 | 1306 | ||
1266 | 1307 | ||
1267 | 1308 | @Callable(i) | |
1268 | 1309 | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), { | |
1269 | - | let $ | |
1310 | + | let $t04289343087 = if (claim) | |
1270 | 1311 | then claimFarmed(type, pool) | |
1271 | 1312 | else { | |
1272 | 1313 | let claimedAsset = if ((type == SF_POOL)) | |
1273 | 1314 | then SWOPID | |
1274 | 1315 | else WXID | |
1275 | 1316 | $Tuple2(amountToExchange, claimedAsset) | |
1276 | 1317 | } | |
1277 | - | let claimedAmount = $ | |
1278 | - | let claimedAsset = $ | |
1318 | + | let claimedAmount = $t04289343087._1 | |
1319 | + | let claimedAsset = $t04289343087._2 | |
1279 | 1320 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1280 | 1321 | let change = (claimedAmount - amountToExchange) | |
1281 | 1322 | let changeEntry = if ((change > 0)) | |
1282 | 1323 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1283 | 1324 | else nil | |
1284 | 1325 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1285 | 1326 | }) | |
1286 | 1327 | ||
1287 | 1328 | ||
1288 | 1329 | ||
1289 | 1330 | @Callable(i) | |
1290 | 1331 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), { | |
1291 | - | let $ | |
1332 | + | let $t04383844032 = if (claim) | |
1292 | 1333 | then claimFarmed(type, pool) | |
1293 | 1334 | else { | |
1294 | 1335 | let claimedAsset = if ((type == SF_POOL)) | |
1295 | 1336 | then SWOPID | |
1296 | 1337 | else WXID | |
1297 | 1338 | $Tuple2(amountToExchange, claimedAsset) | |
1298 | 1339 | } | |
1299 | - | let claimedAmount = $ | |
1300 | - | let claimedAsset = $ | |
1340 | + | let claimedAmount = $t04383844032._1 | |
1341 | + | let claimedAsset = $t04383844032._2 | |
1301 | 1342 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1302 | 1343 | let change = (claimedAmount - amountToExchange) | |
1303 | 1344 | let changeEntry = if ((change > 0)) | |
1304 | 1345 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1305 | 1346 | else nil | |
1306 | 1347 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1307 | 1348 | }) | |
1308 | 1349 | ||
1309 | 1350 | ||
1310 | 1351 | ||
1311 | 1352 | @Callable(i) | |
1312 | 1353 | func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL)) | |
1313 | 1354 | then (type != WX_POOL) | |
1314 | 1355 | else false) | |
1315 | 1356 | then throw("Wrong type") | |
1316 | 1357 | else { | |
1317 | - | let $ | |
1318 | - | let aId = $ | |
1319 | - | let bId = $ | |
1320 | - | let aBal = $ | |
1321 | - | let bBal = $ | |
1322 | - | let shareId = $ | |
1358 | + | let $t04477344867 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1359 | + | let aId = $t04477344867._1 | |
1360 | + | let bId = $t04477344867._2 | |
1361 | + | let aBal = $t04477344867._3 | |
1362 | + | let bBal = $t04477344867._4 | |
1363 | + | let shareId = $t04477344867._5 | |
1323 | 1364 | [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)] | |
1324 | 1365 | }) | |
1325 | 1366 | ||
1326 | 1367 | ||
1327 | 1368 | @Verifier(tx) | |
1328 | 1369 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1329 | 1370 |
github/deemru/w8io/026f985 185.88 ms ◑