tx · 6RkZDoFQ1rj61B28VRiEuxGmqxVt82rWoeVHkzFF3gbz 3MzqQ3HKdkHmJmk9mDhAeAMxmK5D2ztdAe5: -0.04200000 Waves 2023.06.05 17:51 [2609517] smart account 3MzqQ3HKdkHmJmk9mDhAeAMxmK5D2ztdAe5 > SELF 0.00000000 Waves
{ "type": 13, "id": "6RkZDoFQ1rj61B28VRiEuxGmqxVt82rWoeVHkzFF3gbz", "fee": 4200000, "feeAssetId": null, "timestamp": 1685976746596, "version": 2, "chainId": 84, "sender": "3MzqQ3HKdkHmJmk9mDhAeAMxmK5D2ztdAe5", "senderPublicKey": "FEnkfXnQZkk1FmjhH6QZqyK2taN6ngnZBexevKxouLUM", "proofs": [ "5EdH8dMX2dUhnLyWFv6bpdteocki3NQNzdiPrLjEnDGuhjP33xBAcduXPLAeP2upUSU24f6RuE87NJbWNBU7tqRc", "T1p8vXVeDGRFrKt7faWc9EV8S7257Do7sakZCykWSpptvSHReX8uVrMwLCCK9ZwMsDwq1MaSmhX6spDxm2fsNDD" ], "script": "base64:BgJaCAISBgoEAhgREhIGCgQCGBESEgYKBAIYERISBgoEAhgREhIGCgQCGBESEgYKBAIYERISBgoEAhgREhIGCgQCGBESEgYKBAIYERISBgoEAhgREhIGCgQCGBESUwAHdmVyc2lvbgIFMS4wLjAACGtWZXJzaW9uAgd2ZXJzaW9uAAdrQWN0aXZlAgZhY3RpdmUAC2tEZXByZWNhdGVkAgtkZXByZWNhdGVkXwAJa0Fzc2V0SWRBAgpBX2Fzc2V0X2lkAAlrQXNzZXRJZEICCkJfYXNzZXRfaWQACWtCYWxhbmNlQQIPQV9hc3NldF9iYWxhbmNlAAlrQmFsYW5jZUICD0JfYXNzZXRfYmFsYW5jZQANa0JhbGFuY2VJbml0QQIMQV9hc3NldF9pbml0AA1rQmFsYW5jZUluaXRCAgxCX2Fzc2V0X2luaXQADWtTaGFyZUFzc2V0SWQCDnNoYXJlX2Fzc2V0X2lkABFrU2hhcmVBc3NldFN1cHBseQ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YWRtaW5QdWJLZXkzAAEAAAkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACBRNtdWx0aVNpZ25lZEJ5QWRtaW5z5LNBkg==", "height": 2609517, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9jcf6Udfuj74gJqeNQCJLNhypVavEnur9WSqF7T1CT1J Next: 5NnyLDUngfdezLgPNyWGUSU7JRfZphTrx8wFowKPcrbh Diff:
Old | New | Differences | |
---|---|---|---|
398 | 398 | ||
399 | 399 | ||
400 | 400 | @Callable(i) | |
401 | - | func calcLPReplanishDiffPropREADONLY (callerBytes,args) = { | |
402 | - | let $ | |
403 | - | let strAssetIdA = $ | |
404 | - | let strAssetIdB = $ | |
405 | - | let assetIdA = $ | |
406 | - | let assetIdB = $ | |
407 | - | let shareAssetId = $ | |
408 | - | let $ | |
409 | - | let balA = $ | |
410 | - | let balB = $ | |
411 | - | let accBalA = $ | |
412 | - | let accBalB = $ | |
413 | - | let lpSupply = $ | |
401 | + | func calcLPReplanishDiffPropREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
402 | + | let $t01385913949 = getPoolAssets(i.caller) | |
403 | + | let strAssetIdA = $t01385913949._1 | |
404 | + | let strAssetIdB = $t01385913949._2 | |
405 | + | let assetIdA = $t01385913949._3 | |
406 | + | let assetIdB = $t01385913949._4 | |
407 | + | let shareAssetId = $t01385913949._5 | |
408 | + | let $t01395414046 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
409 | + | let balA = $t01395414046._1 | |
410 | + | let balB = $t01395414046._2 | |
411 | + | let accBalA = $t01395414046._3 | |
412 | + | let accBalB = $t01395414046._4 | |
413 | + | let lpSupply = $t01395414046._5 | |
414 | 414 | let pmtA = parseIntValue(args[0]) | |
415 | 415 | let pmtB = parseIntValue(args[1]) | |
416 | 416 | let virtGetMinAmount = parseIntValue(args[2]) | |
417 | - | let $ | |
418 | - | let fee = $ | |
419 | - | let govFee = $ | |
420 | - | let teamFee = $ | |
421 | - | let $ | |
422 | - | let lp = $ | |
423 | - | let newBalanceA = $ | |
424 | - | let newBalanceB = $ | |
425 | - | let governanceReward = $ | |
426 | - | let tReward = $ | |
427 | - | let aId = $ | |
417 | + | let $t01418014247 = getFeeParams(i.caller, i.originCaller) | |
418 | + | let fee = $t01418014247._1 | |
419 | + | let govFee = $t01418014247._2 | |
420 | + | let teamFee = $t01418014247._3 | |
421 | + | let $t01425214438 = calcLPReplanishDiffProp(pmtA, pmtB, assetIdA, assetIdB, balA, balB, lpSupply, fee, govFee, teamFee, virtGetMinAmount) | |
422 | + | let lp = $t01425214438._1 | |
423 | + | let newBalanceA = $t01425214438._2 | |
424 | + | let newBalanceB = $t01425214438._3 | |
425 | + | let governanceReward = $t01425214438._4 | |
426 | + | let tReward = $t01425214438._5 | |
427 | + | let aId = $t01425214438._6 | |
428 | 428 | $Tuple2(nil, $Tuple6(lp, newBalanceA, newBalanceB, governanceReward, tReward, aId)) | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | ||
433 | 433 | @Callable(i) | |
434 | - | func withdrawREADONLY (callerBytes,args) = { | |
435 | - | let $ | |
436 | - | let strAssetIdA = $ | |
437 | - | let strAssetIdB = $ | |
438 | - | let assetIdA = $ | |
439 | - | let assetIdB = $ | |
440 | - | let shareAssetId = $ | |
441 | - | let $ | |
442 | - | let balanceA = $ | |
443 | - | let balanceB = $ | |
444 | - | let accountBalanceA = $ | |
445 | - | let accountBalanceB = $ | |
446 | - | let shareAssetSupply = $ | |
434 | + | func withdrawREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
435 | + | let $t01465314743 = getPoolAssets(i.caller) | |
436 | + | let strAssetIdA = $t01465314743._1 | |
437 | + | let strAssetIdB = $t01465314743._2 | |
438 | + | let assetIdA = $t01465314743._3 | |
439 | + | let assetIdB = $t01465314743._4 | |
440 | + | let shareAssetId = $t01465314743._5 | |
441 | + | let $t01474814872 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
442 | + | let balanceA = $t01474814872._1 | |
443 | + | let balanceB = $t01474814872._2 | |
444 | + | let accountBalanceA = $t01474814872._3 | |
445 | + | let accountBalanceB = $t01474814872._4 | |
446 | + | let shareAssetSupply = $t01474814872._5 | |
447 | 447 | let withdrawAmount = parseIntValue(args[0]) | |
448 | 448 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
449 | 449 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
455 | 455 | @Callable(i) | |
456 | 456 | func init (callerBytes,args,pAmounts,pAssetIds) = { | |
457 | 457 | let caller = Address(callerBytes) | |
458 | - | let $ | |
459 | - | let pmtAmountA = $ | |
460 | - | let pmtAssetIdA = $ | |
461 | - | let $ | |
462 | - | let pmtAmountB = $ | |
463 | - | let pmtAssetIdB = $ | |
458 | + | let $t01527815356 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
459 | + | let pmtAmountA = $t01527815356._1 | |
460 | + | let pmtAssetIdA = $t01527815356._2 | |
461 | + | let $t01536115439 = $Tuple2(pAmounts[1], parsePaymentAsset(pAssetIds[1])) | |
462 | + | let pmtAmountB = $t01536115439._1 | |
463 | + | let pmtAssetIdB = $t01536115439._2 | |
464 | 464 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
465 | 465 | then throw("Only admin can call this function") | |
466 | 466 | else if ((size(args) != 1)) | |
470 | 470 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
471 | 471 | then throw("Assets must be different") | |
472 | 472 | else { | |
473 | - | let $ | |
474 | - | let pmtStrAssetIdA = $ | |
475 | - | let pmtAssetNameA = $ | |
476 | - | let pmtDecimalsA = $ | |
477 | - | let $ | |
478 | - | let pmtStrAssetIdB = $ | |
479 | - | let pmtAssetNameB = $ | |
480 | - | let pmtDecimalsB = $ | |
473 | + | let $t01587415951 = getAssetInfo(pmtAssetIdA) | |
474 | + | let pmtStrAssetIdA = $t01587415951._1 | |
475 | + | let pmtAssetNameA = $t01587415951._2 | |
476 | + | let pmtDecimalsA = $t01587415951._3 | |
477 | + | let $t01596016037 = getAssetInfo(pmtAssetIdB) | |
478 | + | let pmtStrAssetIdB = $t01596016037._1 | |
479 | + | let pmtAssetNameB = $t01596016037._2 | |
480 | + | let pmtDecimalsB = $t01596016037._3 | |
481 | 481 | let firstHarvest = (args[0] == "true") | |
482 | 482 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
483 | 483 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
514 | 514 | @Callable(i) | |
515 | 515 | func initWithInitRatio (callerBytes,args,pAmounts,pAssetIds) = { | |
516 | 516 | let caller = Address(callerBytes) | |
517 | - | let $ | |
518 | - | let amtAssetA = $ | |
519 | - | let amtAssetB = $ | |
520 | - | let assetIdAStr = $ | |
521 | - | let assetIdBStr = $ | |
522 | - | let firstHarvest = $ | |
517 | + | let $t01825818458 = $Tuple5(parseIntValue(args[0]), parseIntValue(args[1]), args[2], args[3], (args[4] == "true")) | |
518 | + | let amtAssetA = $t01825818458._1 | |
519 | + | let amtAssetB = $t01825818458._2 | |
520 | + | let assetIdAStr = $t01825818458._3 | |
521 | + | let assetIdBStr = $t01825818458._4 | |
522 | + | let firstHarvest = $t01825818458._5 | |
523 | 523 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
524 | 524 | then throw("Only admin can call this function") | |
525 | 525 | else if ((size(args) != 5)) | |
529 | 529 | else if ((assetIdAStr == assetIdBStr)) | |
530 | 530 | then throw("Assets must be different") | |
531 | 531 | else { | |
532 | - | let $ | |
533 | - | let pmtStrAssetIdA = $ | |
534 | - | let pmtAssetNameA = $ | |
535 | - | let pmtDecimalsA = $ | |
536 | - | let $ | |
537 | - | let pmtStrAssetIdB = $ | |
538 | - | let pmtAssetNameB = $ | |
539 | - | let pmtDecimalsB = $ | |
532 | + | let $t01889318970 = getAssetInfo(assetIdAStr) | |
533 | + | let pmtStrAssetIdA = $t01889318970._1 | |
534 | + | let pmtAssetNameA = $t01889318970._2 | |
535 | + | let pmtDecimalsA = $t01889318970._3 | |
536 | + | let $t01897919056 = getAssetInfo(assetIdBStr) | |
537 | + | let pmtStrAssetIdB = $t01897919056._1 | |
538 | + | let pmtAssetNameB = $t01897919056._2 | |
539 | + | let pmtDecimalsB = $t01897919056._3 | |
540 | 540 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
541 | 541 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
542 | 542 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
567 | 567 | @Callable(i) | |
568 | 568 | func exchange (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
569 | 569 | let caller = Address(callerBytes) | |
570 | - | let $ | |
571 | - | let pmtAmount = $ | |
572 | - | let pmtAssetId = $ | |
570 | + | let $t02148221558 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
571 | + | let pmtAmount = $t02148221558._1 | |
572 | + | let pmtAssetId = $t02148221558._2 | |
573 | 573 | let minAmountToReceive = parseIntValue(args[0]) | |
574 | - | let $ | |
575 | - | let strAssetIdA = $ | |
576 | - | let strAssetIdB = $ | |
577 | - | let assetIdA = $ | |
578 | - | let assetIdB = $ | |
579 | - | let $ | |
580 | - | let balanceA = $ | |
581 | - | let balanceB = $ | |
582 | - | let accountBalanceA = $ | |
583 | - | let accountBalanceB = $ | |
574 | + | let $t02162321699 = getPoolAssets(i.caller) | |
575 | + | let strAssetIdA = $t02162321699._1 | |
576 | + | let strAssetIdB = $t02162321699._2 | |
577 | + | let assetIdA = $t02162321699._3 | |
578 | + | let assetIdB = $t02162321699._4 | |
579 | + | let $t02170821814 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
580 | + | let balanceA = $t02170821814._1 | |
581 | + | let balanceB = $t02170821814._2 | |
582 | + | let accountBalanceA = $t02170821814._3 | |
583 | + | let accountBalanceB = $t02170821814._4 | |
584 | 584 | if ((size(args) != 1)) | |
585 | 585 | then throw("Wrong args size") | |
586 | 586 | else if (if ((balanceA == 0)) | |
598 | 598 | else (balanceB > accountBalanceB)) | |
599 | 599 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
600 | 600 | else { | |
601 | - | let $ | |
602 | - | let fee = $ | |
603 | - | let govFee = $ | |
604 | - | let teamFee = $ | |
605 | - | let $ | |
601 | + | let $t02271422781 = getFeeParams(i.caller, i.originCaller) | |
602 | + | let fee = $t02271422781._1 | |
603 | + | let govFee = $t02271422781._2 | |
604 | + | let teamFee = $t02271422781._3 | |
605 | + | let $t02279423145 = if ((pmtAssetId == assetIdA)) | |
606 | 606 | then calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB, fee, govFee, teamFee) | |
607 | 607 | else calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA, fee, govFee, teamFee) | |
608 | - | let amountWithoutFee = $ | |
609 | - | let amountWithFee = $ | |
610 | - | let governanceReward = $ | |
611 | - | let teamReward = $ | |
612 | - | let $ | |
608 | + | let amountWithoutFee = $t02279423145._1 | |
609 | + | let amountWithFee = $t02279423145._2 | |
610 | + | let governanceReward = $t02279423145._3 | |
611 | + | let teamReward = $t02279423145._4 | |
612 | + | let $t02315923494 = if ((pmtAssetId == assetIdA)) | |
613 | 613 | then $Tuple3((balanceA + pmtAmount), (((balanceB - amountWithFee) - governanceReward) - teamReward), assetIdB) | |
614 | 614 | else $Tuple3((((balanceA - amountWithFee) - governanceReward) - teamReward), (balanceB + pmtAmount), assetIdA) | |
615 | - | let newBalanceA = $ | |
616 | - | let newBalanceB = $ | |
617 | - | let assetIdSend = $ | |
618 | - | let $ | |
615 | + | let newBalanceA = $t02315923494._1 | |
616 | + | let newBalanceB = $t02315923494._2 | |
617 | + | let assetIdSend = $t02315923494._3 | |
618 | + | let $t02350823768 = if ((pmtAssetId == assetIdA)) | |
619 | 619 | then $Tuple2(pmtAmount, ((amountWithFee + governanceReward) + teamReward)) | |
620 | 620 | else $Tuple2(((amountWithFee + governanceReward) + teamReward), pmtAmount) | |
621 | - | let stakeAmountA = $ | |
622 | - | let stakeAmountB = $ | |
621 | + | let stakeAmountA = $t02350823768._1 | |
622 | + | let stakeAmountB = $t02350823768._2 | |
623 | 623 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
624 | 624 | then invoke(i.caller, "stakeUnstake", [(pmtAssetId == assetIdA), stakeAmountA, strAssetIdA], nil) | |
625 | 625 | else 0 | |
645 | 645 | let pmtAssetIdB = parsePaymentAsset(pAssetIds[1]) | |
646 | 646 | let stakeFarming = (args[0] == "true") | |
647 | 647 | let lockType = parseIntValue(args[1]) | |
648 | - | let $ | |
649 | - | let strAssetIdA = $ | |
650 | - | let strAssetIdB = $ | |
651 | - | let assetIdA = $ | |
652 | - | let assetIdB = $ | |
653 | - | let shareAssetId = $ | |
654 | - | let $ | |
655 | - | let balanceA = $ | |
656 | - | let balanceB = $ | |
657 | - | let accountBalanceA = $ | |
658 | - | let accountBalanceB = $ | |
659 | - | let shareAssetSupply = $ | |
648 | + | let $t02508325173 = getPoolAssets(i.caller) | |
649 | + | let strAssetIdA = $t02508325173._1 | |
650 | + | let strAssetIdB = $t02508325173._2 | |
651 | + | let assetIdA = $t02508325173._3 | |
652 | + | let assetIdB = $t02508325173._4 | |
653 | + | let shareAssetId = $t02508325173._5 | |
654 | + | let $t02518225306 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
655 | + | let balanceA = $t02518225306._1 | |
656 | + | let balanceB = $t02518225306._2 | |
657 | + | let accountBalanceA = $t02518225306._3 | |
658 | + | let accountBalanceB = $t02518225306._4 | |
659 | + | let shareAssetSupply = $t02518225306._5 | |
660 | 660 | if ((size(args) != 2)) | |
661 | 661 | then throw("Wrong args size") | |
662 | 662 | else if (if ((size(pAmounts) != 2)) | |
676 | 676 | else pAssetIds[2], pAmounts[2])] | |
677 | 677 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
678 | 678 | else { | |
679 | - | let $ | |
680 | - | let shareTokenToPayAmount = $ | |
681 | - | let change = $ | |
682 | - | let changeAssetId = $ | |
683 | - | let pmtAmountA = $ | |
684 | - | let pmtAmountB = $ | |
679 | + | let $t02624326441 = calcLPAmountReplansishTwoTokens(pAmounts[0], pAmounts[1], pmtAssetIdA, pmtAssetIdB, balanceA, balanceB, shareAssetSupply) | |
680 | + | let shareTokenToPayAmount = $t02624326441._1 | |
681 | + | let change = $t02624326441._2 | |
682 | + | let changeAssetId = $t02624326441._3 | |
683 | + | let pmtAmountA = $t02624326441._4 | |
684 | + | let pmtAmountB = $t02624326441._5 | |
685 | 685 | if ((shareTokenToPayAmount == 0)) | |
686 | 686 | then throw("Too small amount to replenish") | |
687 | 687 | else if ((0 > change)) | |
734 | 734 | let virtGetMinAmount = parseIntValue(args[0]) | |
735 | 735 | let stakeFarming = (args[1] == "true") | |
736 | 736 | let lockType = parseIntValue(args[2]) | |
737 | - | let $ | |
738 | - | let strAssetIdA = $ | |
739 | - | let strAssetIdB = $ | |
740 | - | let assetIdA = $ | |
741 | - | let assetIdB = $ | |
742 | - | let shareAssetId = $ | |
743 | - | let $ | |
744 | - | let balanceA = $ | |
745 | - | let balanceB = $ | |
746 | - | let accountBalanceA = $ | |
747 | - | let accountBalanceB = $ | |
748 | - | let shareAssetSupply = $ | |
737 | + | let $t02870028790 = getPoolAssets(i.caller) | |
738 | + | let strAssetIdA = $t02870028790._1 | |
739 | + | let strAssetIdB = $t02870028790._2 | |
740 | + | let assetIdA = $t02870028790._3 | |
741 | + | let assetIdB = $t02870028790._4 | |
742 | + | let shareAssetId = $t02870028790._5 | |
743 | + | let $t02879528919 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
744 | + | let balanceA = $t02879528919._1 | |
745 | + | let balanceB = $t02879528919._2 | |
746 | + | let accountBalanceA = $t02879528919._3 | |
747 | + | let accountBalanceB = $t02879528919._4 | |
748 | + | let shareAssetSupply = $t02879528919._5 | |
749 | 749 | let initial = ((balanceA + balanceB) == 0) | |
750 | 750 | if ((size(args) != 3)) | |
751 | 751 | then throw("Wrong args size") | |
768 | 768 | else pAssetIds[2], pAmounts[2])] | |
769 | 769 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
770 | 770 | else { | |
771 | - | let $ | |
772 | - | let fee = $ | |
773 | - | let govFee = $ | |
774 | - | let teamFee = $ | |
775 | - | let $ | |
776 | - | let pmtAssetIdStr = $ | |
777 | - | let pmtAssetIdName = $ | |
778 | - | let $ | |
779 | - | let shareTokenToPayAmount = $ | |
780 | - | let newBalanceA = $ | |
781 | - | let newBalanceB = $ | |
782 | - | let govReward = $ | |
783 | - | let teamReward = $ | |
784 | - | let govRewardAsset = $ | |
771 | + | let $t02983129898 = getFeeParams(i.caller, i.originCaller) | |
772 | + | let fee = $t02983129898._1 | |
773 | + | let govFee = $t02983129898._2 | |
774 | + | let teamFee = $t02983129898._3 | |
775 | + | let $t02990729969 = getAssetInfo(pmtAssetId) | |
776 | + | let pmtAssetIdStr = $t02990729969._1 | |
777 | + | let pmtAssetIdName = $t02990729969._2 | |
778 | + | let $t02998730233 = calcLPAmountReplansishOneToken(pmtAmount, pmtAssetId, assetIdA, assetIdB, balanceA, balanceB, shareAssetSupply, fee, govFee, teamFee, virtGetMinAmount) | |
779 | + | let shareTokenToPayAmount = $t02998730233._1 | |
780 | + | let newBalanceA = $t02998730233._2 | |
781 | + | let newBalanceB = $t02998730233._3 | |
782 | + | let govReward = $t02998730233._4 | |
783 | + | let teamReward = $t02998730233._5 | |
784 | + | let govRewardAsset = $t02998730233._6 | |
785 | 785 | let govRewardAssetStr = if ((govRewardAsset == assetIdA)) | |
786 | 786 | then strAssetIdA | |
787 | 787 | else strAssetIdB | |
830 | 830 | @Callable(i) | |
831 | 831 | func withdraw (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
832 | 832 | let caller = Address(callerBytes) | |
833 | - | let $ | |
834 | - | let strAssetIdA = $ | |
835 | - | let strAssetIdB = $ | |
836 | - | let assetIdA = $ | |
837 | - | let assetIdB = $ | |
838 | - | let shareAssetId = $ | |
839 | - | let $ | |
840 | - | let balanceA = $ | |
841 | - | let balanceB = $ | |
842 | - | let accountBalanceA = $ | |
843 | - | let accountBalanceB = $ | |
844 | - | let shareAssetSupply = $ | |
845 | - | let $ | |
833 | + | let $t03230132391 = getPoolAssets(i.caller) | |
834 | + | let strAssetIdA = $t03230132391._1 | |
835 | + | let strAssetIdB = $t03230132391._2 | |
836 | + | let assetIdA = $t03230132391._3 | |
837 | + | let assetIdB = $t03230132391._4 | |
838 | + | let shareAssetId = $t03230132391._5 | |
839 | + | let $t03240032524 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
840 | + | let balanceA = $t03240032524._1 | |
841 | + | let balanceB = $t03240032524._2 | |
842 | + | let accountBalanceA = $t03240032524._3 | |
843 | + | let accountBalanceB = $t03240032524._4 | |
844 | + | let shareAssetSupply = $t03240032524._5 | |
845 | + | let $t03253332913 = if ((size(pAmounts) == 1)) | |
846 | 846 | then { | |
847 | 847 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
848 | 848 | if ((pAsset != shareAssetId)) | |
850 | 850 | else $Tuple2(pAmounts[0], pAsset) | |
851 | 851 | } | |
852 | 852 | else $Tuple2(0, shareAssetId) | |
853 | - | let pmtAmount = $ | |
854 | - | let pmtAssetId = $ | |
853 | + | let pmtAmount = $t03253332913._1 | |
854 | + | let pmtAssetId = $t03253332913._2 | |
855 | 855 | if ((size(args) != 1)) | |
856 | 856 | then throw("Wrong args size") | |
857 | 857 | else if ((size(pAmounts) > 1)) | |
896 | 896 | let withdrawAsset = if ((args[0] == "")) | |
897 | 897 | then unit | |
898 | 898 | else fromBase58String(args[0]) | |
899 | - | let $ | |
900 | - | let strAssetIdA = $ | |
901 | - | let strAssetIdB = $ | |
902 | - | let assetIdA = $ | |
903 | - | let assetIdB = $ | |
904 | - | let shareAssetId = $ | |
905 | - | let $ | |
906 | - | let balanceA = $ | |
907 | - | let balanceB = $ | |
908 | - | let accountBalanceA = $ | |
909 | - | let accountBalanceB = $ | |
910 | - | let shareAssetSupply = $ | |
911 | - | let $ | |
899 | + | let $t03513135221 = getPoolAssets(i.caller) | |
900 | + | let strAssetIdA = $t03513135221._1 | |
901 | + | let strAssetIdB = $t03513135221._2 | |
902 | + | let assetIdA = $t03513135221._3 | |
903 | + | let assetIdB = $t03513135221._4 | |
904 | + | let shareAssetId = $t03513135221._5 | |
905 | + | let $t03523035354 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
906 | + | let balanceA = $t03523035354._1 | |
907 | + | let balanceB = $t03523035354._2 | |
908 | + | let accountBalanceA = $t03523035354._3 | |
909 | + | let accountBalanceB = $t03523035354._4 | |
910 | + | let shareAssetSupply = $t03523035354._5 | |
911 | + | let $t03536335715 = if ((size(pAmounts) == 1)) | |
912 | 912 | then { | |
913 | 913 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
914 | 914 | if ((pAsset != shareAssetId)) | |
916 | 916 | else $Tuple2(pAmounts[0], pAsset) | |
917 | 917 | } | |
918 | 918 | else $Tuple2(0, shareAssetId) | |
919 | - | let pmtAmount = $ | |
920 | - | let pmtAssetId = $ | |
919 | + | let pmtAmount = $t03536335715._1 | |
920 | + | let pmtAssetId = $t03536335715._2 | |
921 | 921 | let virtMinToRecive = parseIntValue(args[1]) | |
922 | 922 | if ((size(args) != 3)) | |
923 | 923 | then throw("Wrong args size") | |
941 | 941 | let withdrawAmount = (pmtAmount + unlockAmount) | |
942 | 942 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
943 | 943 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
944 | - | let $ | |
945 | - | let fee = $ | |
946 | - | let govFee = $ | |
947 | - | let teamFee = $ | |
948 | - | let $ | |
944 | + | let $t03698237049 = getFeeParams(i.caller, i.originCaller) | |
945 | + | let fee = $t03698237049._1 | |
946 | + | let govFee = $t03698237049._2 | |
947 | + | let teamFee = $t03698237049._3 | |
948 | + | let $t03706237476 = if ((withdrawAsset == assetIdA)) | |
949 | 949 | then calculateFees(amountToPayB, virtMinToRecive, (balanceB - amountToPayB), (balanceA - amountToPayA), fee, govFee, teamFee) | |
950 | 950 | else calculateFees(amountToPayA, virtMinToRecive, (balanceA - amountToPayA), (balanceB - amountToPayB), fee, govFee, teamFee) | |
951 | - | let amountWithoutFee = $ | |
952 | - | let amountWithFee = $ | |
953 | - | let governanceReward = $ | |
954 | - | let teamReward = $ | |
955 | - | let $ | |
951 | + | let amountWithoutFee = $t03706237476._1 | |
952 | + | let amountWithFee = $t03706237476._2 | |
953 | + | let governanceReward = $t03706237476._3 | |
954 | + | let teamReward = $t03706237476._4 | |
955 | + | let $t03748938799 = if ((withdrawAsset == assetIdA)) | |
956 | 956 | then { | |
957 | 957 | let unstake = if (contains(stakingAssets, strAssetIdA)) | |
958 | 958 | then invoke(i.caller, "stakeUnstake", [false, (((amountToPayA + amountWithFee) + governanceReward) + teamReward), strAssetIdA], nil) | |
969 | 969 | then $Tuple4(balanceA, ((((balanceB - amountToPayB) - amountWithFee) - governanceReward) - teamReward), assetIdB, [ScriptTransfer(caller, (amountToPayB + amountWithFee), assetIdB)]) | |
970 | 970 | else throw("Strict value is not equal to itself.") | |
971 | 971 | } | |
972 | - | let newBalanceA = $ | |
973 | - | let newBalanceB = $ | |
974 | - | let govRewardAssetId = $ | |
975 | - | let userTransfer = $ | |
972 | + | let newBalanceA = $t03748938799._1 | |
973 | + | let newBalanceB = $t03748938799._2 | |
974 | + | let govRewardAssetId = $t03748938799._3 | |
975 | + | let userTransfer = $t03748938799._4 | |
976 | 976 | $Tuple2([ScriptTransfer(i.caller, unlockAmount, shareAssetId)], $Tuple2(([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceReward, govRewardAssetId), ScriptTransfer(teamBoxAddress, teamReward, govRewardAssetId)] ++ userTransfer), nil)) | |
977 | 977 | } | |
978 | 978 | else throw("Strict value is not equal to itself.") | |
983 | 983 | ||
984 | 984 | @Callable(i) | |
985 | 985 | func takeIntoAccountExtraFunds (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
986 | - | let $ | |
987 | - | let strAssetIdA = $ | |
988 | - | let strAssetIdB = $ | |
989 | - | let assetIdA = $ | |
990 | - | let assetIdB = $ | |
986 | + | let $t03955939635 = getPoolAssets(i.caller) | |
987 | + | let strAssetIdA = $t03955939635._1 | |
988 | + | let strAssetIdB = $t03955939635._2 | |
989 | + | let assetIdA = $t03955939635._3 | |
990 | + | let assetIdB = $t03955939635._4 | |
991 | 991 | let claim = if (if ((assetIdA == USDN)) | |
992 | 992 | then true | |
993 | 993 | else (assetIdB == USDN)) | |
995 | 995 | else 0 | |
996 | 996 | if ((claim == claim)) | |
997 | 997 | then { | |
998 | - | let $ | |
999 | - | let balanceA = $ | |
1000 | - | let balanceB = $ | |
1001 | - | let accountBalanceA = $ | |
1002 | - | let accountBalanceB = $ | |
998 | + | let $t03979539901 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
999 | + | let balanceA = $t03979539901._1 | |
1000 | + | let balanceB = $t03979539901._2 | |
1001 | + | let accountBalanceA = $t03979539901._3 | |
1002 | + | let accountBalanceB = $t03979539901._4 | |
1003 | 1003 | let amountEnrollA = (accountBalanceA - balanceA) | |
1004 | 1004 | let amountEnrollB = (accountBalanceB - balanceB) | |
1005 | 1005 | if ((size(args) != 0)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "1.0.0" | |
5 | 5 | ||
6 | 6 | let kVersion = "version" | |
7 | 7 | ||
8 | 8 | let kActive = "active" | |
9 | 9 | ||
10 | 10 | let kDeprecated = "deprecated_" | |
11 | 11 | ||
12 | 12 | let kAssetIdA = "A_asset_id" | |
13 | 13 | ||
14 | 14 | let kAssetIdB = "B_asset_id" | |
15 | 15 | ||
16 | 16 | let kBalanceA = "A_asset_balance" | |
17 | 17 | ||
18 | 18 | let kBalanceB = "B_asset_balance" | |
19 | 19 | ||
20 | 20 | let kBalanceInitA = "A_asset_init" | |
21 | 21 | ||
22 | 22 | let kBalanceInitB = "B_asset_init" | |
23 | 23 | ||
24 | 24 | let kShareAssetId = "share_asset_id" | |
25 | 25 | ||
26 | 26 | let kShareAssetSupply = "share_asset_supply" | |
27 | 27 | ||
28 | 28 | let kFee = "commission" | |
29 | 29 | ||
30 | 30 | let kCause = "shutdown_cause" | |
31 | 31 | ||
32 | 32 | let kFirstHarvest = "first_harvest" | |
33 | 33 | ||
34 | 34 | let kFirstHarvestHeight = "first_harvest_height" | |
35 | 35 | ||
36 | 36 | let kShareLimit = "share_limit_on_first_harvest" | |
37 | 37 | ||
38 | 38 | let kBasePeriod = "base_period" | |
39 | 39 | ||
40 | 40 | let kPeriodLength = "period_length" | |
41 | 41 | ||
42 | 42 | let kStartHeight = "start_height" | |
43 | 43 | ||
44 | 44 | let kUSDNAddress = "staking_usdnnsbt_address" | |
45 | 45 | ||
46 | 46 | let kEURNAddress = "staking_eurn_address" | |
47 | 47 | ||
48 | 48 | let kLeasingAmount = "leasing_amount" | |
49 | 49 | ||
50 | 50 | let kUSDNAssetId = "usdn_asset_id" | |
51 | 51 | ||
52 | 52 | let kEURNAssetId = "eurn_asset_id" | |
53 | 53 | ||
54 | 54 | let kStakingAssets = "staking_assets" | |
55 | 55 | ||
56 | 56 | let kOracleActive = "active_all_contracts" | |
57 | 57 | ||
58 | 58 | let kDiscounts = "discounts" | |
59 | 59 | ||
60 | 60 | let kDiscountValues = "discount_values" | |
61 | 61 | ||
62 | 62 | let kUserGSwopInGov = "_GSwop_amount" | |
63 | 63 | ||
64 | 64 | let kUserSwopInGov = "_SWOP_amount" | |
65 | 65 | ||
66 | 66 | let kOraclePool = "pool_" | |
67 | 67 | ||
68 | 68 | let kAdminPubKey1 = "admin_pub_1" | |
69 | 69 | ||
70 | 70 | let kAdminPubKey2 = "admin_pub_2" | |
71 | 71 | ||
72 | 72 | let kAdminPubKey3 = "admin_pub_3" | |
73 | 73 | ||
74 | 74 | let kAdminInvokePubKey = "admin_invoke_pub" | |
75 | 75 | ||
76 | 76 | let kMoneyBoxAddress = "money_box_address" | |
77 | 77 | ||
78 | 78 | let kTeamBoxAddress = "team_box_address" | |
79 | 79 | ||
80 | 80 | let kVotingAddress = "voting_address" | |
81 | 81 | ||
82 | 82 | let kGovAddress = "governance_address" | |
83 | 83 | ||
84 | 84 | let kFarmingAddress = "farming_address" | |
85 | 85 | ||
86 | 86 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
87 | 87 | ||
88 | 88 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
89 | 89 | case string: String => | |
90 | 90 | fromBase58String(string) | |
91 | 91 | case nothing => | |
92 | 92 | throw((key + "is empty")) | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
97 | 97 | ||
98 | 98 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
99 | 99 | ||
100 | 100 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
101 | 101 | ||
102 | 102 | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
103 | 103 | ||
104 | 104 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
105 | 105 | ||
106 | 106 | let teamBoxAddress = Address(getBase58FromOracle(kTeamBoxAddress)) | |
107 | 107 | ||
108 | 108 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
109 | 109 | ||
110 | 110 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
111 | 111 | ||
112 | 112 | let farmingAddress = Address(getBase58FromOracle(kFarmingAddress)) | |
113 | 113 | ||
114 | 114 | let USDN = getBase58FromOracle(kUSDNAssetId) | |
115 | 115 | ||
116 | 116 | let EURN = getBase58FromOracle(kEURNAssetId) | |
117 | 117 | ||
118 | 118 | let stakingAssets = getStringValue(oracle, kStakingAssets) | |
119 | 119 | ||
120 | 120 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
121 | 121 | ||
122 | 122 | let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress)) | |
123 | 123 | ||
124 | 124 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
125 | 125 | ||
126 | 126 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
127 | 127 | ||
128 | 128 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
129 | 129 | ||
130 | 130 | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
131 | 131 | ||
132 | 132 | let active = getBooleanValue(oracle, kOracleActive) | |
133 | 133 | ||
134 | 134 | let feeScale6 = 1000000 | |
135 | 135 | ||
136 | 136 | let scale8 = 100000000 | |
137 | 137 | ||
138 | 138 | let scale16 = toBigInt(10000000000000000) | |
139 | 139 | ||
140 | 140 | func accountBalance (assetId,pool) = match assetId { | |
141 | 141 | case id: ByteVector => | |
142 | 142 | assetBalance(pool, id) | |
143 | 143 | case waves: Unit => | |
144 | 144 | wavesBalance(pool).available | |
145 | 145 | case _ => | |
146 | 146 | throw("Match error") | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func stakedAmount (assetId,pool) = { | |
151 | 151 | let stakedAmountCalculated = match assetId { | |
152 | 152 | case aId: ByteVector => | |
153 | 153 | if ((aId == USDN)) | |
154 | 154 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(pool))) | |
155 | 155 | else if ((aId == EURN)) | |
156 | 156 | then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(pool))) | |
157 | 157 | else 0 | |
158 | 158 | case _: Unit => | |
159 | 159 | valueOrElse(getInteger(pool, kLeasingAmount), 0) | |
160 | 160 | case _ => | |
161 | 161 | throw("Match error") | |
162 | 162 | } | |
163 | 163 | match stakedAmountCalculated { | |
164 | 164 | case i: Int => | |
165 | 165 | i | |
166 | 166 | case _ => | |
167 | 167 | 0 | |
168 | 168 | } | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func getAssetInfo (assetId) = match assetId { | |
173 | 173 | case id: String|ByteVector => | |
174 | 174 | let $t040794251 = match id { | |
175 | 175 | case aId: ByteVector => | |
176 | 176 | $Tuple2(toBase58String(aId), aId) | |
177 | 177 | case aId: String => | |
178 | 178 | $Tuple2(aId, fromBase58String(aId)) | |
179 | 179 | case _ => | |
180 | 180 | throw("Match error") | |
181 | 181 | } | |
182 | 182 | let stringId = $t040794251._1 | |
183 | 183 | let bytesId = $t040794251._2 | |
184 | 184 | let info = valueOrErrorMessage(assetInfo(bytesId), (("Asset " + stringId) + " doesn't exist")) | |
185 | 185 | $Tuple3(stringId, info.name, info.decimals) | |
186 | 186 | case waves: Unit => | |
187 | 187 | $Tuple3("WAVES", "WAVES", 8) | |
188 | 188 | case _ => | |
189 | 189 | throw("Match error") | |
190 | 190 | } | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func calculateFeeDiscount (userAddr) = { | |
197 | 197 | let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0) | |
198 | 198 | let gSwopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserGSwopInGov)), swopAmount) | |
199 | 199 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
200 | 200 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
201 | 201 | if (if ((gSwopAmount >= parseIntValue(discountValues[0]))) | |
202 | 202 | then (parseIntValue(discountValues[1]) > gSwopAmount) | |
203 | 203 | else false) | |
204 | 204 | then (feeScale6 - parseIntValue(discounts[0])) | |
205 | 205 | else if (if ((gSwopAmount >= parseIntValue(discountValues[1]))) | |
206 | 206 | then (parseIntValue(discountValues[2]) > gSwopAmount) | |
207 | 207 | else false) | |
208 | 208 | then (feeScale6 - parseIntValue(discounts[1])) | |
209 | 209 | else if (if ((gSwopAmount >= parseIntValue(discountValues[2]))) | |
210 | 210 | then (parseIntValue(discountValues[3]) > gSwopAmount) | |
211 | 211 | else false) | |
212 | 212 | then (feeScale6 - parseIntValue(discounts[2])) | |
213 | 213 | else if (if ((gSwopAmount >= parseIntValue(discountValues[3]))) | |
214 | 214 | then (parseIntValue(discountValues[4]) > gSwopAmount) | |
215 | 215 | else false) | |
216 | 216 | then (feeScale6 - parseIntValue(discounts[3])) | |
217 | 217 | else if ((gSwopAmount >= parseIntValue(discountValues[4]))) | |
218 | 218 | then (feeScale6 - parseIntValue(discounts[4])) | |
219 | 219 | else feeScale6 | |
220 | 220 | } | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo,fee,feeGov,feeTeam) = { | |
224 | 224 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
225 | 225 | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fee), feeScale6) | |
226 | 226 | let governanceReward = fraction(amountWithoutFee, feeGov, feeScale6) | |
227 | 227 | let teamReward = fraction(amountWithoutFee, feeTeam, feeScale6) | |
228 | 228 | if ((minAmountToReceive > amountWithFee)) | |
229 | 229 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
230 | 230 | else $Tuple4(amountWithoutFee, amountWithFee, governanceReward, teamReward) | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func calculateVirtPay (pmtAmount,balance,fee) = { | |
235 | 235 | let F = (feeScale6 - fee) | |
236 | 236 | let k = fraction(fee, 55, 100) | |
237 | 237 | let a = (scale8 + fraction((F * k), scale8, (feeScale6 * feeScale6))) | |
238 | 238 | let b = ((((balance + fraction(balance, F, feeScale6)) + fraction(pmtAmount, F, feeScale6)) - pmtAmount) - fraction(pmtAmount, (F * k), (feeScale6 * feeScale6))) | |
239 | 239 | let c = (-(toBigInt(balance)) * toBigInt(pmtAmount)) | |
240 | 240 | let D = ((toBigInt(b) * toBigInt(b)) - fraction((toBigInt(4) * c), toBigInt(a), toBigInt(scale8))) | |
241 | 241 | toInt(fraction((-(toBigInt(b)) + sqrtBigInt(D, 0, 0, DOWN)), toBigInt(scale8), toBigInt((2 * a)))) | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func parsePaymentAsset (assetId) = if ((assetId == base58'')) | |
246 | 246 | then unit | |
247 | 247 | else assetId | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func suspendSuspicious (accountBalanceA,accountBalanceB,balanceA,balanceB,assetIdA,assetIdB) = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceA)) + " ") + assetIdA) + ", ") + toString(accountBalanceB)) + " ") + assetIdB) + ". State: ") + toString(balanceA)) + " ") + assetIdA) + ", ") + toString(balanceB)) + " ") + assetIdB)) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func isActive () = if (active) | |
254 | 254 | then unit | |
255 | 255 | else throw("DApp is inactive at this moment") | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func isOraclePool (poolAddress) = if (isDefined(getString(oracle, (kOraclePool + poolAddress)))) | |
259 | 259 | then unit | |
260 | 260 | else throw("DApp is not registered pool") | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | func isDepricated (poolAddress) = if (!(valueOrElse(getBoolean(oracle, (kDeprecated + poolAddress)), false))) | |
264 | 264 | then unit | |
265 | 265 | else throw("Pool is deprecated. Only withdraw action allowed.") | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func getPoolBalances (pool,assetIdA,assetIdB) = { | |
269 | 269 | let balanceA = getIntegerValue(pool, kBalanceA) | |
270 | 270 | let balanceB = getIntegerValue(pool, kBalanceB) | |
271 | 271 | let stakedAmountA = stakedAmount(assetIdA, pool) | |
272 | 272 | let stakedAmountB = stakedAmount(assetIdB, pool) | |
273 | 273 | let accountBalanceA = (accountBalance(assetIdA, pool) + stakedAmountA) | |
274 | 274 | let accountBalanceB = (accountBalance(assetIdB, pool) + stakedAmountB) | |
275 | 275 | let shareSupply = getIntegerValue(pool, kShareAssetSupply) | |
276 | 276 | $Tuple5(balanceA, balanceB, accountBalanceA, accountBalanceB, shareSupply) | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func getPoolAssets (pool) = { | |
281 | 281 | let strAssetIdA = getStringValue(pool, kAssetIdA) | |
282 | 282 | let strAssetIdB = getStringValue(pool, kAssetIdB) | |
283 | 283 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
284 | 284 | then unit | |
285 | 285 | else fromBase58String(strAssetIdA) | |
286 | 286 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
287 | 287 | then unit | |
288 | 288 | else fromBase58String(strAssetIdB) | |
289 | 289 | let shareAssetId = fromBase58String(getStringValue(pool, kShareAssetId)) | |
290 | 290 | $Tuple5(strAssetIdA, strAssetIdB, assetIdA, assetIdB, shareAssetId) | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func getFeeParams (pool,caller) = { | |
295 | 295 | let feeDiscount = calculateFeeDiscount(caller) | |
296 | 296 | let fee = fraction(getIntegerValue(pool, kFee), feeDiscount, feeScale6, CEILING) | |
297 | 297 | let govFee = fraction(fee, 35, 100) | |
298 | 298 | let teamFee = fraction(fee, 10, 100) | |
299 | 299 | $Tuple3(fee, govFee, teamFee) | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func calcLPAmountReplansishTwoTokens (pmtA,pmtB,pmtIdA,pmtIdB,balA,balB,shareAssetSupply) = { | |
304 | 304 | let $t095629634 = getAssetInfo(pmtIdA) | |
305 | 305 | let pmtStrAssetIdA = $t095629634._1 | |
306 | 306 | let pmtAssetNameA = $t095629634._2 | |
307 | 307 | let pmtDecimalsA = $t095629634._3 | |
308 | 308 | let $t096399711 = getAssetInfo(pmtIdB) | |
309 | 309 | let pmtStrAssetIdB = $t096399711._1 | |
310 | 310 | let pmtAssetNameB = $t096399711._2 | |
311 | 311 | let pmtDecimalsB = $t096399711._3 | |
312 | 312 | let initial = ((balA + balB) == 0) | |
313 | 313 | let $t0975410413 = if (initial) | |
314 | 314 | then $Tuple5(pmtA, pmtB, 0, pmtIdA, toBigInt(1)) | |
315 | 315 | else { | |
316 | 316 | let ratioShareTokensInA = fraction(scale16, toBigInt(pmtA), toBigInt(balA)) | |
317 | 317 | let ratioShareTokensInB = fraction(scale16, toBigInt(pmtB), toBigInt(balB)) | |
318 | 318 | if ((ratioShareTokensInB > ratioShareTokensInA)) | |
319 | 319 | then { | |
320 | 320 | let pmt = fraction(pmtA, balB, balA) | |
321 | 321 | $Tuple5(pmtA, pmt, (pmtB - pmt), pmtIdB, ratioShareTokensInA) | |
322 | 322 | } | |
323 | 323 | else { | |
324 | 324 | let pmt = fraction(pmtB, balA, balB) | |
325 | 325 | $Tuple5(pmt, pmtB, (pmtA - pmt), pmtIdA, ratioShareTokensInB) | |
326 | 326 | } | |
327 | 327 | } | |
328 | 328 | let pmtAmountA = $t0975410413._1 | |
329 | 329 | let pmtAmountB = $t0975410413._2 | |
330 | 330 | let change = $t0975410413._3 | |
331 | 331 | let changeAssetId = $t0975410413._4 | |
332 | 332 | let shareTokenRatio = $t0975410413._5 | |
333 | 333 | let shareTokenToPayAmount = if (initial) | |
334 | 334 | then { | |
335 | 335 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
336 | 336 | fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
337 | 337 | } | |
338 | 338 | else toInt(fraction(shareTokenRatio, toBigInt(shareAssetSupply), scale16)) | |
339 | 339 | $Tuple5(shareTokenToPayAmount, change, changeAssetId, pmtAmountA, pmtAmountB) | |
340 | 340 | } | |
341 | 341 | ||
342 | 342 | ||
343 | 343 | func calcLPAmountReplansishOneToken (pmtAmount,pmtAssetId,aId,bId,balA,balB,lpSupply,fee,govFee,teamFee,virtGetMinAmount) = if ((pmtAssetId == aId)) | |
344 | 344 | then { | |
345 | 345 | let virtPayAmount = calculateVirtPay(pmtAmount, balA, fee) | |
346 | 346 | let $t01127011417 = calculateFees(virtPayAmount, virtGetMinAmount, balA, balB, fee, govFee, teamFee) | |
347 | 347 | let amountWithoutFee = $t01127011417._1 | |
348 | 348 | let amountWithFee = $t01127011417._2 | |
349 | 349 | let governanceReward = $t01127011417._3 | |
350 | 350 | let tReward = $t01127011417._4 | |
351 | 351 | let balanceAVirt = (balA + virtPayAmount) | |
352 | 352 | let balanceBVirt = (((balB + amountWithoutFee) - governanceReward) - tReward) | |
353 | 353 | let newBalanceA = (balA + pmtAmount) | |
354 | 354 | let newBalanceB = ((balB - governanceReward) - tReward) | |
355 | 355 | let ratioShareTokensInA = fraction(toBigInt((pmtAmount - virtPayAmount)), scale16, toBigInt(balanceAVirt)) | |
356 | 356 | let ratioShareTokensInB = fraction(toBigInt(amountWithFee), scale16, toBigInt(balanceBVirt)) | |
357 | 357 | let shareTokenToPayAmount = toInt(fraction(min([ratioShareTokensInA, ratioShareTokensInB]), toBigInt(lpSupply), scale16)) | |
358 | 358 | $Tuple6(shareTokenToPayAmount, newBalanceA, newBalanceB, governanceReward, tReward, bId) | |
359 | 359 | } | |
360 | 360 | else { | |
361 | 361 | let virtPayAmount = calculateVirtPay(pmtAmount, balB, fee) | |
362 | 362 | let $t01212912276 = calculateFees(virtPayAmount, virtGetMinAmount, balB, balA, fee, govFee, teamFee) | |
363 | 363 | let amountWithoutFee = $t01212912276._1 | |
364 | 364 | let amountWithFee = $t01212912276._2 | |
365 | 365 | let governanceReward = $t01212912276._3 | |
366 | 366 | let tReward = $t01212912276._4 | |
367 | 367 | let balanceAVirt = (((balA + amountWithoutFee) - governanceReward) - tReward) | |
368 | 368 | let balanceBVirt = (balB + virtPayAmount) | |
369 | 369 | let newBalanceA = ((balA - governanceReward) - tReward) | |
370 | 370 | let newBalanceB = (balB + pmtAmount) | |
371 | 371 | let ratioShareTokensInA = fraction(toBigInt(amountWithFee), scale16, toBigInt(balanceAVirt)) | |
372 | 372 | let ratioShareTokensInB = fraction(toBigInt((pmtAmount - virtPayAmount)), scale16, toBigInt(balanceBVirt)) | |
373 | 373 | let shareTokenToPayAmount = toInt(fraction(min([ratioShareTokensInA, ratioShareTokensInB]), toBigInt(lpSupply), scale16)) | |
374 | 374 | $Tuple6(shareTokenToPayAmount, newBalanceA, newBalanceB, governanceReward, tReward, aId) | |
375 | 375 | } | |
376 | 376 | ||
377 | 377 | ||
378 | 378 | func calcLPReplanishDiffProp (pmtA,pmtB,pmtIdA,pmtIdB,balA,balB,lpSupply,fee,govFee,teamFee,virtGetMinAmount) = { | |
379 | 379 | let $t01312313271 = calcLPAmountReplansishTwoTokens(pmtA, pmtB, pmtIdA, pmtIdB, balA, balB, lpSupply) | |
380 | 380 | let lpTwoAmount = $t01312313271._1 | |
381 | 381 | let change = $t01312313271._2 | |
382 | 382 | let changeAssetId = $t01312313271._3 | |
383 | 383 | let pmtAmountA = $t01312313271._4 | |
384 | 384 | let pmtAmountB = $t01312313271._5 | |
385 | 385 | if ((change > 0)) | |
386 | 386 | then { | |
387 | 387 | let $t01330313532 = calcLPAmountReplansishOneToken(change, changeAssetId, pmtIdA, pmtIdB, (balA + pmtAmountA), (balB + pmtAmountB), lpSupply, fee, govFee, teamFee, virtGetMinAmount) | |
388 | 388 | let lpOne = $t01330313532._1 | |
389 | 389 | let newBalanceA = $t01330313532._2 | |
390 | 390 | let newBalanceB = $t01330313532._3 | |
391 | 391 | let governanceReward = $t01330313532._4 | |
392 | 392 | let tReward = $t01330313532._5 | |
393 | 393 | let gId = $t01330313532._6 | |
394 | 394 | $Tuple6((lpTwoAmount + lpOne), newBalanceA, newBalanceB, governanceReward, tReward, gId) | |
395 | 395 | } | |
396 | 396 | else $Tuple6(lpTwoAmount, (balA + pmtAmountA), (balB + pmtAmountB), 0, 0, unit) | |
397 | 397 | } | |
398 | 398 | ||
399 | 399 | ||
400 | 400 | @Callable(i) | |
401 | - | func calcLPReplanishDiffPropREADONLY (callerBytes,args) = { | |
402 | - | let $ | |
403 | - | let strAssetIdA = $ | |
404 | - | let strAssetIdB = $ | |
405 | - | let assetIdA = $ | |
406 | - | let assetIdB = $ | |
407 | - | let shareAssetId = $ | |
408 | - | let $ | |
409 | - | let balA = $ | |
410 | - | let balB = $ | |
411 | - | let accBalA = $ | |
412 | - | let accBalB = $ | |
413 | - | let lpSupply = $ | |
401 | + | func calcLPReplanishDiffPropREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
402 | + | let $t01385913949 = getPoolAssets(i.caller) | |
403 | + | let strAssetIdA = $t01385913949._1 | |
404 | + | let strAssetIdB = $t01385913949._2 | |
405 | + | let assetIdA = $t01385913949._3 | |
406 | + | let assetIdB = $t01385913949._4 | |
407 | + | let shareAssetId = $t01385913949._5 | |
408 | + | let $t01395414046 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
409 | + | let balA = $t01395414046._1 | |
410 | + | let balB = $t01395414046._2 | |
411 | + | let accBalA = $t01395414046._3 | |
412 | + | let accBalB = $t01395414046._4 | |
413 | + | let lpSupply = $t01395414046._5 | |
414 | 414 | let pmtA = parseIntValue(args[0]) | |
415 | 415 | let pmtB = parseIntValue(args[1]) | |
416 | 416 | let virtGetMinAmount = parseIntValue(args[2]) | |
417 | - | let $ | |
418 | - | let fee = $ | |
419 | - | let govFee = $ | |
420 | - | let teamFee = $ | |
421 | - | let $ | |
422 | - | let lp = $ | |
423 | - | let newBalanceA = $ | |
424 | - | let newBalanceB = $ | |
425 | - | let governanceReward = $ | |
426 | - | let tReward = $ | |
427 | - | let aId = $ | |
417 | + | let $t01418014247 = getFeeParams(i.caller, i.originCaller) | |
418 | + | let fee = $t01418014247._1 | |
419 | + | let govFee = $t01418014247._2 | |
420 | + | let teamFee = $t01418014247._3 | |
421 | + | let $t01425214438 = calcLPReplanishDiffProp(pmtA, pmtB, assetIdA, assetIdB, balA, balB, lpSupply, fee, govFee, teamFee, virtGetMinAmount) | |
422 | + | let lp = $t01425214438._1 | |
423 | + | let newBalanceA = $t01425214438._2 | |
424 | + | let newBalanceB = $t01425214438._3 | |
425 | + | let governanceReward = $t01425214438._4 | |
426 | + | let tReward = $t01425214438._5 | |
427 | + | let aId = $t01425214438._6 | |
428 | 428 | $Tuple2(nil, $Tuple6(lp, newBalanceA, newBalanceB, governanceReward, tReward, aId)) | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | ||
433 | 433 | @Callable(i) | |
434 | - | func withdrawREADONLY (callerBytes,args) = { | |
435 | - | let $ | |
436 | - | let strAssetIdA = $ | |
437 | - | let strAssetIdB = $ | |
438 | - | let assetIdA = $ | |
439 | - | let assetIdB = $ | |
440 | - | let shareAssetId = $ | |
441 | - | let $ | |
442 | - | let balanceA = $ | |
443 | - | let balanceB = $ | |
444 | - | let accountBalanceA = $ | |
445 | - | let accountBalanceB = $ | |
446 | - | let shareAssetSupply = $ | |
434 | + | func withdrawREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
435 | + | let $t01465314743 = getPoolAssets(i.caller) | |
436 | + | let strAssetIdA = $t01465314743._1 | |
437 | + | let strAssetIdB = $t01465314743._2 | |
438 | + | let assetIdA = $t01465314743._3 | |
439 | + | let assetIdB = $t01465314743._4 | |
440 | + | let shareAssetId = $t01465314743._5 | |
441 | + | let $t01474814872 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
442 | + | let balanceA = $t01474814872._1 | |
443 | + | let balanceB = $t01474814872._2 | |
444 | + | let accountBalanceA = $t01474814872._3 | |
445 | + | let accountBalanceB = $t01474814872._4 | |
446 | + | let shareAssetSupply = $t01474814872._5 | |
447 | 447 | let withdrawAmount = parseIntValue(args[0]) | |
448 | 448 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
449 | 449 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
450 | 450 | $Tuple2(nil, $Tuple2(amountToPayA, amountToPayB)) | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | ||
454 | 454 | ||
455 | 455 | @Callable(i) | |
456 | 456 | func init (callerBytes,args,pAmounts,pAssetIds) = { | |
457 | 457 | let caller = Address(callerBytes) | |
458 | - | let $ | |
459 | - | let pmtAmountA = $ | |
460 | - | let pmtAssetIdA = $ | |
461 | - | let $ | |
462 | - | let pmtAmountB = $ | |
463 | - | let pmtAssetIdB = $ | |
458 | + | let $t01527815356 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
459 | + | let pmtAmountA = $t01527815356._1 | |
460 | + | let pmtAssetIdA = $t01527815356._2 | |
461 | + | let $t01536115439 = $Tuple2(pAmounts[1], parsePaymentAsset(pAssetIds[1])) | |
462 | + | let pmtAmountB = $t01536115439._1 | |
463 | + | let pmtAssetIdB = $t01536115439._2 | |
464 | 464 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
465 | 465 | then throw("Only admin can call this function") | |
466 | 466 | else if ((size(args) != 1)) | |
467 | 467 | then throw("Wrong args size") | |
468 | 468 | else if (isDefined(getBoolean(caller, kActive))) | |
469 | 469 | then throw("DApp is already active") | |
470 | 470 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
471 | 471 | then throw("Assets must be different") | |
472 | 472 | else { | |
473 | - | let $ | |
474 | - | let pmtStrAssetIdA = $ | |
475 | - | let pmtAssetNameA = $ | |
476 | - | let pmtDecimalsA = $ | |
477 | - | let $ | |
478 | - | let pmtStrAssetIdB = $ | |
479 | - | let pmtAssetNameB = $ | |
480 | - | let pmtDecimalsB = $ | |
473 | + | let $t01587415951 = getAssetInfo(pmtAssetIdA) | |
474 | + | let pmtStrAssetIdA = $t01587415951._1 | |
475 | + | let pmtAssetNameA = $t01587415951._2 | |
476 | + | let pmtDecimalsA = $t01587415951._3 | |
477 | + | let $t01596016037 = getAssetInfo(pmtAssetIdB) | |
478 | + | let pmtStrAssetIdB = $t01596016037._1 | |
479 | + | let pmtAssetNameB = $t01596016037._2 | |
480 | + | let pmtDecimalsB = $t01596016037._3 | |
481 | 481 | let firstHarvest = (args[0] == "true") | |
482 | 482 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
483 | 483 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
484 | 484 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
485 | 485 | let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
486 | 486 | let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
487 | 487 | let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
488 | 488 | let shareInitialSupply = fraction(arg1, arg2, arg3) | |
489 | 489 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
490 | 490 | let shareIssueId = calculateAssetId(shareIssue) | |
491 | 491 | let stake1 = if (contains(stakingAssets, pmtStrAssetIdA)) | |
492 | 492 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
493 | 493 | else 0 | |
494 | 494 | if ((stake1 == stake1)) | |
495 | 495 | then { | |
496 | 496 | let stake2 = if (contains(stakingAssets, pmtStrAssetIdB)) | |
497 | 497 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
498 | 498 | else 0 | |
499 | 499 | if ((stake2 == stake2)) | |
500 | 500 | then { | |
501 | 501 | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(caller, shareInitialSupply, shareIssueId)] | |
502 | 502 | if (firstHarvest) | |
503 | 503 | then $Tuple2(nil, $Tuple2((baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]), nil)) | |
504 | 504 | else $Tuple2(nil, $Tuple2(baseEntry, nil)) | |
505 | 505 | } | |
506 | 506 | else throw("Strict value is not equal to itself.") | |
507 | 507 | } | |
508 | 508 | else throw("Strict value is not equal to itself.") | |
509 | 509 | } | |
510 | 510 | } | |
511 | 511 | ||
512 | 512 | ||
513 | 513 | ||
514 | 514 | @Callable(i) | |
515 | 515 | func initWithInitRatio (callerBytes,args,pAmounts,pAssetIds) = { | |
516 | 516 | let caller = Address(callerBytes) | |
517 | - | let $ | |
518 | - | let amtAssetA = $ | |
519 | - | let amtAssetB = $ | |
520 | - | let assetIdAStr = $ | |
521 | - | let assetIdBStr = $ | |
522 | - | let firstHarvest = $ | |
517 | + | let $t01825818458 = $Tuple5(parseIntValue(args[0]), parseIntValue(args[1]), args[2], args[3], (args[4] == "true")) | |
518 | + | let amtAssetA = $t01825818458._1 | |
519 | + | let amtAssetB = $t01825818458._2 | |
520 | + | let assetIdAStr = $t01825818458._3 | |
521 | + | let assetIdBStr = $t01825818458._4 | |
522 | + | let firstHarvest = $t01825818458._5 | |
523 | 523 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
524 | 524 | then throw("Only admin can call this function") | |
525 | 525 | else if ((size(args) != 5)) | |
526 | 526 | then throw("Wrong args size") | |
527 | 527 | else if (isDefined(getBoolean(caller, kActive))) | |
528 | 528 | then throw("DApp is already active") | |
529 | 529 | else if ((assetIdAStr == assetIdBStr)) | |
530 | 530 | then throw("Assets must be different") | |
531 | 531 | else { | |
532 | - | let $ | |
533 | - | let pmtStrAssetIdA = $ | |
534 | - | let pmtAssetNameA = $ | |
535 | - | let pmtDecimalsA = $ | |
536 | - | let $ | |
537 | - | let pmtStrAssetIdB = $ | |
538 | - | let pmtAssetNameB = $ | |
539 | - | let pmtDecimalsB = $ | |
532 | + | let $t01889318970 = getAssetInfo(assetIdAStr) | |
533 | + | let pmtStrAssetIdA = $t01889318970._1 | |
534 | + | let pmtAssetNameA = $t01889318970._2 | |
535 | + | let pmtDecimalsA = $t01889318970._3 | |
536 | + | let $t01897919056 = getAssetInfo(assetIdBStr) | |
537 | + | let pmtStrAssetIdB = $t01897919056._1 | |
538 | + | let pmtAssetNameB = $t01897919056._2 | |
539 | + | let pmtDecimalsB = $t01897919056._3 | |
540 | 540 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
541 | 541 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
542 | 542 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
543 | 543 | let shareInitialSupply = 0 | |
544 | 544 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
545 | 545 | let shareIssueId = calculateAssetId(shareIssue) | |
546 | 546 | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceInitA, amtAssetA), IntegerEntry(kBalanceInitB, amtAssetB), IntegerEntry(kBalanceA, 0), IntegerEntry(kBalanceB, 0), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply)] | |
547 | 547 | if (firstHarvest) | |
548 | 548 | then $Tuple2(nil, $Tuple2((baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]), nil)) | |
549 | 549 | else $Tuple2(nil, $Tuple2(baseEntry, nil)) | |
550 | 550 | } | |
551 | 551 | } | |
552 | 552 | ||
553 | 553 | ||
554 | 554 | ||
555 | 555 | @Callable(i) | |
556 | 556 | func keepLimitForFirstHarvest (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
557 | 557 | then throw("Only admin can call this function") | |
558 | 558 | else if ((size(args) != 1)) | |
559 | 559 | then throw("Wrong args size") | |
560 | 560 | else { | |
561 | 561 | let shareLimit = parseIntValue(args[0]) | |
562 | 562 | $Tuple2(nil, $Tuple2([IntegerEntry(kShareLimit, shareLimit)], nil)) | |
563 | 563 | })) | |
564 | 564 | ||
565 | 565 | ||
566 | 566 | ||
567 | 567 | @Callable(i) | |
568 | 568 | func exchange (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
569 | 569 | let caller = Address(callerBytes) | |
570 | - | let $ | |
571 | - | let pmtAmount = $ | |
572 | - | let pmtAssetId = $ | |
570 | + | let $t02148221558 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
571 | + | let pmtAmount = $t02148221558._1 | |
572 | + | let pmtAssetId = $t02148221558._2 | |
573 | 573 | let minAmountToReceive = parseIntValue(args[0]) | |
574 | - | let $ | |
575 | - | let strAssetIdA = $ | |
576 | - | let strAssetIdB = $ | |
577 | - | let assetIdA = $ | |
578 | - | let assetIdB = $ | |
579 | - | let $ | |
580 | - | let balanceA = $ | |
581 | - | let balanceB = $ | |
582 | - | let accountBalanceA = $ | |
583 | - | let accountBalanceB = $ | |
574 | + | let $t02162321699 = getPoolAssets(i.caller) | |
575 | + | let strAssetIdA = $t02162321699._1 | |
576 | + | let strAssetIdB = $t02162321699._2 | |
577 | + | let assetIdA = $t02162321699._3 | |
578 | + | let assetIdB = $t02162321699._4 | |
579 | + | let $t02170821814 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
580 | + | let balanceA = $t02170821814._1 | |
581 | + | let balanceB = $t02170821814._2 | |
582 | + | let accountBalanceA = $t02170821814._3 | |
583 | + | let accountBalanceB = $t02170821814._4 | |
584 | 584 | if ((size(args) != 1)) | |
585 | 585 | then throw("Wrong args size") | |
586 | 586 | else if (if ((balanceA == 0)) | |
587 | 587 | then true | |
588 | 588 | else (balanceB == 0)) | |
589 | 589 | then throw("Can't exchange with zero balance") | |
590 | 590 | else if ((0 >= minAmountToReceive)) | |
591 | 591 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
592 | 592 | else if ((size(pAmounts) != 1)) | |
593 | 593 | then throw("One attached payment expected") | |
594 | 594 | else if (!(containsElement([assetIdA, assetIdB], pmtAssetId))) | |
595 | 595 | then throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
596 | 596 | else if (if ((balanceA > accountBalanceA)) | |
597 | 597 | then true | |
598 | 598 | else (balanceB > accountBalanceB)) | |
599 | 599 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
600 | 600 | else { | |
601 | - | let $ | |
602 | - | let fee = $ | |
603 | - | let govFee = $ | |
604 | - | let teamFee = $ | |
605 | - | let $ | |
601 | + | let $t02271422781 = getFeeParams(i.caller, i.originCaller) | |
602 | + | let fee = $t02271422781._1 | |
603 | + | let govFee = $t02271422781._2 | |
604 | + | let teamFee = $t02271422781._3 | |
605 | + | let $t02279423145 = if ((pmtAssetId == assetIdA)) | |
606 | 606 | then calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB, fee, govFee, teamFee) | |
607 | 607 | else calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA, fee, govFee, teamFee) | |
608 | - | let amountWithoutFee = $ | |
609 | - | let amountWithFee = $ | |
610 | - | let governanceReward = $ | |
611 | - | let teamReward = $ | |
612 | - | let $ | |
608 | + | let amountWithoutFee = $t02279423145._1 | |
609 | + | let amountWithFee = $t02279423145._2 | |
610 | + | let governanceReward = $t02279423145._3 | |
611 | + | let teamReward = $t02279423145._4 | |
612 | + | let $t02315923494 = if ((pmtAssetId == assetIdA)) | |
613 | 613 | then $Tuple3((balanceA + pmtAmount), (((balanceB - amountWithFee) - governanceReward) - teamReward), assetIdB) | |
614 | 614 | else $Tuple3((((balanceA - amountWithFee) - governanceReward) - teamReward), (balanceB + pmtAmount), assetIdA) | |
615 | - | let newBalanceA = $ | |
616 | - | let newBalanceB = $ | |
617 | - | let assetIdSend = $ | |
618 | - | let $ | |
615 | + | let newBalanceA = $t02315923494._1 | |
616 | + | let newBalanceB = $t02315923494._2 | |
617 | + | let assetIdSend = $t02315923494._3 | |
618 | + | let $t02350823768 = if ((pmtAssetId == assetIdA)) | |
619 | 619 | then $Tuple2(pmtAmount, ((amountWithFee + governanceReward) + teamReward)) | |
620 | 620 | else $Tuple2(((amountWithFee + governanceReward) + teamReward), pmtAmount) | |
621 | - | let stakeAmountA = $ | |
622 | - | let stakeAmountB = $ | |
621 | + | let stakeAmountA = $t02350823768._1 | |
622 | + | let stakeAmountB = $t02350823768._2 | |
623 | 623 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
624 | 624 | then invoke(i.caller, "stakeUnstake", [(pmtAssetId == assetIdA), stakeAmountA, strAssetIdA], nil) | |
625 | 625 | else 0 | |
626 | 626 | if ((stake1 == stake1)) | |
627 | 627 | then { | |
628 | 628 | let stake2 = if (contains(stakingAssets, strAssetIdB)) | |
629 | 629 | then invoke(i.caller, "stakeUnstake", [(pmtAssetId == assetIdB), stakeAmountB, strAssetIdB], nil) | |
630 | 630 | else 0 | |
631 | 631 | if ((stake2 == stake2)) | |
632 | 632 | then $Tuple2(nil, $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend), ScriptTransfer(teamBoxAddress, teamReward, assetIdSend)], [amountWithFee, assetIdSend])) | |
633 | 633 | else throw("Strict value is not equal to itself.") | |
634 | 634 | } | |
635 | 635 | else throw("Strict value is not equal to itself.") | |
636 | 636 | } | |
637 | 637 | }))) | |
638 | 638 | ||
639 | 639 | ||
640 | 640 | ||
641 | 641 | @Callable(i) | |
642 | 642 | func replenishWithTwoTokens (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
643 | 643 | let caller = Address(callerBytes) | |
644 | 644 | let pmtAssetIdA = parsePaymentAsset(pAssetIds[0]) | |
645 | 645 | let pmtAssetIdB = parsePaymentAsset(pAssetIds[1]) | |
646 | 646 | let stakeFarming = (args[0] == "true") | |
647 | 647 | let lockType = parseIntValue(args[1]) | |
648 | - | let $ | |
649 | - | let strAssetIdA = $ | |
650 | - | let strAssetIdB = $ | |
651 | - | let assetIdA = $ | |
652 | - | let assetIdB = $ | |
653 | - | let shareAssetId = $ | |
654 | - | let $ | |
655 | - | let balanceA = $ | |
656 | - | let balanceB = $ | |
657 | - | let accountBalanceA = $ | |
658 | - | let accountBalanceB = $ | |
659 | - | let shareAssetSupply = $ | |
648 | + | let $t02508325173 = getPoolAssets(i.caller) | |
649 | + | let strAssetIdA = $t02508325173._1 | |
650 | + | let strAssetIdB = $t02508325173._2 | |
651 | + | let assetIdA = $t02508325173._3 | |
652 | + | let assetIdB = $t02508325173._4 | |
653 | + | let shareAssetId = $t02508325173._5 | |
654 | + | let $t02518225306 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
655 | + | let balanceA = $t02518225306._1 | |
656 | + | let balanceB = $t02518225306._2 | |
657 | + | let accountBalanceA = $t02518225306._3 | |
658 | + | let accountBalanceB = $t02518225306._4 | |
659 | + | let shareAssetSupply = $t02518225306._5 | |
660 | 660 | if ((size(args) != 2)) | |
661 | 661 | then throw("Wrong args size") | |
662 | 662 | else if (if ((size(pAmounts) != 2)) | |
663 | 663 | then (size(pAmounts) != 3) | |
664 | 664 | else false) | |
665 | 665 | then throw("Two or three payments expected") | |
666 | 666 | else if (if ((pmtAssetIdA != assetIdA)) | |
667 | 667 | then true | |
668 | 668 | else (pmtAssetIdB != assetIdB)) | |
669 | 669 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
670 | 670 | else if (if ((balanceA > accountBalanceA)) | |
671 | 671 | then true | |
672 | 672 | else (balanceB > accountBalanceB)) | |
673 | 673 | then $Tuple2(nil, ([ScriptTransfer(caller, pAmounts[0], pmtAssetIdA), ScriptTransfer(caller, pAmounts[1], pmtAssetIdB)] ++ (if ((size(pAmounts) == 3)) | |
674 | 674 | then [AttachedPayment(if ((pAssetIds[2] == base58'')) | |
675 | 675 | then unit | |
676 | 676 | else pAssetIds[2], pAmounts[2])] | |
677 | 677 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
678 | 678 | else { | |
679 | - | let $ | |
680 | - | let shareTokenToPayAmount = $ | |
681 | - | let change = $ | |
682 | - | let changeAssetId = $ | |
683 | - | let pmtAmountA = $ | |
684 | - | let pmtAmountB = $ | |
679 | + | let $t02624326441 = calcLPAmountReplansishTwoTokens(pAmounts[0], pAmounts[1], pmtAssetIdA, pmtAssetIdB, balanceA, balanceB, shareAssetSupply) | |
680 | + | let shareTokenToPayAmount = $t02624326441._1 | |
681 | + | let change = $t02624326441._2 | |
682 | + | let changeAssetId = $t02624326441._3 | |
683 | + | let pmtAmountA = $t02624326441._4 | |
684 | + | let pmtAmountB = $t02624326441._5 | |
685 | 685 | if ((shareTokenToPayAmount == 0)) | |
686 | 686 | then throw("Too small amount to replenish") | |
687 | 687 | else if ((0 > change)) | |
688 | 688 | then throw("Change < 0") | |
689 | 689 | else { | |
690 | 690 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
691 | 691 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountA, strAssetIdA], nil) | |
692 | 692 | else 0 | |
693 | 693 | if ((stake1 == stake1)) | |
694 | 694 | then { | |
695 | 695 | let stake2 = if (contains(stakingAssets, strAssetIdB)) | |
696 | 696 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountB, strAssetIdB], nil) | |
697 | 697 | else 0 | |
698 | 698 | if ((stake2 == stake2)) | |
699 | 699 | then { | |
700 | 700 | let shareTokenST = if (stakeFarming) | |
701 | 701 | then { | |
702 | 702 | let stPayments = ([AttachedPayment(shareAssetId, shareTokenToPayAmount)] ++ (if ((size(pAmounts) == 3)) | |
703 | 703 | then [AttachedPayment(if ((pAssetIds[2] == base58'')) | |
704 | 704 | then unit | |
705 | 705 | else pAssetIds[2], pAmounts[2])] | |
706 | 706 | else nil)) | |
707 | 707 | let reissue = invoke(i.caller, "reissueShareToken", [shareTokenToPayAmount], nil) | |
708 | 708 | if ((reissue == reissue)) | |
709 | 709 | then { | |
710 | 710 | let stake3 = invoke(farmingAddress, "lockShareTokensFromPool", [callerBytes, toString(i.caller), lockType], stPayments) | |
711 | 711 | if ((stake3 == stake3)) | |
712 | 712 | then nil | |
713 | 713 | else throw("Strict value is not equal to itself.") | |
714 | 714 | } | |
715 | 715 | else throw("Strict value is not equal to itself.") | |
716 | 716 | } | |
717 | 717 | else [Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(caller, shareTokenToPayAmount, shareAssetId)] | |
718 | 718 | $Tuple2(nil, $Tuple2(([IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(caller, change, changeAssetId)] ++ shareTokenST), nil)) | |
719 | 719 | } | |
720 | 720 | else throw("Strict value is not equal to itself.") | |
721 | 721 | } | |
722 | 722 | else throw("Strict value is not equal to itself.") | |
723 | 723 | } | |
724 | 724 | } | |
725 | 725 | }))) | |
726 | 726 | ||
727 | 727 | ||
728 | 728 | ||
729 | 729 | @Callable(i) | |
730 | 730 | func replenishWithOneToken (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
731 | 731 | let caller = Address(callerBytes) | |
732 | 732 | let pmtAssetId = parsePaymentAsset(pAssetIds[0]) | |
733 | 733 | let pmtAmount = pAmounts[0] | |
734 | 734 | let virtGetMinAmount = parseIntValue(args[0]) | |
735 | 735 | let stakeFarming = (args[1] == "true") | |
736 | 736 | let lockType = parseIntValue(args[2]) | |
737 | - | let $ | |
738 | - | let strAssetIdA = $ | |
739 | - | let strAssetIdB = $ | |
740 | - | let assetIdA = $ | |
741 | - | let assetIdB = $ | |
742 | - | let shareAssetId = $ | |
743 | - | let $ | |
744 | - | let balanceA = $ | |
745 | - | let balanceB = $ | |
746 | - | let accountBalanceA = $ | |
747 | - | let accountBalanceB = $ | |
748 | - | let shareAssetSupply = $ | |
737 | + | let $t02870028790 = getPoolAssets(i.caller) | |
738 | + | let strAssetIdA = $t02870028790._1 | |
739 | + | let strAssetIdB = $t02870028790._2 | |
740 | + | let assetIdA = $t02870028790._3 | |
741 | + | let assetIdB = $t02870028790._4 | |
742 | + | let shareAssetId = $t02870028790._5 | |
743 | + | let $t02879528919 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
744 | + | let balanceA = $t02879528919._1 | |
745 | + | let balanceB = $t02879528919._2 | |
746 | + | let accountBalanceA = $t02879528919._3 | |
747 | + | let accountBalanceB = $t02879528919._4 | |
748 | + | let shareAssetSupply = $t02879528919._5 | |
749 | 749 | let initial = ((balanceA + balanceB) == 0) | |
750 | 750 | if ((size(args) != 3)) | |
751 | 751 | then throw("Wrong args size") | |
752 | 752 | else if (if ((size(pAmounts) != 1)) | |
753 | 753 | then (size(pAmounts) != 2) | |
754 | 754 | else false) | |
755 | 755 | then throw("Two or one attached assets expected") | |
756 | 756 | else if (if ((pmtAssetId != assetIdA)) | |
757 | 757 | then (pmtAssetId != assetIdB) | |
758 | 758 | else false) | |
759 | 759 | then throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
760 | 760 | else if (initial) | |
761 | 761 | then throw("For initial exchanger you need to use two tokens") | |
762 | 762 | else if (if ((balanceA > accountBalanceA)) | |
763 | 763 | then true | |
764 | 764 | else (balanceB > accountBalanceB)) | |
765 | 765 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ (if ((size(pAmounts) == 2)) | |
766 | 766 | then [AttachedPayment(if ((pAssetIds[2] == base58'')) | |
767 | 767 | then unit | |
768 | 768 | else pAssetIds[2], pAmounts[2])] | |
769 | 769 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
770 | 770 | else { | |
771 | - | let $ | |
772 | - | let fee = $ | |
773 | - | let govFee = $ | |
774 | - | let teamFee = $ | |
775 | - | let $ | |
776 | - | let pmtAssetIdStr = $ | |
777 | - | let pmtAssetIdName = $ | |
778 | - | let $ | |
779 | - | let shareTokenToPayAmount = $ | |
780 | - | let newBalanceA = $ | |
781 | - | let newBalanceB = $ | |
782 | - | let govReward = $ | |
783 | - | let teamReward = $ | |
784 | - | let govRewardAsset = $ | |
771 | + | let $t02983129898 = getFeeParams(i.caller, i.originCaller) | |
772 | + | let fee = $t02983129898._1 | |
773 | + | let govFee = $t02983129898._2 | |
774 | + | let teamFee = $t02983129898._3 | |
775 | + | let $t02990729969 = getAssetInfo(pmtAssetId) | |
776 | + | let pmtAssetIdStr = $t02990729969._1 | |
777 | + | let pmtAssetIdName = $t02990729969._2 | |
778 | + | let $t02998730233 = calcLPAmountReplansishOneToken(pmtAmount, pmtAssetId, assetIdA, assetIdB, balanceA, balanceB, shareAssetSupply, fee, govFee, teamFee, virtGetMinAmount) | |
779 | + | let shareTokenToPayAmount = $t02998730233._1 | |
780 | + | let newBalanceA = $t02998730233._2 | |
781 | + | let newBalanceB = $t02998730233._3 | |
782 | + | let govReward = $t02998730233._4 | |
783 | + | let teamReward = $t02998730233._5 | |
784 | + | let govRewardAsset = $t02998730233._6 | |
785 | 785 | let govRewardAssetStr = if ((govRewardAsset == assetIdA)) | |
786 | 786 | then strAssetIdA | |
787 | 787 | else strAssetIdB | |
788 | 788 | if ((shareTokenToPayAmount == 0)) | |
789 | 789 | then throw("Too small amount to replenish") | |
790 | 790 | else { | |
791 | 791 | let stake1 = if (contains(stakingAssets, pmtAssetIdStr)) | |
792 | 792 | then invoke(i.caller, "stakeUnstake", [true, pmtAmount, pmtAssetIdStr], nil) | |
793 | 793 | else 0 | |
794 | 794 | if ((stake1 == stake1)) | |
795 | 795 | then { | |
796 | 796 | let stake2 = if (contains(stakingAssets, govRewardAssetStr)) | |
797 | 797 | then invoke(i.caller, "stakeUnstake", [false, (govReward + teamReward), govRewardAssetStr], nil) | |
798 | 798 | else 0 | |
799 | 799 | if ((stake2 == stake2)) | |
800 | 800 | then { | |
801 | 801 | let shareTokenST = if (stakeFarming) | |
802 | 802 | then { | |
803 | 803 | let stPayments = ([AttachedPayment(shareAssetId, shareTokenToPayAmount)] ++ (if ((size(pAmounts) == 2)) | |
804 | 804 | then [AttachedPayment(if ((pAssetIds[1] == base58'')) | |
805 | 805 | then unit | |
806 | 806 | else pAssetIds[1], pAmounts[1])] | |
807 | 807 | else nil)) | |
808 | 808 | let reissue = invoke(i.caller, "reissueShareToken", [shareTokenToPayAmount], nil) | |
809 | 809 | if ((reissue == reissue)) | |
810 | 810 | then { | |
811 | 811 | let stake3 = invoke(farmingAddress, "lockShareTokensFromPool", [callerBytes, toString(i.caller), lockType], stPayments) | |
812 | 812 | if ((stake3 == stake3)) | |
813 | 813 | then nil | |
814 | 814 | else throw("Strict value is not equal to itself.") | |
815 | 815 | } | |
816 | 816 | else throw("Strict value is not equal to itself.") | |
817 | 817 | } | |
818 | 818 | else [Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(caller, shareTokenToPayAmount, shareAssetId)] | |
819 | 819 | $Tuple2(nil, $Tuple2(([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(moneyBoxAddress, govReward, govRewardAsset), ScriptTransfer(teamBoxAddress, teamReward, govRewardAsset)] ++ shareTokenST), nil)) | |
820 | 820 | } | |
821 | 821 | else throw("Strict value is not equal to itself.") | |
822 | 822 | } | |
823 | 823 | else throw("Strict value is not equal to itself.") | |
824 | 824 | } | |
825 | 825 | } | |
826 | 826 | }))) | |
827 | 827 | ||
828 | 828 | ||
829 | 829 | ||
830 | 830 | @Callable(i) | |
831 | 831 | func withdraw (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
832 | 832 | let caller = Address(callerBytes) | |
833 | - | let $ | |
834 | - | let strAssetIdA = $ | |
835 | - | let strAssetIdB = $ | |
836 | - | let assetIdA = $ | |
837 | - | let assetIdB = $ | |
838 | - | let shareAssetId = $ | |
839 | - | let $ | |
840 | - | let balanceA = $ | |
841 | - | let balanceB = $ | |
842 | - | let accountBalanceA = $ | |
843 | - | let accountBalanceB = $ | |
844 | - | let shareAssetSupply = $ | |
845 | - | let $ | |
833 | + | let $t03230132391 = getPoolAssets(i.caller) | |
834 | + | let strAssetIdA = $t03230132391._1 | |
835 | + | let strAssetIdB = $t03230132391._2 | |
836 | + | let assetIdA = $t03230132391._3 | |
837 | + | let assetIdB = $t03230132391._4 | |
838 | + | let shareAssetId = $t03230132391._5 | |
839 | + | let $t03240032524 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
840 | + | let balanceA = $t03240032524._1 | |
841 | + | let balanceB = $t03240032524._2 | |
842 | + | let accountBalanceA = $t03240032524._3 | |
843 | + | let accountBalanceB = $t03240032524._4 | |
844 | + | let shareAssetSupply = $t03240032524._5 | |
845 | + | let $t03253332913 = if ((size(pAmounts) == 1)) | |
846 | 846 | then { | |
847 | 847 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
848 | 848 | if ((pAsset != shareAssetId)) | |
849 | 849 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
850 | 850 | else $Tuple2(pAmounts[0], pAsset) | |
851 | 851 | } | |
852 | 852 | else $Tuple2(0, shareAssetId) | |
853 | - | let pmtAmount = $ | |
854 | - | let pmtAssetId = $ | |
853 | + | let pmtAmount = $t03253332913._1 | |
854 | + | let pmtAssetId = $t03253332913._2 | |
855 | 855 | if ((size(args) != 1)) | |
856 | 856 | then throw("Wrong args size") | |
857 | 857 | else if ((size(pAmounts) > 1)) | |
858 | 858 | then throw("One attached payment expected") | |
859 | 859 | else if (if ((balanceA > accountBalanceA)) | |
860 | 860 | then true | |
861 | 861 | else (balanceB > accountBalanceB)) | |
862 | 862 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
863 | 863 | else { | |
864 | 864 | let unlockAmount = parseIntValue(valueOrElse(args[0], "0")) | |
865 | 865 | let unlock = if ((unlockAmount > 0)) | |
866 | 866 | then invoke(farmingAddress, "withdrawShareTokensFromPool", [callerBytes, toString(i.caller), unlockAmount], nil) | |
867 | 867 | else 0 | |
868 | 868 | if ((unlock == unlock)) | |
869 | 869 | then { | |
870 | 870 | let withdrawAmount = (pmtAmount + unlockAmount) | |
871 | 871 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
872 | 872 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
873 | 873 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
874 | 874 | then invoke(i.caller, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
875 | 875 | else 0 | |
876 | 876 | if ((stake1 == stake1)) | |
877 | 877 | then { | |
878 | 878 | let stake2 = if (contains(stakingAssets, strAssetIdB)) | |
879 | 879 | then invoke(i.caller, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
880 | 880 | else 0 | |
881 | 881 | if ((stake2 == stake2)) | |
882 | 882 | then $Tuple2([ScriptTransfer(i.caller, unlockAmount, shareAssetId)], $Tuple2([IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(caller, amountToPayA, assetIdA), ScriptTransfer(caller, amountToPayB, assetIdB)], nil)) | |
883 | 883 | else throw("Strict value is not equal to itself.") | |
884 | 884 | } | |
885 | 885 | else throw("Strict value is not equal to itself.") | |
886 | 886 | } | |
887 | 887 | else throw("Strict value is not equal to itself.") | |
888 | 888 | } | |
889 | 889 | })) | |
890 | 890 | ||
891 | 891 | ||
892 | 892 | ||
893 | 893 | @Callable(i) | |
894 | 894 | func withdrawOneToken (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
895 | 895 | let caller = Address(callerBytes) | |
896 | 896 | let withdrawAsset = if ((args[0] == "")) | |
897 | 897 | then unit | |
898 | 898 | else fromBase58String(args[0]) | |
899 | - | let $ | |
900 | - | let strAssetIdA = $ | |
901 | - | let strAssetIdB = $ | |
902 | - | let assetIdA = $ | |
903 | - | let assetIdB = $ | |
904 | - | let shareAssetId = $ | |
905 | - | let $ | |
906 | - | let balanceA = $ | |
907 | - | let balanceB = $ | |
908 | - | let accountBalanceA = $ | |
909 | - | let accountBalanceB = $ | |
910 | - | let shareAssetSupply = $ | |
911 | - | let $ | |
899 | + | let $t03513135221 = getPoolAssets(i.caller) | |
900 | + | let strAssetIdA = $t03513135221._1 | |
901 | + | let strAssetIdB = $t03513135221._2 | |
902 | + | let assetIdA = $t03513135221._3 | |
903 | + | let assetIdB = $t03513135221._4 | |
904 | + | let shareAssetId = $t03513135221._5 | |
905 | + | let $t03523035354 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
906 | + | let balanceA = $t03523035354._1 | |
907 | + | let balanceB = $t03523035354._2 | |
908 | + | let accountBalanceA = $t03523035354._3 | |
909 | + | let accountBalanceB = $t03523035354._4 | |
910 | + | let shareAssetSupply = $t03523035354._5 | |
911 | + | let $t03536335715 = if ((size(pAmounts) == 1)) | |
912 | 912 | then { | |
913 | 913 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
914 | 914 | if ((pAsset != shareAssetId)) | |
915 | 915 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
916 | 916 | else $Tuple2(pAmounts[0], pAsset) | |
917 | 917 | } | |
918 | 918 | else $Tuple2(0, shareAssetId) | |
919 | - | let pmtAmount = $ | |
920 | - | let pmtAssetId = $ | |
919 | + | let pmtAmount = $t03536335715._1 | |
920 | + | let pmtAssetId = $t03536335715._2 | |
921 | 921 | let virtMinToRecive = parseIntValue(args[1]) | |
922 | 922 | if ((size(args) != 3)) | |
923 | 923 | then throw("Wrong args size") | |
924 | 924 | else if ((size(pAmounts) > 1)) | |
925 | 925 | then throw("One attached payment expected") | |
926 | 926 | else if ((pmtAssetId != shareAssetId)) | |
927 | 927 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
928 | 928 | else if (!(containsElement([assetIdA, assetIdB], withdrawAsset))) | |
929 | 929 | then throw("Incorrect withdraw asset.") | |
930 | 930 | else if (if ((balanceA > accountBalanceA)) | |
931 | 931 | then true | |
932 | 932 | else (balanceB > accountBalanceB)) | |
933 | 933 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
934 | 934 | else { | |
935 | 935 | let unlockAmount = parseIntValue(valueOrElse(args[2], "0")) | |
936 | 936 | let unlock = if ((unlockAmount > 0)) | |
937 | 937 | then invoke(farmingAddress, "withdrawShareTokensFromPool", [callerBytes, toString(i.caller), unlockAmount], nil) | |
938 | 938 | else 0 | |
939 | 939 | if ((unlock == unlock)) | |
940 | 940 | then { | |
941 | 941 | let withdrawAmount = (pmtAmount + unlockAmount) | |
942 | 942 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
943 | 943 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
944 | - | let $ | |
945 | - | let fee = $ | |
946 | - | let govFee = $ | |
947 | - | let teamFee = $ | |
948 | - | let $ | |
944 | + | let $t03698237049 = getFeeParams(i.caller, i.originCaller) | |
945 | + | let fee = $t03698237049._1 | |
946 | + | let govFee = $t03698237049._2 | |
947 | + | let teamFee = $t03698237049._3 | |
948 | + | let $t03706237476 = if ((withdrawAsset == assetIdA)) | |
949 | 949 | then calculateFees(amountToPayB, virtMinToRecive, (balanceB - amountToPayB), (balanceA - amountToPayA), fee, govFee, teamFee) | |
950 | 950 | else calculateFees(amountToPayA, virtMinToRecive, (balanceA - amountToPayA), (balanceB - amountToPayB), fee, govFee, teamFee) | |
951 | - | let amountWithoutFee = $ | |
952 | - | let amountWithFee = $ | |
953 | - | let governanceReward = $ | |
954 | - | let teamReward = $ | |
955 | - | let $ | |
951 | + | let amountWithoutFee = $t03706237476._1 | |
952 | + | let amountWithFee = $t03706237476._2 | |
953 | + | let governanceReward = $t03706237476._3 | |
954 | + | let teamReward = $t03706237476._4 | |
955 | + | let $t03748938799 = if ((withdrawAsset == assetIdA)) | |
956 | 956 | then { | |
957 | 957 | let unstake = if (contains(stakingAssets, strAssetIdA)) | |
958 | 958 | then invoke(i.caller, "stakeUnstake", [false, (((amountToPayA + amountWithFee) + governanceReward) + teamReward), strAssetIdA], nil) | |
959 | 959 | else 0 | |
960 | 960 | if ((unstake == unstake)) | |
961 | 961 | then $Tuple4(((((balanceA - amountToPayA) - amountWithFee) - governanceReward) - teamReward), balanceB, assetIdA, [ScriptTransfer(caller, (amountToPayA + amountWithFee), assetIdA)]) | |
962 | 962 | else throw("Strict value is not equal to itself.") | |
963 | 963 | } | |
964 | 964 | else { | |
965 | 965 | let unstake = if (contains(stakingAssets, strAssetIdB)) | |
966 | 966 | then invoke(i.caller, "stakeUnstake", [false, (((amountToPayB + amountWithFee) + governanceReward) + teamReward), strAssetIdB], nil) | |
967 | 967 | else 0 | |
968 | 968 | if ((unstake == unstake)) | |
969 | 969 | then $Tuple4(balanceA, ((((balanceB - amountToPayB) - amountWithFee) - governanceReward) - teamReward), assetIdB, [ScriptTransfer(caller, (amountToPayB + amountWithFee), assetIdB)]) | |
970 | 970 | else throw("Strict value is not equal to itself.") | |
971 | 971 | } | |
972 | - | let newBalanceA = $ | |
973 | - | let newBalanceB = $ | |
974 | - | let govRewardAssetId = $ | |
975 | - | let userTransfer = $ | |
972 | + | let newBalanceA = $t03748938799._1 | |
973 | + | let newBalanceB = $t03748938799._2 | |
974 | + | let govRewardAssetId = $t03748938799._3 | |
975 | + | let userTransfer = $t03748938799._4 | |
976 | 976 | $Tuple2([ScriptTransfer(i.caller, unlockAmount, shareAssetId)], $Tuple2(([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceReward, govRewardAssetId), ScriptTransfer(teamBoxAddress, teamReward, govRewardAssetId)] ++ userTransfer), nil)) | |
977 | 977 | } | |
978 | 978 | else throw("Strict value is not equal to itself.") | |
979 | 979 | } | |
980 | 980 | }))) | |
981 | 981 | ||
982 | 982 | ||
983 | 983 | ||
984 | 984 | @Callable(i) | |
985 | 985 | func takeIntoAccountExtraFunds (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
986 | - | let $ | |
987 | - | let strAssetIdA = $ | |
988 | - | let strAssetIdB = $ | |
989 | - | let assetIdA = $ | |
990 | - | let assetIdB = $ | |
986 | + | let $t03955939635 = getPoolAssets(i.caller) | |
987 | + | let strAssetIdA = $t03955939635._1 | |
988 | + | let strAssetIdB = $t03955939635._2 | |
989 | + | let assetIdA = $t03955939635._3 | |
990 | + | let assetIdB = $t03955939635._4 | |
991 | 991 | let claim = if (if ((assetIdA == USDN)) | |
992 | 992 | then true | |
993 | 993 | else (assetIdB == USDN)) | |
994 | 994 | then invoke(i.caller, "claimNetrinoRewards", nil, nil) | |
995 | 995 | else 0 | |
996 | 996 | if ((claim == claim)) | |
997 | 997 | then { | |
998 | - | let $ | |
999 | - | let balanceA = $ | |
1000 | - | let balanceB = $ | |
1001 | - | let accountBalanceA = $ | |
1002 | - | let accountBalanceB = $ | |
998 | + | let $t03979539901 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
999 | + | let balanceA = $t03979539901._1 | |
1000 | + | let balanceB = $t03979539901._2 | |
1001 | + | let accountBalanceA = $t03979539901._3 | |
1002 | + | let accountBalanceB = $t03979539901._4 | |
1003 | 1003 | let amountEnrollA = (accountBalanceA - balanceA) | |
1004 | 1004 | let amountEnrollB = (accountBalanceB - balanceB) | |
1005 | 1005 | if ((size(args) != 0)) | |
1006 | 1006 | then throw("Wrong args size") | |
1007 | 1007 | else if ((moneyBoxAddress != i.originCaller)) | |
1008 | 1008 | then throw("Only the wallet can call this function") | |
1009 | 1009 | else if (if ((0 > amountEnrollA)) | |
1010 | 1010 | then true | |
1011 | 1011 | else (0 > amountEnrollB)) | |
1012 | 1012 | then suspend("Enroll amount negative") | |
1013 | 1013 | else if (if ((amountEnrollA == 0)) | |
1014 | 1014 | then (amountEnrollB == 0) | |
1015 | 1015 | else false) | |
1016 | 1016 | then throw("No money to take") | |
1017 | 1017 | else { | |
1018 | 1018 | let stake1 = if (if (contains(stakingAssets, strAssetIdA)) | |
1019 | 1019 | then (amountEnrollA > 0) | |
1020 | 1020 | else false) | |
1021 | 1021 | then invoke(i.caller, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
1022 | 1022 | else 0 | |
1023 | 1023 | if ((stake1 == stake1)) | |
1024 | 1024 | then { | |
1025 | 1025 | let stake2 = if (if (contains(stakingAssets, strAssetIdB)) | |
1026 | 1026 | then (amountEnrollB > 0) | |
1027 | 1027 | else false) | |
1028 | 1028 | then invoke(i.caller, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
1029 | 1029 | else 0 | |
1030 | 1030 | if ((stake2 == stake2)) | |
1031 | 1031 | then $Tuple2(nil, $Tuple2([IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))], nil)) | |
1032 | 1032 | else throw("Strict value is not equal to itself.") | |
1033 | 1033 | } | |
1034 | 1034 | else throw("Strict value is not equal to itself.") | |
1035 | 1035 | } | |
1036 | 1036 | } | |
1037 | 1037 | else throw("Strict value is not equal to itself.") | |
1038 | 1038 | })) | |
1039 | 1039 | ||
1040 | 1040 | ||
1041 | 1041 | @Verifier(tx) | |
1042 | 1042 | func verify () = { | |
1043 | 1043 | let multiSignedByAdmins = { | |
1044 | 1044 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1045 | 1045 | then 1 | |
1046 | 1046 | else 0 | |
1047 | 1047 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
1048 | 1048 | then 1 | |
1049 | 1049 | else 0 | |
1050 | 1050 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
1051 | 1051 | then 1 | |
1052 | 1052 | else 0 | |
1053 | 1053 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
1054 | 1054 | } | |
1055 | 1055 | multiSignedByAdmins | |
1056 | 1056 | } | |
1057 | 1057 |
github/deemru/w8io/026f985 220.92 ms ◑