tx · J4rZQ13haGytUsNtNpMkzazxrdaJDiXZXRrx2W54PNxB 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS: -0.03800000 Waves 2023.03.17 17:11 [2494096] smart account 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS > SELF 0.00000000 Waves
{ "type": 13, "id": "J4rZQ13haGytUsNtNpMkzazxrdaJDiXZXRrx2W54PNxB", "fee": 3800000, "feeAssetId": null, "timestamp": 1679062353759, "version": 2, "chainId": 84, "sender": "3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS", "senderPublicKey": "C7xgcYqQ8qV8rmvzAjhQWq4cz82F6VJfXMNygvrTXsfW", "proofs": [ "GWfdWBc8rynWfF6D4RuNVTn2AtKdsrLeTqHtXCmJUXc69LgM6eY1u7TJw8aFbFKzNqYj5kYK7JoCtb6fVwEGfQS", "2VoviyinxvdfQ5PiypkL9irPb23V5wxf36Fkfvf11HsR2n1bPR2UCKvP3qEuZeFxUKzZZpdxH7gmZfB7FCnqBmsN" ], "script": "base64:BgJmCAISBAoCEQESBQoDCAEBEgUKAwEEARIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIAYgAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMAC2tEZXByZWNhdGVkAgtkZXByZWNhdGVkXwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQANa1NoYXJlQXNzZXRJZAIOc2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JAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTEGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTIGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTMGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABRFhZG1pblB1YktleUludm9rZQMDBRNjYWxsVGFrZUludG9BY2NvdW50BQ1zaWduZWRCeUFkbWluBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnNbNfbU", "height": 2494096, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3q8Z8MyQoighBNDkYYZnsmDvY3jStjuN4cibaLpegA4M Next: none Diff:
Old | New | Differences | |
---|---|---|---|
55 | 55 | ||
56 | 56 | let kMoneyBoxAddress = "money_box_address" | |
57 | 57 | ||
58 | + | let kTeamBoxAddress = "team_box_address" | |
59 | + | ||
58 | 60 | let kGovAddress = "governance_address" | |
59 | 61 | ||
60 | 62 | let kVotingAddress = "voting_address" | |
82 | 84 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
83 | 85 | ||
84 | 86 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
87 | + | ||
88 | + | let teamBoxAddress = Address(getBase58FromOracle(kTeamBoxAddress)) | |
85 | 89 | ||
86 | 90 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
87 | 91 | ||
111 | 115 | ||
112 | 116 | let fee = getIntegerValue(this, kFee) | |
113 | 117 | ||
114 | - | let feeGovernance = fraction(40, feeScale6, 100) | |
118 | + | let feeGovernance = fraction(35, feeScale6, 100) | |
119 | + | ||
120 | + | let feeTeam = fraction(10, feeScale6, 100) | |
115 | 121 | ||
116 | 122 | let initial_A = getIntegerValue(this, "initial_A") | |
117 | 123 | ||
303 | 309 | else $Tuple2(D, false) | |
304 | 310 | } | |
305 | 311 | ||
306 | - | let $ | |
312 | + | let $t070047070 = { | |
307 | 313 | let $l = iter15 | |
308 | 314 | let $s = size($l) | |
309 | 315 | let $acc0 = $Tuple2(toBigInt(S), false) | |
317 | 323 | ||
318 | 324 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
319 | 325 | } | |
320 | - | let D = $ | |
321 | - | let finished = $ | |
326 | + | let D = $t070047070._1 | |
327 | + | let finished = $t070047070._2 | |
322 | 328 | if ((finished == false)) | |
323 | 329 | then throw(("get_D() not finished with " + toString(D))) | |
324 | 330 | else toInt(D) | |
344 | 350 | let D = get_D(xp_, amp) | |
345 | 351 | let Ann = (amp * nCoins) | |
346 | 352 | func S_c (acc,i) = { | |
347 | - | let $ | |
348 | - | let S_ = $ | |
349 | - | let c = $ | |
353 | + | let $t076417658 = acc | |
354 | + | let S_ = $t076417658._1 | |
355 | + | let c = $t076417658._2 | |
350 | 356 | let x_ = if ((in == i)) | |
351 | 357 | then x | |
352 | 358 | else xp_[i] | |
357 | 363 | else $Tuple2(S_, c) | |
358 | 364 | } | |
359 | 365 | ||
360 | - | let $ | |
366 | + | let $t078667921 = { | |
361 | 367 | let $l = iter10 | |
362 | 368 | let $s = size($l) | |
363 | 369 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
371 | 377 | ||
372 | 378 | $f0_2($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) | |
373 | 379 | } | |
374 | - | let S_ = $ | |
375 | - | let c_ = $ | |
380 | + | let S_ = $t078667921._1 | |
381 | + | let c_ = $t078667921._2 | |
376 | 382 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
377 | 383 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
378 | 384 | func y_proc (acc,_i) = if ((acc._2 == true)) | |
389 | 395 | else $Tuple2(y, false) | |
390 | 396 | } | |
391 | 397 | ||
392 | - | let $ | |
398 | + | let $t084038470 = { | |
393 | 399 | let $l = iter16 | |
394 | 400 | let $s = size($l) | |
395 | 401 | let $acc0 = $Tuple2(toBigInt(D), false) | |
403 | 409 | ||
404 | 410 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
405 | 411 | } | |
406 | - | let y = $ | |
407 | - | let finished = $ | |
412 | + | let y = $t084038470._1 | |
413 | + | let finished = $t084038470._2 | |
408 | 414 | if ((finished == false)) | |
409 | 415 | then throw(("getY() not finished with " + toString(y))) | |
410 | 416 | else toInt(y) | |
418 | 424 | else { | |
419 | 425 | let Ann = (A_ * nCoins) | |
420 | 426 | func S_c (acc,i) = { | |
421 | - | let $ | |
422 | - | let S_ = $ | |
423 | - | let c = $ | |
427 | + | let $t088498866 = acc | |
428 | + | let S_ = $t088498866._1 | |
429 | + | let c = $t088498866._2 | |
424 | 430 | let x_ = if (if ((in != i)) | |
425 | 431 | then (nCoins > i) | |
426 | 432 | else false) | |
433 | 439 | else $Tuple2(S_, c) | |
434 | 440 | } | |
435 | 441 | ||
436 | - | let $ | |
442 | + | let $t090869141 = { | |
437 | 443 | let $l = iter10 | |
438 | 444 | let $s = size($l) | |
439 | 445 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
447 | 453 | ||
448 | 454 | $f0_2($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) | |
449 | 455 | } | |
450 | - | let S_ = $ | |
451 | - | let c_ = $ | |
456 | + | let S_ = $t090869141._1 | |
457 | + | let c_ = $t090869141._2 | |
452 | 458 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
453 | 459 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
454 | 460 | func y_D_proc (acc,i) = if ((acc._2 == true)) | |
465 | 471 | else $Tuple2(y, false) | |
466 | 472 | } | |
467 | 473 | ||
468 | - | let $ | |
474 | + | let $t096249693 = { | |
469 | 475 | let $l = iter16 | |
470 | 476 | let $s = size($l) | |
471 | 477 | let $acc0 = $Tuple2(toBigInt(D), false) | |
479 | 485 | ||
480 | 486 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
481 | 487 | } | |
482 | - | let y = $ | |
483 | - | let finished = $ | |
488 | + | let y = $t096249693._1 | |
489 | + | let finished = $t096249693._2 | |
484 | 490 | if ((finished == false)) | |
485 | 491 | then throw(("get_y_D() not finished with " + toString(y))) | |
486 | 492 | else toInt(y) | |
497 | 503 | let new_y = get_y_D(amp, i, xp, D1) | |
498 | 504 | let dy_0 = (xp[i] - new_y) | |
499 | 505 | func xp_reduced_proc (acc,xp_j) = { | |
500 | - | let $ | |
501 | - | let xp_reduced = $ | |
502 | - | let index = $ | |
506 | + | let $t01033410363 = acc | |
507 | + | let xp_reduced = $t01033410363._1 | |
508 | + | let index = $t01033410363._2 | |
503 | 509 | let dx_expected = if ((index == i)) | |
504 | 510 | then (fraction(xp_j, D1, D0) - new_y) | |
505 | 511 | else (xp_j - fraction(xp_j, D1, D0)) | |
506 | 512 | $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1)) | |
507 | 513 | } | |
508 | 514 | ||
509 | - | let $ | |
515 | + | let $t01062510689 = { | |
510 | 516 | let $l = xp | |
511 | 517 | let $s = size($l) | |
512 | 518 | let $acc0 = $Tuple2(nil, 0) | |
520 | 526 | ||
521 | 527 | $f0_2($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) | |
522 | 528 | } | |
523 | - | let xp_reduced = $ | |
524 | - | let index = $ | |
529 | + | let xp_reduced = $t01062510689._1 | |
530 | + | let index = $t01062510689._2 | |
525 | 531 | let xp_reduced_i = xp_reduced[i] | |
526 | 532 | let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1) | |
527 | 533 | $Tuple2(dy, (dy_0 - dy)) | |
545 | 551 | ||
546 | 552 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
547 | 553 | then { | |
548 | - | let $ | |
549 | - | let call = $ | |
550 | - | let stakingAddr = $ | |
554 | + | let $t01125311319 = calcStakingFuncAndAddres(stake, assetId) | |
555 | + | let call = $t01125311319._1 | |
556 | + | let stakingAddr = $t01125311319._2 | |
551 | 557 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
552 | 558 | } | |
553 | 559 | else { | |
554 | - | let $ | |
555 | - | let call = $ | |
556 | - | let stakingAddr = $ | |
560 | + | let $t01140511471 = calcStakingFuncAndAddres(stake, assetId) | |
561 | + | let call = $t01140511471._1 | |
562 | + | let stakingAddr = $t01140511471._2 | |
557 | 563 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
558 | 564 | } | |
559 | 565 | ||
560 | 566 | ||
561 | 567 | func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
562 | 568 | then { | |
563 | - | let $ | |
564 | - | let call = $ | |
565 | - | let addr = $ | |
566 | - | let params = $ | |
567 | - | let payments = $ | |
569 | + | let $t01165811760 = calcStakingParams(true, amount, fromBase58String(assetIdString)) | |
570 | + | let call = $t01165811760._1 | |
571 | + | let addr = $t01165811760._2 | |
572 | + | let params = $t01165811760._3 | |
573 | + | let payments = $t01165811760._4 | |
568 | 574 | invoke(addr, call, params, payments) | |
569 | 575 | } | |
570 | 576 | else 0 | |
572 | 578 | ||
573 | 579 | func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
574 | 580 | then { | |
575 | - | let $ | |
576 | - | let call = $ | |
577 | - | let addr = $ | |
578 | - | let params = $ | |
579 | - | let payments = $ | |
581 | + | let $t01194512048 = calcStakingParams(false, amount, fromBase58String(assetIdString)) | |
582 | + | let call = $t01194512048._1 | |
583 | + | let addr = $t01194512048._2 | |
584 | + | let params = $t01194512048._3 | |
585 | + | let payments = $t01194512048._4 | |
580 | 586 | invoke(addr, call, params, payments) | |
581 | 587 | } | |
582 | 588 | else 0 | |
605 | 611 | func checkSuspicious () = { | |
606 | 612 | let contractBalances = _xp() | |
607 | 613 | func checkBalance (acc,assetId) = { | |
608 | - | let $ | |
609 | - | let suspicious = $ | |
610 | - | let i = $ | |
614 | + | let $t01265912684 = acc | |
615 | + | let suspicious = $t01265912684._1 | |
616 | + | let i = $t01265912684._2 | |
611 | 617 | if (suspicious) | |
612 | 618 | then $Tuple2(suspicious, i) | |
613 | 619 | else { | |
712 | 718 | else 0 | |
713 | 719 | let withdrawAmount = (pmtAmount + unlockAmount) | |
714 | 720 | func calcScriptActions (acc,balance) = { | |
715 | - | let $ | |
716 | - | let scriptActions = $ | |
717 | - | let i = $ | |
721 | + | let $t01510015128 = acc | |
722 | + | let scriptActions = $t01510015128._1 | |
723 | + | let i = $t01510015128._2 | |
718 | 724 | let wAmount = fraction(balance, withdrawAmount, shareSupply) | |
719 | 725 | if (assert((wAmount >= minAmounts[i]))) | |
720 | 726 | then throw("Withdrawal resulted in fewer coins than expected") | |
726 | 732 | } | |
727 | 733 | } | |
728 | 734 | ||
729 | - | let $ | |
735 | + | let $t01561715685 = { | |
730 | 736 | let $l = _xp() | |
731 | 737 | let $s = size($l) | |
732 | 738 | let $acc0 = $Tuple2(nil, 0) | |
740 | 746 | ||
741 | 747 | $f0_2($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) | |
742 | 748 | } | |
743 | - | let scriptActions = $ | |
744 | - | let i = $ | |
749 | + | let scriptActions = $t01561715685._1 | |
750 | + | let i = $t01561715685._2 | |
745 | 751 | (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]) | |
746 | 752 | } | |
747 | 753 | } | |
764 | 770 | let tokenOutB58 = fromBase58String(tokenOut) | |
765 | 771 | let withdrawAmount = (pmtAmount + unlockAmount) | |
766 | 772 | let xp = _xp() | |
767 | - | let $ | |
768 | - | let dy = $ | |
769 | - | let dy_fee = $ | |
773 | + | let $t01654716634 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.originCaller) | |
774 | + | let dy = $t01654716634._1 | |
775 | + | let dy_fee = $t01654716634._2 | |
770 | 776 | if (assert((dy >= minAmount))) | |
771 | 777 | then throw("Not enough coins removed") | |
772 | 778 | else { | |
773 | 779 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
780 | + | let teamFees = fraction(dy_fee, feeTeam, feeScale6) | |
774 | 781 | let dy_and_fee = (dy + dy_fee) | |
775 | 782 | func makeNewBalances (acc,tokenBalance) = { | |
776 | - | let $ | |
777 | - | let newBalances = $ | |
778 | - | let i = $ | |
783 | + | let $t01694816974 = acc | |
784 | + | let newBalances = $t01694816974._1 | |
785 | + | let i = $t01694816974._2 | |
779 | 786 | if ((i == outIndex)) | |
780 | 787 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
781 | 788 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
782 | 789 | } | |
783 | 790 | ||
784 | - | let $ | |
791 | + | let $t01714117202 = { | |
785 | 792 | let $l = xp | |
786 | 793 | let $s = size($l) | |
787 | 794 | let $acc0 = $Tuple2(nil, 0) | |
795 | 802 | ||
796 | 803 | $f0_2($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) | |
797 | 804 | } | |
798 | - | let newBalances = $ | |
799 | - | let v = $ | |
805 | + | let newBalances = $t01714117202._1 | |
806 | + | let v = $t01714117202._2 | |
800 | 807 | if (checkDAppThreshold(newBalances)) | |
801 | 808 | then throw() | |
802 | 809 | else { | |
803 | 810 | let us = unstake(dy_and_fee, tokenOut) | |
804 | 811 | if ((us == us)) | |
805 | 812 | then { | |
806 | - | let lpFees = (dy_fee - governanceFees) | |
813 | + | let lpFees = ((dy_fee - governanceFees) - teamFees) | |
807 | 814 | let airdrop = if ((lpFees > 0)) | |
808 | 815 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
809 | 816 | else 0 | |
810 | 817 | if ((airdrop == airdrop)) | |
811 | - | then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))] | |
818 | + | then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(teamBoxAddress, teamFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))] | |
812 | 819 | else throw("Strict value is not equal to itself.") | |
813 | 820 | } | |
814 | 821 | else throw("Strict value is not equal to itself.") | |
852 | 859 | let D0 = if ((shareSupply == 0)) | |
853 | 860 | then 0 | |
854 | 861 | else getDMem(xp, amp) | |
855 | - | let $ | |
862 | + | let $t01944519699 = if (if ((lockType > 0)) | |
856 | 863 | then (msg.payments[(size(msg.payments) - 1)].assetId == unit) | |
857 | 864 | else false) | |
858 | 865 | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
859 | 866 | else $Tuple2(msg.payments, nil) | |
860 | - | let payments = $ | |
861 | - | let lockFee = $ | |
867 | + | let payments = $t01944519699._1 | |
868 | + | let lockFee = $t01944519699._2 | |
862 | 869 | let paymentsSize = size(payments) | |
863 | 870 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
864 | 871 | then throw(("payments size > " + toString(nCoins))) | |
895 | 902 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
896 | 903 | else { | |
897 | 904 | func parsePayments (acc,assetId) = { | |
898 | - | let $ | |
899 | - | let newBalances = $ | |
900 | - | let i = $ | |
905 | + | let $t02056920595 = acc | |
906 | + | let newBalances = $t02056920595._1 | |
907 | + | let i = $t02056920595._2 | |
901 | 908 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
902 | 909 | then (newBalance + payment.amount) | |
903 | 910 | else newBalance | |
919 | 926 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
920 | 927 | } | |
921 | 928 | ||
922 | - | let $ | |
929 | + | let $t02094521012 = { | |
923 | 930 | let $l = assetIds | |
924 | 931 | let $s = size($l) | |
925 | 932 | let $acc0 = $Tuple2(nil, 0) | |
933 | 940 | ||
934 | 941 | $f0_2($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) | |
935 | 942 | } | |
936 | - | let newBalances = $ | |
937 | - | let k = $ | |
943 | + | let newBalances = $t02094521012._1 | |
944 | + | let k = $t02094521012._2 | |
938 | 945 | if (checkDAppThreshold(newBalances)) | |
939 | 946 | then throw() | |
940 | 947 | else { | |
944 | 951 | else { | |
945 | 952 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
946 | 953 | func calcScriptActions (acc,newBalance) = { | |
947 | - | let $ | |
948 | - | let invBalances = $ | |
949 | - | let scriptActions = $ | |
950 | - | let i = $ | |
954 | + | let $t02133221373 = acc | |
955 | + | let invBalances = $t02133221373._1 | |
956 | + | let scriptActions = $t02133221373._2 | |
957 | + | let i = $t02133221373._3 | |
951 | 958 | if ((shareSupply > 0)) | |
952 | 959 | then { | |
953 | 960 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
959 | 966 | fraction(_fee, difference, feeScale6) | |
960 | 967 | } | |
961 | 968 | let governanceFees = fraction(fees, feeGovernance, feeScale6) | |
969 | + | let teamFees = fraction(fees, feeTeam, feeScale6) | |
962 | 970 | let finalBalance = (newBalance - fees) | |
963 | 971 | let invariantBalance = (newBalance - fees) | |
964 | 972 | let pmt = (newBalance - xp[i]) | |
965 | - | let lpFees = (fees - governanceFees) | |
973 | + | let lpFees = ((fees - governanceFees) - teamFees) | |
966 | 974 | let inv = if ((pmt > 0)) | |
967 | 975 | then stake((pmt - fees), assetIds[i]) | |
968 | 976 | else unstake(fees, assetIds[i]) | |
972 | 980 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)]) | |
973 | 981 | else 0 | |
974 | 982 | if ((airdrop == airdrop)) | |
975 | - | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
983 | + | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), ScriptTransfer(teamBoxAddress, teamFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
976 | 984 | else throw("Strict value is not equal to itself.") | |
977 | 985 | } | |
978 | 986 | else throw("Strict value is not equal to itself.") | |
985 | 993 | } | |
986 | 994 | } | |
987 | 995 | ||
988 | - | let $ | |
996 | + | let $t02324523333 = { | |
989 | 997 | let $l = newBalances | |
990 | 998 | let $s = size($l) | |
991 | 999 | let $acc0 = $Tuple3(nil, nil, 0) | |
999 | 1007 | ||
1000 | 1008 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1001 | 1009 | } | |
1002 | - | let invBalances = $ | |
1003 | - | let scriptActions = $ | |
1010 | + | let invBalances = $t02324523333._1 | |
1011 | + | let scriptActions = $t02324523333._2 | |
1004 | 1012 | let D2 = getDMem(invBalances, amp) | |
1005 | 1013 | let mint_amount = if ((shareSupply == 0)) | |
1006 | 1014 | then D1 | |
1039 | 1047 | let D0 = getDMem(xp, amp) | |
1040 | 1048 | let feeDiscount = calculateFeeDiscount(user) | |
1041 | 1049 | func calcInvBalances (acc,newBalance) = { | |
1042 | - | let $ | |
1043 | - | let invBalances = $ | |
1044 | - | let i = $ | |
1050 | + | let $t02461124637 = acc | |
1051 | + | let invBalances = $t02461124637._1 | |
1052 | + | let i = $t02461124637._2 | |
1045 | 1053 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
1046 | 1054 | let fees = { | |
1047 | 1055 | let idealBalance = fraction(D1, xp[i], D0) | |
1054 | 1062 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
1055 | 1063 | } | |
1056 | 1064 | ||
1057 | - | let $ | |
1065 | + | let $t02523925309 = { | |
1058 | 1066 | let $l = newBalances | |
1059 | 1067 | let $s = size($l) | |
1060 | 1068 | let $acc0 = $Tuple2(nil, 0) | |
1068 | 1076 | ||
1069 | 1077 | $f0_2($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) | |
1070 | 1078 | } | |
1071 | - | let invBalances = $ | |
1072 | - | let k = $ | |
1079 | + | let invBalances = $t02523925309._1 | |
1080 | + | let k = $t02523925309._2 | |
1073 | 1081 | let D2 = getDMem(invBalances, amp) | |
1074 | 1082 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
1075 | 1083 | $Tuple2(nil, mintAmount) | |
1120 | 1128 | let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6) | |
1121 | 1129 | let dy = (_dy - _fee) | |
1122 | 1130 | let governanceFees = fraction(_fee, feeGovernance, feeScale6) | |
1131 | + | let teamFees = fraction(_fee, feeTeam, feeScale6) | |
1123 | 1132 | if (assert((dy >= min_dy))) | |
1124 | 1133 | then throw("Exchange resulted in fewer coins than expected") | |
1125 | 1134 | else { | |
1126 | 1135 | func makeNewBalances (acc,tokenBalance) = { | |
1127 | - | let $ | |
1128 | - | let newBalances = $ | |
1129 | - | let i = $ | |
1136 | + | let $t02753727563 = acc | |
1137 | + | let newBalances = $t02753727563._1 | |
1138 | + | let i = $t02753727563._2 | |
1130 | 1139 | if ((i == fromIndex)) | |
1131 | 1140 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
1132 | 1141 | else if ((i == toIndex)) | |
1134 | 1143 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1135 | 1144 | } | |
1136 | 1145 | ||
1137 | - | let $ | |
1146 | + | let $t02784627907 = { | |
1138 | 1147 | let $l = xp | |
1139 | 1148 | let $s = size($l) | |
1140 | 1149 | let $acc0 = $Tuple2(nil, 0) | |
1148 | 1157 | ||
1149 | 1158 | $f0_2($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) | |
1150 | 1159 | } | |
1151 | - | let newBalances = $ | |
1152 | - | let i = $ | |
1160 | + | let newBalances = $t02784627907._1 | |
1161 | + | let i = $t02784627907._2 | |
1153 | 1162 | if (checkDAppThreshold(newBalances)) | |
1154 | 1163 | then throw() | |
1155 | 1164 | else { | |
1159 | 1168 | let us = unstake(_dy, tokenOut) | |
1160 | 1169 | if ((us == us)) | |
1161 | 1170 | then { | |
1162 | - | let lpFees = (_fee - governanceFees) | |
1171 | + | let lpFees = ((_fee - governanceFees) - teamFees) | |
1163 | 1172 | let airdrop = if ((lpFees > 0)) | |
1164 | 1173 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1165 | 1174 | else 0 | |
1166 | 1175 | if ((airdrop == airdrop)) | |
1167 | - | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58]) | |
1176 | + | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(teamBoxAddress, teamFees, tokenOutB58)], [dy, tokenOutB58]) | |
1168 | 1177 | else throw("Strict value is not equal to itself.") | |
1169 | 1178 | } | |
1170 | 1179 | else throw("Strict value is not equal to itself.") | |
1242 | 1251 | let balances = _xp() | |
1243 | 1252 | let D0 = getDMem(balances, amp) | |
1244 | 1253 | func calcNewBalances (acc,balance) = { | |
1245 | - | let $ | |
1246 | - | let newBalances = $ | |
1247 | - | let i = $ | |
1254 | + | let $t03077930805 = acc | |
1255 | + | let newBalances = $t03077930805._1 | |
1256 | + | let i = $t03077930805._2 | |
1248 | 1257 | let newBalance = (balance + (if (deposit) | |
1249 | 1258 | then amounts[i] | |
1250 | 1259 | else -(amounts[i]))) | |
1329 | 1338 | else { | |
1330 | 1339 | let balances = _xp() | |
1331 | 1340 | func takeExtraFunds (acc,assetId) = { | |
1332 | - | let $ | |
1333 | - | let sum = $ | |
1334 | - | let i = $ | |
1341 | + | let $t03339033408 = acc | |
1342 | + | let sum = $t03339033408._1 | |
1343 | + | let i = $t03339033408._2 | |
1335 | 1344 | let tokenB58 = fromBase58String(assetId) | |
1336 | 1345 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1337 | 1346 | let enrollAmount = (rBalance - balances[i]) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PRECISION = 1000000 | |
5 | 5 | ||
6 | 6 | let MAX_A = 1000000 | |
7 | 7 | ||
8 | 8 | let MAX_A_CHANGE = 10 | |
9 | 9 | ||
10 | 10 | let DECIMALS = 6 | |
11 | 11 | ||
12 | 12 | let MIN_RAMP_TIME = (86400 / 60) | |
13 | 13 | ||
14 | 14 | let version = "3.0.0" | |
15 | 15 | ||
16 | 16 | let kVersion = "version" | |
17 | 17 | ||
18 | 18 | let kAssets = "asset_ids" | |
19 | 19 | ||
20 | 20 | let kAssetBalance = "_balance" | |
21 | 21 | ||
22 | 22 | let kActive = "active" | |
23 | 23 | ||
24 | 24 | let kActiveGlob = "active_all_contracts" | |
25 | 25 | ||
26 | 26 | let kDeprecated = "deprecated_" | |
27 | 27 | ||
28 | 28 | let kCause = "shutdown_cause" | |
29 | 29 | ||
30 | 30 | let kShareAssetId = "share_asset_id" | |
31 | 31 | ||
32 | 32 | let kShareAssetSupply = "share_asset_supply" | |
33 | 33 | ||
34 | 34 | let kFee = "commission" | |
35 | 35 | ||
36 | 36 | let kDAppThresholdCoef = "dAppThresholdCoef" | |
37 | 37 | ||
38 | 38 | let kUSDNAddress = "staking_usdnnsbt_address" | |
39 | 39 | ||
40 | 40 | let kDiscounts = "discounts" | |
41 | 41 | ||
42 | 42 | let kDiscountValues = "discount_values" | |
43 | 43 | ||
44 | 44 | let kUserSwopInGov = "_SWOP_amount" | |
45 | 45 | ||
46 | 46 | let kUserGSwopInGov = "_GSwop_amount" | |
47 | 47 | ||
48 | 48 | let kAdminPubKey1 = "admin_pub_1" | |
49 | 49 | ||
50 | 50 | let kAdminPubKey2 = "admin_pub_2" | |
51 | 51 | ||
52 | 52 | let kAdminPubKey3 = "admin_pub_3" | |
53 | 53 | ||
54 | 54 | let kAdminInvokePubKey = "admin_invoke_pub" | |
55 | 55 | ||
56 | 56 | let kMoneyBoxAddress = "money_box_address" | |
57 | 57 | ||
58 | + | let kTeamBoxAddress = "team_box_address" | |
59 | + | ||
58 | 60 | let kGovAddress = "governance_address" | |
59 | 61 | ||
60 | 62 | let kVotingAddress = "voting_address" | |
61 | 63 | ||
62 | 64 | let kFarmingAddress = "farming_address" | |
63 | 65 | ||
64 | 66 | let kLPFarmingAddress = "lp_farming" | |
65 | 67 | ||
66 | 68 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
67 | 69 | ||
68 | 70 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
69 | 71 | case string: String => | |
70 | 72 | fromBase58String(string) | |
71 | 73 | case nothing => | |
72 | 74 | throw((key + "is empty")) | |
73 | 75 | } | |
74 | 76 | ||
75 | 77 | ||
76 | 78 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
77 | 79 | ||
78 | 80 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
79 | 81 | ||
80 | 82 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
81 | 83 | ||
82 | 84 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
83 | 85 | ||
84 | 86 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
87 | + | ||
88 | + | let teamBoxAddress = Address(getBase58FromOracle(kTeamBoxAddress)) | |
85 | 89 | ||
86 | 90 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
87 | 91 | ||
88 | 92 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
89 | 93 | ||
90 | 94 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
91 | 95 | ||
92 | 96 | let farmingAddress = Address(getBase58FromOracle(kFarmingAddress)) | |
93 | 97 | ||
94 | 98 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
95 | 99 | ||
96 | 100 | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
97 | 101 | ||
98 | 102 | let stakingAssets = [toBase58String(USDN)] | |
99 | 103 | ||
100 | 104 | let active = getBooleanValue(this, kActive) | |
101 | 105 | ||
102 | 106 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
103 | 107 | ||
104 | 108 | let deprecatedPool = valueOrElse(getBoolean(oracle, (kDeprecated + toString(this))), false) | |
105 | 109 | ||
106 | 110 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
107 | 111 | ||
108 | 112 | let shareSupply = getIntegerValue(this, kShareAssetSupply) | |
109 | 113 | ||
110 | 114 | let feeScale6 = 1000000 | |
111 | 115 | ||
112 | 116 | let fee = getIntegerValue(this, kFee) | |
113 | 117 | ||
114 | - | let feeGovernance = fraction(40, feeScale6, 100) | |
118 | + | let feeGovernance = fraction(35, feeScale6, 100) | |
119 | + | ||
120 | + | let feeTeam = fraction(10, feeScale6, 100) | |
115 | 121 | ||
116 | 122 | let initial_A = getIntegerValue(this, "initial_A") | |
117 | 123 | ||
118 | 124 | let future_A = getIntegerValue(this, "future_A") | |
119 | 125 | ||
120 | 126 | let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
121 | 127 | ||
122 | 128 | let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0) | |
123 | 129 | ||
124 | 130 | let assetIds = split(getStringValue(this, kAssets), ",") | |
125 | 131 | ||
126 | 132 | let nCoins = size(assetIds) | |
127 | 133 | ||
128 | 134 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
129 | 135 | ||
130 | 136 | ||
131 | 137 | func throwIsActive () = throw("DApp is already active") | |
132 | 138 | ||
133 | 139 | ||
134 | 140 | func isActive () = if (if (active) | |
135 | 141 | then activeGlob | |
136 | 142 | else false) | |
137 | 143 | then unit | |
138 | 144 | else throw("DApp is inactive at this moment") | |
139 | 145 | ||
140 | 146 | ||
141 | 147 | func isDepricated () = if (!(deprecatedPool)) | |
142 | 148 | then unit | |
143 | 149 | else throw("Pool is deprecated. Only withdraw action allowed.") | |
144 | 150 | ||
145 | 151 | ||
146 | 152 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
147 | 153 | then unit | |
148 | 154 | else throw("Only admin can call this function") | |
149 | 155 | ||
150 | 156 | ||
151 | 157 | func isSelfCall (i) = if ((this == i.caller)) | |
152 | 158 | then unit | |
153 | 159 | else throw("Only contract itself can call this function") | |
154 | 160 | ||
155 | 161 | ||
156 | 162 | let big2 = toBigInt(2) | |
157 | 163 | ||
158 | 164 | let iter10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
159 | 165 | ||
160 | 166 | let iter15 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
161 | 167 | ||
162 | 168 | let iter16 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
163 | 169 | ||
164 | 170 | let blockTimestamp = height | |
165 | 171 | ||
166 | 172 | func assert (a) = if (a) | |
167 | 173 | then false | |
168 | 174 | else true | |
169 | 175 | ||
170 | 176 | ||
171 | 177 | func calculateFeeDiscount (userAddr) = { | |
172 | 178 | let user = match userAddr { | |
173 | 179 | case u: Address => | |
174 | 180 | toString(u) | |
175 | 181 | case u: String => | |
176 | 182 | u | |
177 | 183 | case _ => | |
178 | 184 | throw("Unknow type of user Addr") | |
179 | 185 | } | |
180 | 186 | let swopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), 0) | |
181 | 187 | let gSwopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), swopAmount) | |
182 | 188 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
183 | 189 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
184 | 190 | if (if ((gSwopAmount >= parseIntValue(discountValues[0]))) | |
185 | 191 | then (parseIntValue(discountValues[1]) > gSwopAmount) | |
186 | 192 | else false) | |
187 | 193 | then (feeScale6 - parseIntValue(discounts[0])) | |
188 | 194 | else if (if ((gSwopAmount >= parseIntValue(discountValues[1]))) | |
189 | 195 | then (parseIntValue(discountValues[2]) > gSwopAmount) | |
190 | 196 | else false) | |
191 | 197 | then (feeScale6 - parseIntValue(discounts[1])) | |
192 | 198 | else if (if ((gSwopAmount >= parseIntValue(discountValues[2]))) | |
193 | 199 | then (parseIntValue(discountValues[3]) > gSwopAmount) | |
194 | 200 | else false) | |
195 | 201 | then (feeScale6 - parseIntValue(discounts[2])) | |
196 | 202 | else if (if ((gSwopAmount >= parseIntValue(discountValues[3]))) | |
197 | 203 | then (parseIntValue(discountValues[4]) > gSwopAmount) | |
198 | 204 | else false) | |
199 | 205 | then (feeScale6 - parseIntValue(discounts[3])) | |
200 | 206 | else if ((gSwopAmount >= parseIntValue(discountValues[4]))) | |
201 | 207 | then (feeScale6 - parseIntValue(discounts[4])) | |
202 | 208 | else feeScale6 | |
203 | 209 | } | |
204 | 210 | ||
205 | 211 | ||
206 | 212 | func _A () = { | |
207 | 213 | let t1 = future_A_time | |
208 | 214 | let A1 = future_A | |
209 | 215 | if ((t1 > blockTimestamp)) | |
210 | 216 | then { | |
211 | 217 | let A0 = initial_A | |
212 | 218 | let t0 = initial_A_time | |
213 | 219 | if ((A1 > A0)) | |
214 | 220 | then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0))) | |
215 | 221 | else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0))) | |
216 | 222 | } | |
217 | 223 | else A1 | |
218 | 224 | } | |
219 | 225 | ||
220 | 226 | ||
221 | 227 | func _xp () = { | |
222 | 228 | func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0)) | |
223 | 229 | ||
224 | 230 | let $l = assetIds | |
225 | 231 | let $s = size($l) | |
226 | 232 | let $acc0 = nil | |
227 | 233 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
228 | 234 | then $a | |
229 | 235 | else assetBalances($a, $l[$i]) | |
230 | 236 | ||
231 | 237 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
232 | 238 | then $a | |
233 | 239 | else throw("List size exceeds 10") | |
234 | 240 | ||
235 | 241 | $f0_2($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) | |
236 | 242 | } | |
237 | 243 | ||
238 | 244 | ||
239 | 245 | func _xp_mem (xp) = xp | |
240 | 246 | ||
241 | 247 | ||
242 | 248 | func sumList (acc,element) = (acc + element) | |
243 | 249 | ||
244 | 250 | ||
245 | 251 | func get_D (xp,amp) = { | |
246 | 252 | let @ = invoke(this, "D", [xp, amp], nil) | |
247 | 253 | if ($isInstanceOf(@, "Int")) | |
248 | 254 | then @ | |
249 | 255 | else throw(($getType(@) + " couldn't be cast to Int")) | |
250 | 256 | } | |
251 | 257 | ||
252 | 258 | ||
253 | 259 | func get_D_internal (xp,amp) = { | |
254 | 260 | let S = { | |
255 | 261 | let $l = xp | |
256 | 262 | let $s = size($l) | |
257 | 263 | let $acc0 = 0 | |
258 | 264 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
259 | 265 | then $a | |
260 | 266 | else sumList($a, $l[$i]) | |
261 | 267 | ||
262 | 268 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
263 | 269 | then $a | |
264 | 270 | else throw("List size exceeds 10") | |
265 | 271 | ||
266 | 272 | $f0_2($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) | |
267 | 273 | } | |
268 | 274 | if ((S == 0)) | |
269 | 275 | then 0 | |
270 | 276 | else { | |
271 | 277 | let Ann = (amp * nCoins) | |
272 | 278 | let AnnS = (toBigInt(Ann) * toBigInt(S)) | |
273 | 279 | let Ann1 = toBigInt((Ann - 1)) | |
274 | 280 | func Dproc (acc,i) = if ((acc._2 == true)) | |
275 | 281 | then acc | |
276 | 282 | else { | |
277 | 283 | let Dprev = acc._1 | |
278 | 284 | func D_PProc (D_P,i) = if ((nCoins > i)) | |
279 | 285 | then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins))) | |
280 | 286 | else D_P | |
281 | 287 | ||
282 | 288 | let D_P = { | |
283 | 289 | let $l = iter10 | |
284 | 290 | let $s = size($l) | |
285 | 291 | let $acc0 = Dprev | |
286 | 292 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
287 | 293 | then $a | |
288 | 294 | else D_PProc($a, $l[$i]) | |
289 | 295 | ||
290 | 296 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
291 | 297 | then $a | |
292 | 298 | else throw("List size exceeds 10") | |
293 | 299 | ||
294 | 300 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
295 | 301 | } | |
296 | 302 | let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P))) | |
297 | 303 | if ((D > Dprev)) | |
298 | 304 | then if ((1 >= toInt((D - Dprev)))) | |
299 | 305 | then $Tuple2(D, true) | |
300 | 306 | else $Tuple2(D, false) | |
301 | 307 | else if ((1 >= toInt((Dprev - D)))) | |
302 | 308 | then $Tuple2(D, true) | |
303 | 309 | else $Tuple2(D, false) | |
304 | 310 | } | |
305 | 311 | ||
306 | - | let $ | |
312 | + | let $t070047070 = { | |
307 | 313 | let $l = iter15 | |
308 | 314 | let $s = size($l) | |
309 | 315 | let $acc0 = $Tuple2(toBigInt(S), false) | |
310 | 316 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
311 | 317 | then $a | |
312 | 318 | else Dproc($a, $l[$i]) | |
313 | 319 | ||
314 | 320 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
315 | 321 | then $a | |
316 | 322 | else throw("List size exceeds 15") | |
317 | 323 | ||
318 | 324 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
319 | 325 | } | |
320 | - | let D = $ | |
321 | - | let finished = $ | |
326 | + | let D = $t070047070._1 | |
327 | + | let finished = $t070047070._2 | |
322 | 328 | if ((finished == false)) | |
323 | 329 | then throw(("get_D() not finished with " + toString(D))) | |
324 | 330 | else toInt(D) | |
325 | 331 | } | |
326 | 332 | } | |
327 | 333 | ||
328 | 334 | ||
329 | 335 | func getDMem (xp,amp) = get_D(_xp_mem(xp), amp) | |
330 | 336 | ||
331 | 337 | ||
332 | 338 | func getY (in,out,x,xp_) = if (assert((in != out))) | |
333 | 339 | then throw("same coin") | |
334 | 340 | else if (assert(if ((out >= 0)) | |
335 | 341 | then (in >= 0) | |
336 | 342 | else false)) | |
337 | 343 | then throw("below zero") | |
338 | 344 | else if (assert(if ((nCoins > out)) | |
339 | 345 | then (nCoins > in) | |
340 | 346 | else false)) | |
341 | 347 | then throw("above N_COINS") | |
342 | 348 | else { | |
343 | 349 | let amp = _A() | |
344 | 350 | let D = get_D(xp_, amp) | |
345 | 351 | let Ann = (amp * nCoins) | |
346 | 352 | func S_c (acc,i) = { | |
347 | - | let $ | |
348 | - | let S_ = $ | |
349 | - | let c = $ | |
353 | + | let $t076417658 = acc | |
354 | + | let S_ = $t076417658._1 | |
355 | + | let c = $t076417658._2 | |
350 | 356 | let x_ = if ((in == i)) | |
351 | 357 | then x | |
352 | 358 | else xp_[i] | |
353 | 359 | if (if ((i != out)) | |
354 | 360 | then (nCoins > i) | |
355 | 361 | else false) | |
356 | 362 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
357 | 363 | else $Tuple2(S_, c) | |
358 | 364 | } | |
359 | 365 | ||
360 | - | let $ | |
366 | + | let $t078667921 = { | |
361 | 367 | let $l = iter10 | |
362 | 368 | let $s = size($l) | |
363 | 369 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
364 | 370 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
365 | 371 | then $a | |
366 | 372 | else S_c($a, $l[$i]) | |
367 | 373 | ||
368 | 374 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
369 | 375 | then $a | |
370 | 376 | else throw("List size exceeds 10") | |
371 | 377 | ||
372 | 378 | $f0_2($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) | |
373 | 379 | } | |
374 | - | let S_ = $ | |
375 | - | let c_ = $ | |
380 | + | let S_ = $t078667921._1 | |
381 | + | let c_ = $t078667921._2 | |
376 | 382 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
377 | 383 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
378 | 384 | func y_proc (acc,_i) = if ((acc._2 == true)) | |
379 | 385 | then acc | |
380 | 386 | else { | |
381 | 387 | let y_prev = acc._1 | |
382 | 388 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
383 | 389 | if ((y > y_prev)) | |
384 | 390 | then if ((1 >= toInt((y - y_prev)))) | |
385 | 391 | then $Tuple2(y, true) | |
386 | 392 | else $Tuple2(y, false) | |
387 | 393 | else if ((1 >= toInt((y_prev - y)))) | |
388 | 394 | then $Tuple2(y, true) | |
389 | 395 | else $Tuple2(y, false) | |
390 | 396 | } | |
391 | 397 | ||
392 | - | let $ | |
398 | + | let $t084038470 = { | |
393 | 399 | let $l = iter16 | |
394 | 400 | let $s = size($l) | |
395 | 401 | let $acc0 = $Tuple2(toBigInt(D), false) | |
396 | 402 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
397 | 403 | then $a | |
398 | 404 | else y_proc($a, $l[$i]) | |
399 | 405 | ||
400 | 406 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
401 | 407 | then $a | |
402 | 408 | else throw("List size exceeds 16") | |
403 | 409 | ||
404 | 410 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
405 | 411 | } | |
406 | - | let y = $ | |
407 | - | let finished = $ | |
412 | + | let y = $t084038470._1 | |
413 | + | let finished = $t084038470._2 | |
408 | 414 | if ((finished == false)) | |
409 | 415 | then throw(("getY() not finished with " + toString(y))) | |
410 | 416 | else toInt(y) | |
411 | 417 | } | |
412 | 418 | ||
413 | 419 | ||
414 | 420 | func get_y_D (A_,in,xp,D) = if (assert((in >= 0))) | |
415 | 421 | then throw("i below zero") | |
416 | 422 | else if (assert((nCoins > in))) | |
417 | 423 | then throw("i above N_COINS") | |
418 | 424 | else { | |
419 | 425 | let Ann = (A_ * nCoins) | |
420 | 426 | func S_c (acc,i) = { | |
421 | - | let $ | |
422 | - | let S_ = $ | |
423 | - | let c = $ | |
427 | + | let $t088498866 = acc | |
428 | + | let S_ = $t088498866._1 | |
429 | + | let c = $t088498866._2 | |
424 | 430 | let x_ = if (if ((in != i)) | |
425 | 431 | then (nCoins > i) | |
426 | 432 | else false) | |
427 | 433 | then xp[i] | |
428 | 434 | else 0 | |
429 | 435 | if (if ((nCoins > i)) | |
430 | 436 | then (in != i) | |
431 | 437 | else false) | |
432 | 438 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
433 | 439 | else $Tuple2(S_, c) | |
434 | 440 | } | |
435 | 441 | ||
436 | - | let $ | |
442 | + | let $t090869141 = { | |
437 | 443 | let $l = iter10 | |
438 | 444 | let $s = size($l) | |
439 | 445 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
440 | 446 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
441 | 447 | then $a | |
442 | 448 | else S_c($a, $l[$i]) | |
443 | 449 | ||
444 | 450 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
445 | 451 | then $a | |
446 | 452 | else throw("List size exceeds 10") | |
447 | 453 | ||
448 | 454 | $f0_2($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) | |
449 | 455 | } | |
450 | - | let S_ = $ | |
451 | - | let c_ = $ | |
456 | + | let S_ = $t090869141._1 | |
457 | + | let c_ = $t090869141._2 | |
452 | 458 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
453 | 459 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
454 | 460 | func y_D_proc (acc,i) = if ((acc._2 == true)) | |
455 | 461 | then acc | |
456 | 462 | else { | |
457 | 463 | let y_prev = acc._1 | |
458 | 464 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
459 | 465 | if ((y > y_prev)) | |
460 | 466 | then if ((1 >= toInt((y - y_prev)))) | |
461 | 467 | then $Tuple2(y, true) | |
462 | 468 | else $Tuple2(y, false) | |
463 | 469 | else if ((1 >= toInt((y_prev - y)))) | |
464 | 470 | then $Tuple2(y, true) | |
465 | 471 | else $Tuple2(y, false) | |
466 | 472 | } | |
467 | 473 | ||
468 | - | let $ | |
474 | + | let $t096249693 = { | |
469 | 475 | let $l = iter16 | |
470 | 476 | let $s = size($l) | |
471 | 477 | let $acc0 = $Tuple2(toBigInt(D), false) | |
472 | 478 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
473 | 479 | then $a | |
474 | 480 | else y_D_proc($a, $l[$i]) | |
475 | 481 | ||
476 | 482 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
477 | 483 | then $a | |
478 | 484 | else throw("List size exceeds 16") | |
479 | 485 | ||
480 | 486 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
481 | 487 | } | |
482 | - | let y = $ | |
483 | - | let finished = $ | |
488 | + | let y = $t096249693._1 | |
489 | + | let finished = $t096249693._2 | |
484 | 490 | if ((finished == false)) | |
485 | 491 | then throw(("get_y_D() not finished with " + toString(y))) | |
486 | 492 | else toInt(y) | |
487 | 493 | } | |
488 | 494 | ||
489 | 495 | ||
490 | 496 | func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = { | |
491 | 497 | let feeDiscount = calculateFeeDiscount(caller) | |
492 | 498 | let amp = _A() | |
493 | 499 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
494 | 500 | let total_supply = shareSupply | |
495 | 501 | let D0 = get_D(xp, amp) | |
496 | 502 | let D1 = (D0 - fraction(_token_amount, D0, total_supply)) | |
497 | 503 | let new_y = get_y_D(amp, i, xp, D1) | |
498 | 504 | let dy_0 = (xp[i] - new_y) | |
499 | 505 | func xp_reduced_proc (acc,xp_j) = { | |
500 | - | let $ | |
501 | - | let xp_reduced = $ | |
502 | - | let index = $ | |
506 | + | let $t01033410363 = acc | |
507 | + | let xp_reduced = $t01033410363._1 | |
508 | + | let index = $t01033410363._2 | |
503 | 509 | let dx_expected = if ((index == i)) | |
504 | 510 | then (fraction(xp_j, D1, D0) - new_y) | |
505 | 511 | else (xp_j - fraction(xp_j, D1, D0)) | |
506 | 512 | $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1)) | |
507 | 513 | } | |
508 | 514 | ||
509 | - | let $ | |
515 | + | let $t01062510689 = { | |
510 | 516 | let $l = xp | |
511 | 517 | let $s = size($l) | |
512 | 518 | let $acc0 = $Tuple2(nil, 0) | |
513 | 519 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
514 | 520 | then $a | |
515 | 521 | else xp_reduced_proc($a, $l[$i]) | |
516 | 522 | ||
517 | 523 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
518 | 524 | then $a | |
519 | 525 | else throw("List size exceeds 10") | |
520 | 526 | ||
521 | 527 | $f0_2($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) | |
522 | 528 | } | |
523 | - | let xp_reduced = $ | |
524 | - | let index = $ | |
529 | + | let xp_reduced = $t01062510689._1 | |
530 | + | let index = $t01062510689._2 | |
525 | 531 | let xp_reduced_i = xp_reduced[i] | |
526 | 532 | let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1) | |
527 | 533 | $Tuple2(dy, (dy_0 - dy)) | |
528 | 534 | } | |
529 | 535 | ||
530 | 536 | ||
531 | 537 | func getStrAssetId (assetId) = match assetId { | |
532 | 538 | case id: ByteVector => | |
533 | 539 | toBase58String(id) | |
534 | 540 | case waves: Unit => | |
535 | 541 | "WAVES" | |
536 | 542 | case _ => | |
537 | 543 | throw("Match error") | |
538 | 544 | } | |
539 | 545 | ||
540 | 546 | ||
541 | 547 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
542 | 548 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
543 | 549 | else $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
544 | 550 | ||
545 | 551 | ||
546 | 552 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
547 | 553 | then { | |
548 | - | let $ | |
549 | - | let call = $ | |
550 | - | let stakingAddr = $ | |
554 | + | let $t01125311319 = calcStakingFuncAndAddres(stake, assetId) | |
555 | + | let call = $t01125311319._1 | |
556 | + | let stakingAddr = $t01125311319._2 | |
551 | 557 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
552 | 558 | } | |
553 | 559 | else { | |
554 | - | let $ | |
555 | - | let call = $ | |
556 | - | let stakingAddr = $ | |
560 | + | let $t01140511471 = calcStakingFuncAndAddres(stake, assetId) | |
561 | + | let call = $t01140511471._1 | |
562 | + | let stakingAddr = $t01140511471._2 | |
557 | 563 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
558 | 564 | } | |
559 | 565 | ||
560 | 566 | ||
561 | 567 | func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
562 | 568 | then { | |
563 | - | let $ | |
564 | - | let call = $ | |
565 | - | let addr = $ | |
566 | - | let params = $ | |
567 | - | let payments = $ | |
569 | + | let $t01165811760 = calcStakingParams(true, amount, fromBase58String(assetIdString)) | |
570 | + | let call = $t01165811760._1 | |
571 | + | let addr = $t01165811760._2 | |
572 | + | let params = $t01165811760._3 | |
573 | + | let payments = $t01165811760._4 | |
568 | 574 | invoke(addr, call, params, payments) | |
569 | 575 | } | |
570 | 576 | else 0 | |
571 | 577 | ||
572 | 578 | ||
573 | 579 | func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
574 | 580 | then { | |
575 | - | let $ | |
576 | - | let call = $ | |
577 | - | let addr = $ | |
578 | - | let params = $ | |
579 | - | let payments = $ | |
581 | + | let $t01194512048 = calcStakingParams(false, amount, fromBase58String(assetIdString)) | |
582 | + | let call = $t01194512048._1 | |
583 | + | let addr = $t01194512048._2 | |
584 | + | let params = $t01194512048._3 | |
585 | + | let payments = $t01194512048._4 | |
580 | 586 | invoke(addr, call, params, payments) | |
581 | 587 | } | |
582 | 588 | else 0 | |
583 | 589 | ||
584 | 590 | ||
585 | 591 | func stakedAmount (assetId) = { | |
586 | 592 | let stakedAmountCalculated = match assetId { | |
587 | 593 | case aId: ByteVector => | |
588 | 594 | if ((aId == USDN)) | |
589 | 595 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
590 | 596 | else 0 | |
591 | 597 | case _: Unit => | |
592 | 598 | 0 | |
593 | 599 | case _ => | |
594 | 600 | throw("Match error") | |
595 | 601 | } | |
596 | 602 | match stakedAmountCalculated { | |
597 | 603 | case i: Int => | |
598 | 604 | i | |
599 | 605 | case _ => | |
600 | 606 | 0 | |
601 | 607 | } | |
602 | 608 | } | |
603 | 609 | ||
604 | 610 | ||
605 | 611 | func checkSuspicious () = { | |
606 | 612 | let contractBalances = _xp() | |
607 | 613 | func checkBalance (acc,assetId) = { | |
608 | - | let $ | |
609 | - | let suspicious = $ | |
610 | - | let i = $ | |
614 | + | let $t01265912684 = acc | |
615 | + | let suspicious = $t01265912684._1 | |
616 | + | let i = $t01265912684._2 | |
611 | 617 | if (suspicious) | |
612 | 618 | then $Tuple2(suspicious, i) | |
613 | 619 | else { | |
614 | 620 | let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId))) | |
615 | 621 | if ((contractBalances[i] > aBalance)) | |
616 | 622 | then $Tuple2(true, i) | |
617 | 623 | else $Tuple2(false, (i + 1)) | |
618 | 624 | } | |
619 | 625 | } | |
620 | 626 | ||
621 | 627 | let $l = assetIds | |
622 | 628 | let $s = size($l) | |
623 | 629 | let $acc0 = $Tuple2(false, 0) | |
624 | 630 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
625 | 631 | then $a | |
626 | 632 | else checkBalance($a, $l[$i]) | |
627 | 633 | ||
628 | 634 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
629 | 635 | then $a | |
630 | 636 | else throw("List size exceeds 10") | |
631 | 637 | ||
632 | 638 | $f0_2($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) | |
633 | 639 | } | |
634 | 640 | ||
635 | 641 | ||
636 | 642 | func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i])) | |
637 | 643 | ||
638 | 644 | ||
639 | 645 | func returnPayments (caller,payments) = { | |
640 | 646 | func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId)) | |
641 | 647 | ||
642 | 648 | let $l = payments | |
643 | 649 | let $s = size($l) | |
644 | 650 | let $acc0 = nil | |
645 | 651 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
646 | 652 | then $a | |
647 | 653 | else parsePayments($a, $l[$i]) | |
648 | 654 | ||
649 | 655 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
650 | 656 | then $a | |
651 | 657 | else throw("List size exceeds 10") | |
652 | 658 | ||
653 | 659 | $f0_2($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) | |
654 | 660 | } | |
655 | 661 | ||
656 | 662 | ||
657 | 663 | func checkDAppThreshold (newBalances) = { | |
658 | 664 | let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key") | |
659 | 665 | let thresholdScale = 10000 | |
660 | 666 | let maxBalance = max(newBalances) | |
661 | 667 | let minBalance = min(newBalances) | |
662 | 668 | let ratio = fraction(maxBalance, thresholdScale, minBalance) | |
663 | 669 | if ((ratio > (dAppThresholdCoef * thresholdScale))) | |
664 | 670 | then throw("New balance in assets of the DApp is less than threshold") | |
665 | 671 | else false | |
666 | 672 | } | |
667 | 673 | ||
668 | 674 | ||
669 | 675 | func checkCoins (assetIds) = { | |
670 | 676 | let coins = split(assetIds, ",") | |
671 | 677 | if ((size(coins) > 10)) | |
672 | 678 | then throw("To many coins, max coins size 10") | |
673 | 679 | else { | |
674 | 680 | func checkCoin (error,assetId) = { | |
675 | 681 | let asset = valueOrErrorMessage(fromBase58String(assetId), ("fromBase58String: " + assetId)) | |
676 | 682 | let decimals = valueOrErrorMessage(assetInfo(asset), ("assetInfo: " + assetId)).decimals | |
677 | 683 | if ((decimals != DECIMALS)) | |
678 | 684 | then throw("wrong decimals") | |
679 | 685 | else false | |
680 | 686 | } | |
681 | 687 | ||
682 | 688 | let $l = coins | |
683 | 689 | let $s = size($l) | |
684 | 690 | let $acc0 = false | |
685 | 691 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
686 | 692 | then $a | |
687 | 693 | else checkCoin($a, $l[$i]) | |
688 | 694 | ||
689 | 695 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
690 | 696 | then $a | |
691 | 697 | else throw("List size exceeds 10") | |
692 | 698 | ||
693 | 699 | $f0_2($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) | |
694 | 700 | } | |
695 | 701 | } | |
696 | 702 | ||
697 | 703 | ||
698 | 704 | func calcWithdraw (msg,minAmounts,unlockAmount) = { | |
699 | 705 | let suspicious = checkSuspicious() | |
700 | 706 | if (suspicious._1) | |
701 | 707 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
702 | 708 | else { | |
703 | 709 | let pmtAmount = if ((size(msg.payments) > 0)) | |
704 | 710 | then if ((size(msg.payments) != 1)) | |
705 | 711 | then throw("size(payments) != 1") | |
706 | 712 | else { | |
707 | 713 | let pmtAssetId = msg.payments[0].assetId | |
708 | 714 | if ((shareAssetId != pmtAssetId)) | |
709 | 715 | then throw("unknown payment token") | |
710 | 716 | else msg.payments[0].amount | |
711 | 717 | } | |
712 | 718 | else 0 | |
713 | 719 | let withdrawAmount = (pmtAmount + unlockAmount) | |
714 | 720 | func calcScriptActions (acc,balance) = { | |
715 | - | let $ | |
716 | - | let scriptActions = $ | |
717 | - | let i = $ | |
721 | + | let $t01510015128 = acc | |
722 | + | let scriptActions = $t01510015128._1 | |
723 | + | let i = $t01510015128._2 | |
718 | 724 | let wAmount = fraction(balance, withdrawAmount, shareSupply) | |
719 | 725 | if (assert((wAmount >= minAmounts[i]))) | |
720 | 726 | then throw("Withdrawal resulted in fewer coins than expected") | |
721 | 727 | else { | |
722 | 728 | let us = unstake(wAmount, assetIds[i]) | |
723 | 729 | if ((us == us)) | |
724 | 730 | then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.caller, wAmount, fromBase58String(assetIds[i]))]), (i + 1)) | |
725 | 731 | else throw("Strict value is not equal to itself.") | |
726 | 732 | } | |
727 | 733 | } | |
728 | 734 | ||
729 | - | let $ | |
735 | + | let $t01561715685 = { | |
730 | 736 | let $l = _xp() | |
731 | 737 | let $s = size($l) | |
732 | 738 | let $acc0 = $Tuple2(nil, 0) | |
733 | 739 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
734 | 740 | then $a | |
735 | 741 | else calcScriptActions($a, $l[$i]) | |
736 | 742 | ||
737 | 743 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
738 | 744 | then $a | |
739 | 745 | else throw("List size exceeds 10") | |
740 | 746 | ||
741 | 747 | $f0_2($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) | |
742 | 748 | } | |
743 | - | let scriptActions = $ | |
744 | - | let i = $ | |
749 | + | let scriptActions = $t01561715685._1 | |
750 | + | let i = $t01561715685._2 | |
745 | 751 | (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]) | |
746 | 752 | } | |
747 | 753 | } | |
748 | 754 | ||
749 | 755 | ||
750 | 756 | func calcWithdrawOneCoinEntries (msg,tokenOut,minAmount,unlockAmount) = { | |
751 | 757 | let suspicious = checkSuspicious() | |
752 | 758 | if (suspicious._1) | |
753 | 759 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
754 | 760 | else { | |
755 | 761 | let pmtAmount = if ((size(msg.payments) > 0)) | |
756 | 762 | then { | |
757 | 763 | let pmtAssetId = msg.payments[0].assetId | |
758 | 764 | if ((shareAssetId != pmtAssetId)) | |
759 | 765 | then throw("unknown payment token") | |
760 | 766 | else msg.payments[0].amount | |
761 | 767 | } | |
762 | 768 | else 0 | |
763 | 769 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
764 | 770 | let tokenOutB58 = fromBase58String(tokenOut) | |
765 | 771 | let withdrawAmount = (pmtAmount + unlockAmount) | |
766 | 772 | let xp = _xp() | |
767 | - | let $ | |
768 | - | let dy = $ | |
769 | - | let dy_fee = $ | |
773 | + | let $t01654716634 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.originCaller) | |
774 | + | let dy = $t01654716634._1 | |
775 | + | let dy_fee = $t01654716634._2 | |
770 | 776 | if (assert((dy >= minAmount))) | |
771 | 777 | then throw("Not enough coins removed") | |
772 | 778 | else { | |
773 | 779 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
780 | + | let teamFees = fraction(dy_fee, feeTeam, feeScale6) | |
774 | 781 | let dy_and_fee = (dy + dy_fee) | |
775 | 782 | func makeNewBalances (acc,tokenBalance) = { | |
776 | - | let $ | |
777 | - | let newBalances = $ | |
778 | - | let i = $ | |
783 | + | let $t01694816974 = acc | |
784 | + | let newBalances = $t01694816974._1 | |
785 | + | let i = $t01694816974._2 | |
779 | 786 | if ((i == outIndex)) | |
780 | 787 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
781 | 788 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
782 | 789 | } | |
783 | 790 | ||
784 | - | let $ | |
791 | + | let $t01714117202 = { | |
785 | 792 | let $l = xp | |
786 | 793 | let $s = size($l) | |
787 | 794 | let $acc0 = $Tuple2(nil, 0) | |
788 | 795 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
789 | 796 | then $a | |
790 | 797 | else makeNewBalances($a, $l[$i]) | |
791 | 798 | ||
792 | 799 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
793 | 800 | then $a | |
794 | 801 | else throw("List size exceeds 10") | |
795 | 802 | ||
796 | 803 | $f0_2($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) | |
797 | 804 | } | |
798 | - | let newBalances = $ | |
799 | - | let v = $ | |
805 | + | let newBalances = $t01714117202._1 | |
806 | + | let v = $t01714117202._2 | |
800 | 807 | if (checkDAppThreshold(newBalances)) | |
801 | 808 | then throw() | |
802 | 809 | else { | |
803 | 810 | let us = unstake(dy_and_fee, tokenOut) | |
804 | 811 | if ((us == us)) | |
805 | 812 | then { | |
806 | - | let lpFees = (dy_fee - governanceFees) | |
813 | + | let lpFees = ((dy_fee - governanceFees) - teamFees) | |
807 | 814 | let airdrop = if ((lpFees > 0)) | |
808 | 815 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
809 | 816 | else 0 | |
810 | 817 | if ((airdrop == airdrop)) | |
811 | - | then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))] | |
818 | + | then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(teamBoxAddress, teamFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))] | |
812 | 819 | else throw("Strict value is not equal to itself.") | |
813 | 820 | } | |
814 | 821 | else throw("Strict value is not equal to itself.") | |
815 | 822 | } | |
816 | 823 | } | |
817 | 824 | } | |
818 | 825 | } | |
819 | 826 | ||
820 | 827 | ||
821 | 828 | @Callable(msg) | |
822 | 829 | func D (xp,amp) = { | |
823 | 830 | let D = get_D_internal(xp, amp) | |
824 | 831 | $Tuple2([IntegerEntry("D", D)], D) | |
825 | 832 | } | |
826 | 833 | ||
827 | 834 | ||
828 | 835 | ||
829 | 836 | @Callable(msg) | |
830 | 837 | func init (assetIds,_A,_dAppThresholdCoef) = if (!(isDataStorageUntouched(this))) | |
831 | 838 | then throw("Already initialized") | |
832 | 839 | else if ((0 >= _A)) | |
833 | 840 | then throw("Amp must be must > 0") | |
834 | 841 | else if ((0 >= _dAppThresholdCoef)) | |
835 | 842 | then throw("dApp Threshold Coef must be > 0") | |
836 | 843 | else { | |
837 | 844 | let shareName = "s_Multi_USD" | |
838 | 845 | let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
839 | 846 | let issueToken = Issue(shareName, shareDescription, 0, 6, true) | |
840 | 847 | let tokenId = calculateAssetId(issueToken) | |
841 | 848 | if (checkCoins(assetIds)) | |
842 | 849 | then throw() | |
843 | 850 | else [StringEntry(kVersion, version), StringEntry(kAssets, assetIds), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), IntegerEntry(kDAppThresholdCoef, _dAppThresholdCoef), BooleanEntry(kActive, true), issueToken] | |
844 | 851 | } | |
845 | 852 | ||
846 | 853 | ||
847 | 854 | ||
848 | 855 | @Callable(msg) | |
849 | 856 | func addLiquidity (minMintAmount,stakeFarming,lockType) = valueOrElse(isActive(), valueOrElse(isDepricated(), { | |
850 | 857 | let amp = _A() | |
851 | 858 | let xp = _xp() | |
852 | 859 | let D0 = if ((shareSupply == 0)) | |
853 | 860 | then 0 | |
854 | 861 | else getDMem(xp, amp) | |
855 | - | let $ | |
862 | + | let $t01944519699 = if (if ((lockType > 0)) | |
856 | 863 | then (msg.payments[(size(msg.payments) - 1)].assetId == unit) | |
857 | 864 | else false) | |
858 | 865 | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
859 | 866 | else $Tuple2(msg.payments, nil) | |
860 | - | let payments = $ | |
861 | - | let lockFee = $ | |
867 | + | let payments = $t01944519699._1 | |
868 | + | let lockFee = $t01944519699._2 | |
862 | 869 | let paymentsSize = size(payments) | |
863 | 870 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
864 | 871 | then throw(("payments size > " + toString(nCoins))) | |
865 | 872 | else if ((1 > paymentsSize)) | |
866 | 873 | then throw("payments size < 1") | |
867 | 874 | else if (if ((shareSupply == 0)) | |
868 | 875 | then (nCoins != paymentsSize) | |
869 | 876 | else false) | |
870 | 877 | then throw("initial deposit requires all coins") | |
871 | 878 | else { | |
872 | 879 | func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId))) | |
873 | 880 | then true | |
874 | 881 | else throw("Invalid asset in payment") | |
875 | 882 | ||
876 | 883 | let $l = payments | |
877 | 884 | let $s = size($l) | |
878 | 885 | let $acc0 = false | |
879 | 886 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
880 | 887 | then $a | |
881 | 888 | else paymantValid($a, $l[$i]) | |
882 | 889 | ||
883 | 890 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
884 | 891 | then $a | |
885 | 892 | else throw("List size exceeds 10") | |
886 | 893 | ||
887 | 894 | $f0_2($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) | |
888 | 895 | } | |
889 | 896 | ||
890 | 897 | if (!(validPayments(paymentsSize))) | |
891 | 898 | then throw() | |
892 | 899 | else { | |
893 | 900 | let suspicious = checkSuspicious() | |
894 | 901 | if (suspicious._1) | |
895 | 902 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
896 | 903 | else { | |
897 | 904 | func parsePayments (acc,assetId) = { | |
898 | - | let $ | |
899 | - | let newBalances = $ | |
900 | - | let i = $ | |
905 | + | let $t02056920595 = acc | |
906 | + | let newBalances = $t02056920595._1 | |
907 | + | let i = $t02056920595._2 | |
901 | 908 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
902 | 909 | then (newBalance + payment.amount) | |
903 | 910 | else newBalance | |
904 | 911 | ||
905 | 912 | let newBalace = { | |
906 | 913 | let $l = payments | |
907 | 914 | let $s = size($l) | |
908 | 915 | let $acc0 = xp[i] | |
909 | 916 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
910 | 917 | then $a | |
911 | 918 | else parsePayment($a, $l[$i]) | |
912 | 919 | ||
913 | 920 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
914 | 921 | then $a | |
915 | 922 | else throw("List size exceeds 10") | |
916 | 923 | ||
917 | 924 | $f0_2($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) | |
918 | 925 | } | |
919 | 926 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
920 | 927 | } | |
921 | 928 | ||
922 | - | let $ | |
929 | + | let $t02094521012 = { | |
923 | 930 | let $l = assetIds | |
924 | 931 | let $s = size($l) | |
925 | 932 | let $acc0 = $Tuple2(nil, 0) | |
926 | 933 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
927 | 934 | then $a | |
928 | 935 | else parsePayments($a, $l[$i]) | |
929 | 936 | ||
930 | 937 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
931 | 938 | then $a | |
932 | 939 | else throw("List size exceeds 10") | |
933 | 940 | ||
934 | 941 | $f0_2($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) | |
935 | 942 | } | |
936 | - | let newBalances = $ | |
937 | - | let k = $ | |
943 | + | let newBalances = $t02094521012._1 | |
944 | + | let k = $t02094521012._2 | |
938 | 945 | if (checkDAppThreshold(newBalances)) | |
939 | 946 | then throw() | |
940 | 947 | else { | |
941 | 948 | let D1 = getDMem(newBalances, amp) | |
942 | 949 | if (assert((D1 > D0))) | |
943 | 950 | then throw("D1 > D0") | |
944 | 951 | else { | |
945 | 952 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
946 | 953 | func calcScriptActions (acc,newBalance) = { | |
947 | - | let $ | |
948 | - | let invBalances = $ | |
949 | - | let scriptActions = $ | |
950 | - | let i = $ | |
954 | + | let $t02133221373 = acc | |
955 | + | let invBalances = $t02133221373._1 | |
956 | + | let scriptActions = $t02133221373._2 | |
957 | + | let i = $t02133221373._3 | |
951 | 958 | if ((shareSupply > 0)) | |
952 | 959 | then { | |
953 | 960 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
954 | 961 | let fees = { | |
955 | 962 | let idealBalance = fraction(D1, xp[i], D0) | |
956 | 963 | let difference = if ((idealBalance > newBalance)) | |
957 | 964 | then (idealBalance - newBalance) | |
958 | 965 | else (newBalance - idealBalance) | |
959 | 966 | fraction(_fee, difference, feeScale6) | |
960 | 967 | } | |
961 | 968 | let governanceFees = fraction(fees, feeGovernance, feeScale6) | |
969 | + | let teamFees = fraction(fees, feeTeam, feeScale6) | |
962 | 970 | let finalBalance = (newBalance - fees) | |
963 | 971 | let invariantBalance = (newBalance - fees) | |
964 | 972 | let pmt = (newBalance - xp[i]) | |
965 | - | let lpFees = (fees - governanceFees) | |
973 | + | let lpFees = ((fees - governanceFees) - teamFees) | |
966 | 974 | let inv = if ((pmt > 0)) | |
967 | 975 | then stake((pmt - fees), assetIds[i]) | |
968 | 976 | else unstake(fees, assetIds[i]) | |
969 | 977 | if ((inv == inv)) | |
970 | 978 | then { | |
971 | 979 | let airdrop = if ((lpFees > 0)) | |
972 | 980 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)]) | |
973 | 981 | else 0 | |
974 | 982 | if ((airdrop == airdrop)) | |
975 | - | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
983 | + | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), ScriptTransfer(teamBoxAddress, teamFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
976 | 984 | else throw("Strict value is not equal to itself.") | |
977 | 985 | } | |
978 | 986 | else throw("Strict value is not equal to itself.") | |
979 | 987 | } | |
980 | 988 | else { | |
981 | 989 | let inv = stake(newBalance, assetIds[i]) | |
982 | 990 | if ((inv == inv)) | |
983 | 991 | then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1)) | |
984 | 992 | else throw("Strict value is not equal to itself.") | |
985 | 993 | } | |
986 | 994 | } | |
987 | 995 | ||
988 | - | let $ | |
996 | + | let $t02324523333 = { | |
989 | 997 | let $l = newBalances | |
990 | 998 | let $s = size($l) | |
991 | 999 | let $acc0 = $Tuple3(nil, nil, 0) | |
992 | 1000 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
993 | 1001 | then $a | |
994 | 1002 | else calcScriptActions($a, $l[$i]) | |
995 | 1003 | ||
996 | 1004 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
997 | 1005 | then $a | |
998 | 1006 | else throw("List size exceeds 10") | |
999 | 1007 | ||
1000 | 1008 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1001 | 1009 | } | |
1002 | - | let invBalances = $ | |
1003 | - | let scriptActions = $ | |
1010 | + | let invBalances = $t02324523333._1 | |
1011 | + | let scriptActions = $t02324523333._2 | |
1004 | 1012 | let D2 = getDMem(invBalances, amp) | |
1005 | 1013 | let mint_amount = if ((shareSupply == 0)) | |
1006 | 1014 | then D1 | |
1007 | 1015 | else fraction(shareSupply, (D2 - D0), D0) | |
1008 | 1016 | if (assert((mint_amount >= minMintAmount))) | |
1009 | 1017 | then throw("Slippage screwed you") | |
1010 | 1018 | else if (stakeFarming) | |
1011 | 1019 | then { | |
1012 | 1020 | let re = invoke(this, "reissueShare", [mint_amount], nil) | |
1013 | 1021 | if ((re == re)) | |
1014 | 1022 | then { | |
1015 | 1023 | let s = invoke(farmingAddress, "lockShareTokensFromPool", [msg.caller.bytes, toString(this), lockType], ([AttachedPayment(shareAssetId, mint_amount)] ++ lockFee)) | |
1016 | 1024 | if ((s == s)) | |
1017 | 1025 | then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))) | |
1018 | 1026 | else throw("Strict value is not equal to itself.") | |
1019 | 1027 | } | |
1020 | 1028 | else throw("Strict value is not equal to itself.") | |
1021 | 1029 | } | |
1022 | 1030 | else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))]) | |
1023 | 1031 | } | |
1024 | 1032 | } | |
1025 | 1033 | } | |
1026 | 1034 | } | |
1027 | 1035 | })) | |
1028 | 1036 | ||
1029 | 1037 | ||
1030 | 1038 | ||
1031 | 1039 | @Callable(msg) | |
1032 | 1040 | func calcMintAmount (newBalances,user) = { | |
1033 | 1041 | let amp = _A() | |
1034 | 1042 | let xp = _xp() | |
1035 | 1043 | let D1 = getDMem(newBalances, amp) | |
1036 | 1044 | if ((shareSupply == 0)) | |
1037 | 1045 | then $Tuple2(nil, D1) | |
1038 | 1046 | else { | |
1039 | 1047 | let D0 = getDMem(xp, amp) | |
1040 | 1048 | let feeDiscount = calculateFeeDiscount(user) | |
1041 | 1049 | func calcInvBalances (acc,newBalance) = { | |
1042 | - | let $ | |
1043 | - | let invBalances = $ | |
1044 | - | let i = $ | |
1050 | + | let $t02461124637 = acc | |
1051 | + | let invBalances = $t02461124637._1 | |
1052 | + | let i = $t02461124637._2 | |
1045 | 1053 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
1046 | 1054 | let fees = { | |
1047 | 1055 | let idealBalance = fraction(D1, xp[i], D0) | |
1048 | 1056 | let difference = if ((idealBalance > newBalance)) | |
1049 | 1057 | then (idealBalance - newBalance) | |
1050 | 1058 | else (newBalance - idealBalance) | |
1051 | 1059 | fraction(_fee, difference, feeScale6) | |
1052 | 1060 | } | |
1053 | 1061 | let invariantBalance = (newBalance - fees) | |
1054 | 1062 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
1055 | 1063 | } | |
1056 | 1064 | ||
1057 | - | let $ | |
1065 | + | let $t02523925309 = { | |
1058 | 1066 | let $l = newBalances | |
1059 | 1067 | let $s = size($l) | |
1060 | 1068 | let $acc0 = $Tuple2(nil, 0) | |
1061 | 1069 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1062 | 1070 | then $a | |
1063 | 1071 | else calcInvBalances($a, $l[$i]) | |
1064 | 1072 | ||
1065 | 1073 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1066 | 1074 | then $a | |
1067 | 1075 | else throw("List size exceeds 10") | |
1068 | 1076 | ||
1069 | 1077 | $f0_2($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) | |
1070 | 1078 | } | |
1071 | - | let invBalances = $ | |
1072 | - | let k = $ | |
1079 | + | let invBalances = $t02523925309._1 | |
1080 | + | let k = $t02523925309._2 | |
1073 | 1081 | let D2 = getDMem(invBalances, amp) | |
1074 | 1082 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
1075 | 1083 | $Tuple2(nil, mintAmount) | |
1076 | 1084 | } | |
1077 | 1085 | } | |
1078 | 1086 | ||
1079 | 1087 | ||
1080 | 1088 | ||
1081 | 1089 | @Callable(msg) | |
1082 | 1090 | func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)]) | |
1083 | 1091 | ||
1084 | 1092 | ||
1085 | 1093 | ||
1086 | 1094 | @Callable(msg) | |
1087 | 1095 | func getDy (assetFrom,assetTo,dx,userAddress) = { | |
1088 | 1096 | let xp = _xp() | |
1089 | 1097 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in") | |
1090 | 1098 | let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out") | |
1091 | 1099 | let x = (xp[fromIndex] + dx) | |
1092 | 1100 | let y = getY(fromIndex, toIndex, x, xp) | |
1093 | 1101 | let dy = ((xp[toIndex] - y) - 1) | |
1094 | 1102 | let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress))) | |
1095 | 1103 | let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6) | |
1096 | 1104 | $Tuple2(nil, $Tuple2((dy - _fee), _fee)) | |
1097 | 1105 | } | |
1098 | 1106 | ||
1099 | 1107 | ||
1100 | 1108 | ||
1101 | 1109 | @Callable(msg) | |
1102 | 1110 | func exchange (tokenOut,min_dy) = valueOrElse(isDepricated(), valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1103 | 1111 | then throw("size(payments) != 1") | |
1104 | 1112 | else { | |
1105 | 1113 | let suspicious = checkSuspicious() | |
1106 | 1114 | if (suspicious._1) | |
1107 | 1115 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1108 | 1116 | else { | |
1109 | 1117 | let payment = msg.payments[0] | |
1110 | 1118 | let tokenIn = getStrAssetId(payment.assetId) | |
1111 | 1119 | let tokenOutB58 = fromBase58String(tokenOut) | |
1112 | 1120 | let dx = payment.amount | |
1113 | 1121 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in") | |
1114 | 1122 | let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1115 | 1123 | let xp = _xp() | |
1116 | 1124 | let x = (xp[fromIndex] + dx) | |
1117 | 1125 | let y = getY(fromIndex, toIndex, x, xp) | |
1118 | 1126 | let _dy = ((xp[toIndex] - y) - 1) | |
1119 | 1127 | let feeDiscount = calculateFeeDiscount(msg.originCaller) | |
1120 | 1128 | let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6) | |
1121 | 1129 | let dy = (_dy - _fee) | |
1122 | 1130 | let governanceFees = fraction(_fee, feeGovernance, feeScale6) | |
1131 | + | let teamFees = fraction(_fee, feeTeam, feeScale6) | |
1123 | 1132 | if (assert((dy >= min_dy))) | |
1124 | 1133 | then throw("Exchange resulted in fewer coins than expected") | |
1125 | 1134 | else { | |
1126 | 1135 | func makeNewBalances (acc,tokenBalance) = { | |
1127 | - | let $ | |
1128 | - | let newBalances = $ | |
1129 | - | let i = $ | |
1136 | + | let $t02753727563 = acc | |
1137 | + | let newBalances = $t02753727563._1 | |
1138 | + | let i = $t02753727563._2 | |
1130 | 1139 | if ((i == fromIndex)) | |
1131 | 1140 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
1132 | 1141 | else if ((i == toIndex)) | |
1133 | 1142 | then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1)) | |
1134 | 1143 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1135 | 1144 | } | |
1136 | 1145 | ||
1137 | - | let $ | |
1146 | + | let $t02784627907 = { | |
1138 | 1147 | let $l = xp | |
1139 | 1148 | let $s = size($l) | |
1140 | 1149 | let $acc0 = $Tuple2(nil, 0) | |
1141 | 1150 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1142 | 1151 | then $a | |
1143 | 1152 | else makeNewBalances($a, $l[$i]) | |
1144 | 1153 | ||
1145 | 1154 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1146 | 1155 | then $a | |
1147 | 1156 | else throw("List size exceeds 10") | |
1148 | 1157 | ||
1149 | 1158 | $f0_2($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) | |
1150 | 1159 | } | |
1151 | - | let newBalances = $ | |
1152 | - | let i = $ | |
1160 | + | let newBalances = $t02784627907._1 | |
1161 | + | let i = $t02784627907._2 | |
1153 | 1162 | if (checkDAppThreshold(newBalances)) | |
1154 | 1163 | then throw() | |
1155 | 1164 | else { | |
1156 | 1165 | let s = stake(payment.amount, getStrAssetId(payment.assetId)) | |
1157 | 1166 | if ((s == s)) | |
1158 | 1167 | then { | |
1159 | 1168 | let us = unstake(_dy, tokenOut) | |
1160 | 1169 | if ((us == us)) | |
1161 | 1170 | then { | |
1162 | - | let lpFees = (_fee - governanceFees) | |
1171 | + | let lpFees = ((_fee - governanceFees) - teamFees) | |
1163 | 1172 | let airdrop = if ((lpFees > 0)) | |
1164 | 1173 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1165 | 1174 | else 0 | |
1166 | 1175 | if ((airdrop == airdrop)) | |
1167 | - | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58]) | |
1176 | + | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(teamBoxAddress, teamFees, tokenOutB58)], [dy, tokenOutB58]) | |
1168 | 1177 | else throw("Strict value is not equal to itself.") | |
1169 | 1178 | } | |
1170 | 1179 | else throw("Strict value is not equal to itself.") | |
1171 | 1180 | } | |
1172 | 1181 | else throw("Strict value is not equal to itself.") | |
1173 | 1182 | } | |
1174 | 1183 | } | |
1175 | 1184 | } | |
1176 | 1185 | })) | |
1177 | 1186 | ||
1178 | 1187 | ||
1179 | 1188 | ||
1180 | 1189 | @Callable(msg) | |
1181 | 1190 | func withdraw (minAmounts) = valueOrElse(isActive(), calcWithdraw(msg, minAmounts, 0)) | |
1182 | 1191 | ||
1183 | 1192 | ||
1184 | 1193 | ||
1185 | 1194 | @Callable(msg) | |
1186 | 1195 | func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1187 | 1196 | then throw("Unlock amount must be positive") | |
1188 | 1197 | else { | |
1189 | 1198 | let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil) | |
1190 | 1199 | if ((unlock == unlock)) | |
1191 | 1200 | then calcWithdraw(msg, minAmounts, unlockAmount) | |
1192 | 1201 | else throw("Strict value is not equal to itself.") | |
1193 | 1202 | }) | |
1194 | 1203 | ||
1195 | 1204 | ||
1196 | 1205 | ||
1197 | 1206 | @Callable(msg) | |
1198 | 1207 | func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = if ((0 >= tokenAmount)) | |
1199 | 1208 | then throw("Amount must be positive") | |
1200 | 1209 | else { | |
1201 | 1210 | let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1202 | 1211 | $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1) | |
1203 | 1212 | } | |
1204 | 1213 | ||
1205 | 1214 | ||
1206 | 1215 | ||
1207 | 1216 | @Callable(msg) | |
1208 | 1217 | func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isDepricated(), valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1209 | 1218 | then throw("size(payments) != 1") | |
1210 | 1219 | else calcWithdrawOneCoinEntries(msg, tokenOut, minAmount, 0))) | |
1211 | 1220 | ||
1212 | 1221 | ||
1213 | 1222 | ||
1214 | 1223 | @Callable(msg) | |
1215 | 1224 | func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isDepricated(), valueOrElse(isActive(), if ((0 > unlockAmount)) | |
1216 | 1225 | then throw("Unlock amount must be positive") | |
1217 | 1226 | else { | |
1218 | 1227 | let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil) | |
1219 | 1228 | if ((unlock == unlock)) | |
1220 | 1229 | then calcWithdrawOneCoinEntries(msg, tokenOut, minAmount, unlockAmount) | |
1221 | 1230 | else throw("Strict value is not equal to itself.") | |
1222 | 1231 | })) | |
1223 | 1232 | ||
1224 | 1233 | ||
1225 | 1234 | ||
1226 | 1235 | @Callable(msg) | |
1227 | 1236 | func A () = $Tuple2(nil, _A()) | |
1228 | 1237 | ||
1229 | 1238 | ||
1230 | 1239 | ||
1231 | 1240 | @Callable(msg) | |
1232 | 1241 | func getVirtualPrice () = { | |
1233 | 1242 | let D = get_D(_xp(), _A()) | |
1234 | 1243 | $Tuple2(nil, fraction(D, PRECISION, shareSupply)) | |
1235 | 1244 | } | |
1236 | 1245 | ||
1237 | 1246 | ||
1238 | 1247 | ||
1239 | 1248 | @Callable(msg) | |
1240 | 1249 | func calcTokenAmount (amounts,deposit) = { | |
1241 | 1250 | let amp = _A() | |
1242 | 1251 | let balances = _xp() | |
1243 | 1252 | let D0 = getDMem(balances, amp) | |
1244 | 1253 | func calcNewBalances (acc,balance) = { | |
1245 | - | let $ | |
1246 | - | let newBalances = $ | |
1247 | - | let i = $ | |
1254 | + | let $t03077930805 = acc | |
1255 | + | let newBalances = $t03077930805._1 | |
1256 | + | let i = $t03077930805._2 | |
1248 | 1257 | let newBalance = (balance + (if (deposit) | |
1249 | 1258 | then amounts[i] | |
1250 | 1259 | else -(amounts[i]))) | |
1251 | 1260 | $Tuple2((newBalances :+ newBalance), (i + 1)) | |
1252 | 1261 | } | |
1253 | 1262 | ||
1254 | 1263 | let newBalances = ( let $l = balances | |
1255 | 1264 | let $s = size($l) | |
1256 | 1265 | let $acc0 = $Tuple2(nil, 0) | |
1257 | 1266 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1258 | 1267 | then $a | |
1259 | 1268 | else calcNewBalances($a, $l[$i]) | |
1260 | 1269 | ||
1261 | 1270 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1262 | 1271 | then $a | |
1263 | 1272 | else throw("List size exceeds 10") | |
1264 | 1273 | ||
1265 | 1274 | $f0_2($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))._1 | |
1266 | 1275 | let D1 = getDMem(newBalances, amp) | |
1267 | 1276 | let diff = if (deposit) | |
1268 | 1277 | then (D1 - D0) | |
1269 | 1278 | else (D0 - D1) | |
1270 | 1279 | $Tuple2(nil, fraction(diff, shareSupply, D0)) | |
1271 | 1280 | } | |
1272 | 1281 | ||
1273 | 1282 | ||
1274 | 1283 | ||
1275 | 1284 | @Callable(msg) | |
1276 | 1285 | func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME)))) | |
1277 | 1286 | then throw("too often") | |
1278 | 1287 | else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME)))) | |
1279 | 1288 | then throw("insufficient time") | |
1280 | 1289 | else { | |
1281 | 1290 | let _initial_A = _A() | |
1282 | 1291 | if (assert(if ((_futureA > 0)) | |
1283 | 1292 | then (MAX_A > _futureA) | |
1284 | 1293 | else false)) | |
1285 | 1294 | then throw("out of base range") | |
1286 | 1295 | else if (assert(if (if ((_futureA >= _initial_A)) | |
1287 | 1296 | then ((_initial_A * MAX_A_CHANGE) >= _futureA) | |
1288 | 1297 | else false) | |
1289 | 1298 | then true | |
1290 | 1299 | else if ((_initial_A > _futureA)) | |
1291 | 1300 | then ((_futureA * MAX_A_CHANGE) >= _initial_A) | |
1292 | 1301 | else false)) | |
1293 | 1302 | then throw("out of range") | |
1294 | 1303 | else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)] | |
1295 | 1304 | })) | |
1296 | 1305 | ||
1297 | 1306 | ||
1298 | 1307 | ||
1299 | 1308 | @Callable(msg) | |
1300 | 1309 | func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), { | |
1301 | 1310 | let currentA = _A() | |
1302 | 1311 | [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)] | |
1303 | 1312 | })) | |
1304 | 1313 | ||
1305 | 1314 | ||
1306 | 1315 | ||
1307 | 1316 | @Callable(msg) | |
1308 | 1317 | func shutdown () = valueOrElse(isAdminCall(msg), if (!(active)) | |
1309 | 1318 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
1310 | 1319 | else suspend("Paused by admin")) | |
1311 | 1320 | ||
1312 | 1321 | ||
1313 | 1322 | ||
1314 | 1323 | @Callable(msg) | |
1315 | 1324 | func activate () = valueOrElse(isAdminCall(msg), if (active) | |
1316 | 1325 | then throwIsActive() | |
1317 | 1326 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
1318 | 1327 | ||
1319 | 1328 | ||
1320 | 1329 | ||
1321 | 1330 | @Callable(msg) | |
1322 | 1331 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), { | |
1323 | 1332 | let claim = if (containsElement(assetIds, toBase58String(USDN))) | |
1324 | 1333 | then invoke(stakingUSDNAddress, "claimRewards", nil, nil) | |
1325 | 1334 | else 0 | |
1326 | 1335 | if ((claim == claim)) | |
1327 | 1336 | then if ((msg.caller != moneyBoxAddress)) | |
1328 | 1337 | then throw("Only the wallet can call this function") | |
1329 | 1338 | else { | |
1330 | 1339 | let balances = _xp() | |
1331 | 1340 | func takeExtraFunds (acc,assetId) = { | |
1332 | - | let $ | |
1333 | - | let sum = $ | |
1334 | - | let i = $ | |
1341 | + | let $t03339033408 = acc | |
1342 | + | let sum = $t03339033408._1 | |
1343 | + | let i = $t03339033408._2 | |
1335 | 1344 | let tokenB58 = fromBase58String(assetId) | |
1336 | 1345 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1337 | 1346 | let enrollAmount = (rBalance - balances[i]) | |
1338 | 1347 | if ((0 > enrollAmount)) | |
1339 | 1348 | then suspend(("Enroll amount negative for asset" + assetId)) | |
1340 | 1349 | else { | |
1341 | 1350 | let airdrop = if ((enrollAmount > 0)) | |
1342 | 1351 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenB58, enrollAmount)]) | |
1343 | 1352 | else 0 | |
1344 | 1353 | if ((airdrop == airdrop)) | |
1345 | 1354 | then $Tuple2((sum + enrollAmount), (i + 1)) | |
1346 | 1355 | else throw("Strict value is not equal to itself.") | |
1347 | 1356 | } | |
1348 | 1357 | } | |
1349 | 1358 | ||
1350 | 1359 | let k = { | |
1351 | 1360 | let $l = assetIds | |
1352 | 1361 | let $s = size($l) | |
1353 | 1362 | let $acc0 = $Tuple2(0, 0) | |
1354 | 1363 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1355 | 1364 | then $a | |
1356 | 1365 | else takeExtraFunds($a, $l[$i]) | |
1357 | 1366 | ||
1358 | 1367 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1359 | 1368 | then $a | |
1360 | 1369 | else throw("List size exceeds 10") | |
1361 | 1370 | ||
1362 | 1371 | $f0_2($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) | |
1363 | 1372 | } | |
1364 | 1373 | if ((k._1 == 0)) | |
1365 | 1374 | then throw("No money to take") | |
1366 | 1375 | else nil | |
1367 | 1376 | } | |
1368 | 1377 | else throw("Strict value is not equal to itself.") | |
1369 | 1378 | }) | |
1370 | 1379 | ||
1371 | 1380 | ||
1372 | 1381 | @Verifier(tx) | |
1373 | 1382 | func verify () = { | |
1374 | 1383 | let multiSignedByAdmins = { | |
1375 | 1384 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1376 | 1385 | then 1 | |
1377 | 1386 | else 0 | |
1378 | 1387 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
1379 | 1388 | then 1 | |
1380 | 1389 | else 0 | |
1381 | 1390 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
1382 | 1391 | then 1 | |
1383 | 1392 | else 0 | |
1384 | 1393 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
1385 | 1394 | } | |
1386 | 1395 | match tx { | |
1387 | 1396 | case inv: InvokeScriptTransaction => | |
1388 | 1397 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
1389 | 1398 | then (inv.function == "takeIntoAccountExtraFunds") | |
1390 | 1399 | else false | |
1391 | 1400 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1392 | 1401 | then true | |
1393 | 1402 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
1394 | 1403 | then true | |
1395 | 1404 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
1396 | 1405 | then true | |
1397 | 1406 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
1398 | 1407 | if (if (callTakeIntoAccount) | |
1399 | 1408 | then signedByAdmin | |
1400 | 1409 | else false) | |
1401 | 1410 | then true | |
1402 | 1411 | else multiSignedByAdmins | |
1403 | 1412 | case _ => | |
1404 | 1413 | multiSignedByAdmins | |
1405 | 1414 | } | |
1406 | 1415 | } | |
1407 | 1416 |
github/deemru/w8io/026f985 262.58 ms ◑