tx · aK6VykmbRS8JorCBzLxarS72x4eMGBMTqPYyVrkmXJW 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW: -0.03900000 Waves 2022.09.07 11:18 [2218442] smart account 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW > SELF 0.00000000 Waves
{ "type": 13, "id": "aK6VykmbRS8JorCBzLxarS72x4eMGBMTqPYyVrkmXJW", "fee": 3900000, "feeAssetId": null, "timestamp": 1662538756502, "version": 2, "chainId": 84, "sender": "3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW", "senderPublicKey": "DfbjpZJBbZwnUKysUkxCbWTE1ZWuoUb6Y6BZdu5iAE8j", "proofs": [ "5wYdooP52YoWJmovL52DsgbGEPttykA1LTgp5pNvPcC47tzDLccuzvsWWFZL5wHNbDHzfmwChEBVH1UF1m3XDqyY", "2FTRMvmgsFAHz7rxyjvybHE4UXsq3Y8bYaBwxERm5LapvcGVCT6PHtaECqfAC8GrcMLjPobY52hE8zgRaC63yZrp" ], "script": "base64:AAIFAAAAAAAAACkIAhIDCgEEEgASBAoCAQESABIECgIBARIAEgASABIDCgEBEgUKAwQBCAAAAGEAAAAAB3ZlcnNpb24CAAAABTIuMC4wAAAAAAhrVmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAHa0FjdGl2ZQIAAAAGYWN0aXZlAAAAAAlrQXNzZXRJZEECAAAACkFfYXNzZXRfaWQAAAAACWtBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAAJa0JhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAACWtCYWxhbmNlQgIAAAAPQl9hc3NldF9iYWxhbmNlAAAAAA1rU2hhcmVBc3NldElkAgAAAA5zaGFyZV9hc3NldF9pZAAAAAARa1NoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAAEa0ZlZQIAAAAKY29tbWlzc2lvbgAAAAAKa0ludmFyaWFudAIAAAAJaW52YXJpYW50AAAAAAZ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5QWRtaW5zBQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5zCidljQ==", "height": 2218442, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7PZS4pQoYkoJJbda7TW5S7AfASibGiArTje36GH5sSHS Next: CbYtV3qbrNkxmttDqXF6W9FuHHsSeaH1gkuKxoS7YJiH Diff:
Old | New | Differences | |
---|---|---|---|
35 | 35 | ||
36 | 36 | let kUserSwopInGov = "_SWOP_amount" | |
37 | 37 | ||
38 | + | let kFirstHarvest = "first_harvest" | |
39 | + | ||
40 | + | let kFirstHarvestHeight = "first_harvest_height" | |
41 | + | ||
42 | + | let kShareLimit = "share_limit_on_first_harvest" | |
43 | + | ||
44 | + | let kBasePeriod = "base_period" | |
45 | + | ||
46 | + | let kPeriodLength = "period_length" | |
47 | + | ||
48 | + | let kStartHeight = "start_height" | |
49 | + | ||
38 | 50 | let kAdminPubKey1 = "admin_pub_1" | |
39 | 51 | ||
40 | 52 | let kAdminPubKey2 = "admin_pub_2" | |
46 | 58 | let kMoneyBoxAddress = "money_box_address" | |
47 | 59 | ||
48 | 60 | let kGovAddress = "governance_address" | |
61 | + | ||
62 | + | let kVotingAddress = "voting_address" | |
49 | 63 | ||
50 | 64 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
51 | 65 | ||
71 | 85 | ||
72 | 86 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
73 | 87 | ||
88 | + | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
89 | + | ||
74 | 90 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
75 | 91 | ||
76 | 92 | let stakingAssets = [toBase58String(USDN)] | |
93 | + | ||
94 | + | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
95 | + | ||
96 | + | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
97 | + | ||
98 | + | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
99 | + | ||
100 | + | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
77 | 101 | ||
78 | 102 | let active = getBooleanValue(this, kActive) | |
79 | 103 | ||
323 | 347 | ||
324 | 348 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
325 | 349 | then { | |
326 | - | let $ | |
327 | - | let call = $ | |
328 | - | let stakingAddr = $ | |
350 | + | let $t01006410130 = calcStakingFuncAndAddres(stake, assetId) | |
351 | + | let call = $t01006410130._1 | |
352 | + | let stakingAddr = $t01006410130._2 | |
329 | 353 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
330 | 354 | } | |
331 | 355 | else { | |
332 | - | let $ | |
333 | - | let call = $ | |
334 | - | let stakingAddr = $ | |
356 | + | let $t01021610282 = calcStakingFuncAndAddres(stake, assetId) | |
357 | + | let call = $t01021610282._1 | |
358 | + | let stakingAddr = $t01021610282._2 | |
335 | 359 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
336 | 360 | } | |
337 | 361 | ||
363 | 387 | ||
364 | 388 | ||
365 | 389 | @Callable(i) | |
366 | - | func init () = { | |
367 | - | let $ | |
368 | - | let pmtAmountA = $ | |
369 | - | let pmtAssetIdA = $ | |
370 | - | let $ | |
371 | - | let pmtAmountB = $ | |
372 | - | let pmtAssetIdB = $ | |
373 | - | let $ | |
374 | - | let pmtStrAssetIdA = $ | |
375 | - | let pmtAssetNameA = $ | |
376 | - | let pmtDecimalsA = $ | |
377 | - | let $ | |
378 | - | let pmtStrAssetIdB = $ | |
379 | - | let pmtAssetNameB = $ | |
380 | - | let pmtDecimalsB = $ | |
390 | + | func init (firstHarvest) = { | |
391 | + | let $t01147511552 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
392 | + | let pmtAmountA = $t01147511552._1 | |
393 | + | let pmtAssetIdA = $t01147511552._2 | |
394 | + | let $t01155711634 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
395 | + | let pmtAmountB = $t01155711634._1 | |
396 | + | let pmtAssetIdB = $t01155711634._2 | |
397 | + | let $t01163911716 = getAssetInfo(pmtAssetIdA) | |
398 | + | let pmtStrAssetIdA = $t01163911716._1 | |
399 | + | let pmtAssetNameA = $t01163911716._2 | |
400 | + | let pmtDecimalsA = $t01163911716._3 | |
401 | + | let $t01172111798 = getAssetInfo(pmtAssetIdB) | |
402 | + | let pmtStrAssetIdB = $t01172111798._1 | |
403 | + | let pmtAssetNameB = $t01172111798._2 | |
404 | + | let pmtDecimalsB = $t01172111798._3 | |
381 | 405 | if (isDefined(getBoolean(this, kActive))) | |
382 | 406 | then throwIsActive() | |
383 | 407 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
399 | 423 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
400 | 424 | else 0 | |
401 | 425 | if ((stake2 == stake2)) | |
402 | - | then [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
426 | + | then { | |
427 | + | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
428 | + | if (firstHarvest) | |
429 | + | then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
430 | + | else baseEntry | |
431 | + | } | |
403 | 432 | else throw("Strict value is not equal to itself.") | |
404 | 433 | } | |
405 | 434 | else throw("Strict value is not equal to itself.") | |
414 | 443 | let pmtAssetIdB = i.payments[1].assetId | |
415 | 444 | let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA) | |
416 | 445 | let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB) | |
417 | - | let $ | |
418 | - | let pmtStrAssetIdA = $ | |
419 | - | let pmtAssetNameA = $ | |
420 | - | let pmtDecimalsA = $ | |
421 | - | let $ | |
422 | - | let pmtStrAssetIdB = $ | |
423 | - | let pmtAssetNameB = $ | |
424 | - | let pmtDecimalsB = $ | |
425 | - | let $ | |
446 | + | let $t01474614823 = getAssetInfo(pmtAssetIdA) | |
447 | + | let pmtStrAssetIdA = $t01474614823._1 | |
448 | + | let pmtAssetNameA = $t01474614823._2 | |
449 | + | let pmtDecimalsA = $t01474614823._3 | |
450 | + | let $t01482814945 = getAssetInfo(pmtAssetIdB) | |
451 | + | let pmtStrAssetIdB = $t01482814945._1 | |
452 | + | let pmtAssetNameB = $t01482814945._2 | |
453 | + | let pmtDecimalsB = $t01482814945._3 | |
454 | + | let $t01495015454 = if ((ratioShareTokensInB > ratioShareTokensInA)) | |
426 | 455 | then { | |
427 | 456 | let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING) | |
428 | 457 | $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA) | |
431 | 460 | let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING) | |
432 | 461 | $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB) | |
433 | 462 | } | |
434 | - | let pmtAmountA = $ | |
435 | - | let pmtAmountB = $ | |
436 | - | let change = $ | |
437 | - | let changeAssetId = $ | |
438 | - | let shareTokenRatio = $ | |
463 | + | let pmtAmountA = $t01495015454._1 | |
464 | + | let pmtAmountB = $t01495015454._2 | |
465 | + | let change = $t01495015454._3 | |
466 | + | let changeAssetId = $t01495015454._4 | |
467 | + | let shareTokenRatio = $t01495015454._5 | |
439 | 468 | let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8) | |
440 | 469 | if ((size(i.payments) != 2)) | |
441 | 470 | then throw("Two attached assets expected") | |
470 | 499 | ||
471 | 500 | @Callable(i) | |
472 | 501 | func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), { | |
473 | - | let $ | |
474 | - | let pmtAmount = $ | |
475 | - | let pmtAssetId = $ | |
476 | - | let $ | |
477 | - | let pmtStrAssetId = $ | |
478 | - | let pmtAssetName = $ | |
479 | - | let pmtDecimals = $ | |
502 | + | let $t01718717262 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
503 | + | let pmtAmount = $t01718717262._1 | |
504 | + | let pmtAssetId = $t01718717262._2 | |
505 | + | let $t01726717340 = getAssetInfo(pmtAssetId) | |
506 | + | let pmtStrAssetId = $t01726717340._1 | |
507 | + | let pmtAssetName = $t01726717340._2 | |
508 | + | let pmtDecimals = $t01726717340._3 | |
480 | 509 | let pmtMinThreshold = 5000000 | |
481 | 510 | let thresholdValueForMinTolerance = 50000000 | |
482 | 511 | let tolerance = if ((thresholdValueForMinTolerance > pmtAmount)) | |
496 | 525 | else false) | |
497 | 526 | then throwAssets() | |
498 | 527 | else { | |
499 | - | let $ | |
528 | + | let $t01831818960 = if ((pmtAssetId == assetIdA)) | |
500 | 529 | then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB) | |
501 | 530 | else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount)) | |
502 | - | let virtualReplenishA = $ | |
503 | - | let virtualReplenishB = $ | |
504 | - | let balanceAfterSwapA = $ | |
505 | - | let balanceAfterSwapB = $ | |
506 | - | let newBalanceA = $ | |
507 | - | let newBalanceB = $ | |
531 | + | let virtualReplenishA = $t01831818960._1 | |
532 | + | let virtualReplenishB = $t01831818960._2 | |
533 | + | let balanceAfterSwapA = $t01831818960._3 | |
534 | + | let balanceAfterSwapB = $t01831818960._4 | |
535 | + | let newBalanceA = $t01831818960._5 | |
536 | + | let newBalanceB = $t01831818960._6 | |
508 | 537 | let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB) | |
509 | 538 | let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB)) | |
510 | 539 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
528 | 557 | let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6) | |
529 | 558 | let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply) | |
530 | 559 | let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply) | |
531 | - | let $ | |
560 | + | let $t02094721242 = if ((pmtStrAssetId == strAssetIdA)) | |
532 | 561 | then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB) | |
533 | 562 | else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA) | |
534 | - | let stakeAmount = $ | |
535 | - | let unstakeAmount = $ | |
536 | - | let unstakeAsset = $ | |
563 | + | let stakeAmount = $t02094721242._1 | |
564 | + | let unstakeAmount = $t02094721242._2 | |
565 | + | let unstakeAsset = $t02094721242._3 | |
537 | 566 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
538 | 567 | then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil) | |
539 | 568 | else 0 | |
555 | 584 | ||
556 | 585 | @Callable(i) | |
557 | 586 | func withdraw () = valueOrElse(isActive(), { | |
558 | - | let $ | |
559 | - | let pmtAmount = $ | |
560 | - | let pmtAssetId = $ | |
587 | + | let $t02252922604 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
588 | + | let pmtAmount = $t02252922604._1 | |
589 | + | let pmtAssetId = $t02252922604._2 | |
561 | 590 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
562 | 591 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
563 | 592 | let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB)) | |
588 | 617 | ||
589 | 618 | @Callable(i) | |
590 | 619 | func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), { | |
591 | - | let $ | |
592 | - | let pmtAmount = $ | |
593 | - | let pmtAssetId = $ | |
620 | + | let $t02415524230 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
621 | + | let pmtAmount = $t02415524230._1 | |
622 | + | let pmtAssetId = $t02415524230._2 | |
594 | 623 | if ((0 >= estimatedAmountToReceive)) | |
595 | 624 | then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive))) | |
596 | 625 | else if ((minAmountToReceive > estimatedAmountToReceive)) | |
617 | 646 | let feeDiscount = calculateFeeDiscount(i.originCaller) | |
618 | 647 | let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6) | |
619 | 648 | let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6) | |
620 | - | let $ | |
649 | + | let $t02568325945 = if ((pmtAssetId == assetIdA)) | |
621 | 650 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward)) | |
622 | 651 | else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount)) | |
623 | - | let newBalanceA = $ | |
624 | - | let newBalanceB = $ | |
652 | + | let newBalanceA = $t02568325945._1 | |
653 | + | let newBalanceB = $t02568325945._2 | |
625 | 654 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
626 | 655 | if (if ((dAppThresholdAmount > newBalanceA)) | |
627 | 656 | then true | |
628 | 657 | else (dAppThresholdAmount > newBalanceB)) | |
629 | 658 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
630 | 659 | else { | |
631 | - | let $ | |
632 | - | let pmtStrAssetId = $ | |
633 | - | let pmtAssetName = $ | |
634 | - | let pmtDecimals = $ | |
635 | - | let $ | |
636 | - | let sendStrAssetId = $ | |
637 | - | let sendAssetName = $ | |
638 | - | let sendDecimals = $ | |
660 | + | let $t02624426317 = getAssetInfo(pmtAssetId) | |
661 | + | let pmtStrAssetId = $t02624426317._1 | |
662 | + | let pmtAssetName = $t02624426317._2 | |
663 | + | let pmtDecimals = $t02624426317._3 | |
664 | + | let $t02633026407 = getAssetInfo(sendAssetId) | |
665 | + | let sendStrAssetId = $t02633026407._1 | |
666 | + | let sendAssetName = $t02633026407._2 | |
667 | + | let sendDecimals = $t02633026407._3 | |
639 | 668 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
640 | 669 | then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil) | |
641 | 670 | else 0 | |
645 | 674 | then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil) | |
646 | 675 | else 0 | |
647 | 676 | if ((stake2 == stake2)) | |
648 | - | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], | |
677 | + | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], [amountMinusFee, sendAssetId]) | |
649 | 678 | else throw("Strict value is not equal to itself.") | |
650 | 679 | } | |
651 | 680 | else throw("Strict value is not equal to itself.") | |
708 | 737 | ||
709 | 738 | ||
710 | 739 | @Callable(i) | |
740 | + | func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), [IntegerEntry(kShareLimit, shareLimit)])) | |
741 | + | ||
742 | + | ||
743 | + | ||
744 | + | @Callable(i) | |
711 | 745 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
712 | 746 | then throw("Only contract itself can invoke this function") | |
713 | 747 | else { | |
714 | - | let $ | |
715 | - | let call = $ | |
716 | - | let addr = $ | |
717 | - | let params = $ | |
718 | - | let payments = $ | |
748 | + | let $t02961429717 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
749 | + | let call = $t02961429717._1 | |
750 | + | let addr = $t02961429717._2 | |
751 | + | let params = $t02961429717._3 | |
752 | + | let payments = $t02961429717._4 | |
719 | 753 | let inv = invoke(addr, call, params, payments) | |
720 | 754 | if ((inv == inv)) | |
721 | 755 | then nil | |
722 | 756 | else throw("Strict value is not equal to itself.") | |
723 | 757 | } | |
724 | - | ||
725 | - | ||
726 | - | ||
727 | - | @Callable(i) | |
728 | - | func toBigIntInvariant () = valueOrElse(isAdminCall(i), [IntegerEntry(kInvariant, invariantCalc(balanceA, balanceB))]) | |
729 | 758 | ||
730 | 759 | ||
731 | 760 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "2.0.0" | |
5 | 5 | ||
6 | 6 | let kVersion = "version" | |
7 | 7 | ||
8 | 8 | let kActive = "active" | |
9 | 9 | ||
10 | 10 | let kAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let kAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let kBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let kBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let kShareAssetId = "share_asset_id" | |
19 | 19 | ||
20 | 20 | let kShareAssetSupply = "share_asset_supply" | |
21 | 21 | ||
22 | 22 | let kFee = "commission" | |
23 | 23 | ||
24 | 24 | let kInvariant = "invariant" | |
25 | 25 | ||
26 | 26 | let kCause = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let kUSDNAddress = "staking_usdnnsbt_address" | |
29 | 29 | ||
30 | 30 | let kEURNAddress = "staking_eurn_address" | |
31 | 31 | ||
32 | 32 | let kDiscounts = "discounts" | |
33 | 33 | ||
34 | 34 | let kDiscountValues = "discount_values" | |
35 | 35 | ||
36 | 36 | let kUserSwopInGov = "_SWOP_amount" | |
37 | 37 | ||
38 | + | let kFirstHarvest = "first_harvest" | |
39 | + | ||
40 | + | let kFirstHarvestHeight = "first_harvest_height" | |
41 | + | ||
42 | + | let kShareLimit = "share_limit_on_first_harvest" | |
43 | + | ||
44 | + | let kBasePeriod = "base_period" | |
45 | + | ||
46 | + | let kPeriodLength = "period_length" | |
47 | + | ||
48 | + | let kStartHeight = "start_height" | |
49 | + | ||
38 | 50 | let kAdminPubKey1 = "admin_pub_1" | |
39 | 51 | ||
40 | 52 | let kAdminPubKey2 = "admin_pub_2" | |
41 | 53 | ||
42 | 54 | let kAdminPubKey3 = "admin_pub_3" | |
43 | 55 | ||
44 | 56 | let kAdminInvokePubKey = "admin_invoke_pub" | |
45 | 57 | ||
46 | 58 | let kMoneyBoxAddress = "money_box_address" | |
47 | 59 | ||
48 | 60 | let kGovAddress = "governance_address" | |
61 | + | ||
62 | + | let kVotingAddress = "voting_address" | |
49 | 63 | ||
50 | 64 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
51 | 65 | ||
52 | 66 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
53 | 67 | case string: String => | |
54 | 68 | fromBase58String(string) | |
55 | 69 | case nothing => | |
56 | 70 | throw((key + "is empty")) | |
57 | 71 | } | |
58 | 72 | ||
59 | 73 | ||
60 | 74 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
61 | 75 | ||
62 | 76 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
63 | 77 | ||
64 | 78 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
65 | 79 | ||
66 | 80 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
67 | 81 | ||
68 | 82 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
69 | 83 | ||
70 | 84 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
71 | 85 | ||
72 | 86 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
73 | 87 | ||
88 | + | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
89 | + | ||
74 | 90 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
75 | 91 | ||
76 | 92 | let stakingAssets = [toBase58String(USDN)] | |
93 | + | ||
94 | + | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
95 | + | ||
96 | + | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
97 | + | ||
98 | + | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
99 | + | ||
100 | + | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
77 | 101 | ||
78 | 102 | let active = getBooleanValue(this, kActive) | |
79 | 103 | ||
80 | 104 | let strAssetIdA = getStringValue(this, kAssetIdA) | |
81 | 105 | ||
82 | 106 | let strAssetIdB = getStringValue(this, kAssetIdB) | |
83 | 107 | ||
84 | 108 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
85 | 109 | then unit | |
86 | 110 | else fromBase58String(strAssetIdA) | |
87 | 111 | ||
88 | 112 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
89 | 113 | then unit | |
90 | 114 | else fromBase58String(strAssetIdB) | |
91 | 115 | ||
92 | 116 | let assetNameA = match assetIdA { | |
93 | 117 | case id: ByteVector => | |
94 | 118 | value(assetInfo(id)).name | |
95 | 119 | case waves: Unit => | |
96 | 120 | "WAVES" | |
97 | 121 | case _ => | |
98 | 122 | throw("Match error") | |
99 | 123 | } | |
100 | 124 | ||
101 | 125 | let assetNameB = match assetIdB { | |
102 | 126 | case id: ByteVector => | |
103 | 127 | value(assetInfo(id)).name | |
104 | 128 | case waves: Unit => | |
105 | 129 | "WAVES" | |
106 | 130 | case _ => | |
107 | 131 | throw("Match error") | |
108 | 132 | } | |
109 | 133 | ||
110 | 134 | let balanceA = getIntegerValue(this, kBalanceA) | |
111 | 135 | ||
112 | 136 | let balanceB = getIntegerValue(this, kBalanceB) | |
113 | 137 | ||
114 | 138 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
115 | 139 | ||
116 | 140 | let shareAssetSupply = getIntegerValue(this, kShareAssetSupply) | |
117 | 141 | ||
118 | 142 | let invariant = getIntegerValue(this, kInvariant) | |
119 | 143 | ||
120 | 144 | let fee = getIntegerValue(this, kFee) | |
121 | 145 | ||
122 | 146 | let feeGovernance = fraction(fee, 40, 100) | |
123 | 147 | ||
124 | 148 | let feeScale6 = 1000000 | |
125 | 149 | ||
126 | 150 | let scale3 = 1000 | |
127 | 151 | ||
128 | 152 | let scale8 = 100000000 | |
129 | 153 | ||
130 | 154 | let scale16 = 10000000000000000 | |
131 | 155 | ||
132 | 156 | let slippageScale3 = 1000 | |
133 | 157 | ||
134 | 158 | let digits8 = 8 | |
135 | 159 | ||
136 | 160 | let dAppThreshold = 50 | |
137 | 161 | ||
138 | 162 | let dAppThresholdScale2 = 100 | |
139 | 163 | ||
140 | 164 | let exchangeRatioLimitMin = 90000000 | |
141 | 165 | ||
142 | 166 | let exchangeRatioLimitMax = 110000000 | |
143 | 167 | ||
144 | 168 | let alpha = 50 | |
145 | 169 | ||
146 | 170 | let alphaDigits = 2 | |
147 | 171 | ||
148 | 172 | let beta = 4600000000000000 | |
149 | 173 | ||
150 | 174 | func accountBalance (assetId) = match assetId { | |
151 | 175 | case id: ByteVector => | |
152 | 176 | assetBalance(this, id) | |
153 | 177 | case waves: Unit => | |
154 | 178 | wavesBalance(this).available | |
155 | 179 | case _ => | |
156 | 180 | throw("Match error") | |
157 | 181 | } | |
158 | 182 | ||
159 | 183 | ||
160 | 184 | func stakedAmount (assetId) = { | |
161 | 185 | let stakedAmountCalculated = match assetId { | |
162 | 186 | case aId: ByteVector => | |
163 | 187 | if ((aId == USDN)) | |
164 | 188 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
165 | 189 | else 0 | |
166 | 190 | case _: Unit => | |
167 | 191 | 0 | |
168 | 192 | case _ => | |
169 | 193 | throw("Match error") | |
170 | 194 | } | |
171 | 195 | match stakedAmountCalculated { | |
172 | 196 | case i: Int => | |
173 | 197 | i | |
174 | 198 | case _ => | |
175 | 199 | 0 | |
176 | 200 | } | |
177 | 201 | } | |
178 | 202 | ||
179 | 203 | ||
180 | 204 | let stakedAmountA = stakedAmount(assetIdA) | |
181 | 205 | ||
182 | 206 | let stakedAmountB = stakedAmount(assetIdB) | |
183 | 207 | ||
184 | 208 | let availableBalanceA = (balanceA - stakedAmountA) | |
185 | 209 | ||
186 | 210 | let availableBalanceB = (balanceB - stakedAmountB) | |
187 | 211 | ||
188 | 212 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
189 | 213 | ||
190 | 214 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
191 | 215 | ||
192 | 216 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
193 | 217 | then (accountBalanceWithStakedB >= balanceB) | |
194 | 218 | else false | |
195 | 219 | ||
196 | 220 | func skewness (x,y) = ((fraction(scale16, x, y) + fraction(scale16, y, x)) / 2) | |
197 | 221 | ||
198 | 222 | ||
199 | 223 | func invariantCalc (x,y) = { | |
200 | 224 | let sk = skewness(x, y) | |
201 | 225 | (fraction((x + y), scale16, pow(sk, digits8, alpha, alphaDigits, digits8, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(x), toBigInt(y), toBigInt(scale8)), 0, toBigInt(5), 1, (digits8 / 2), DOWN)), pow((sk - beta), digits8, alpha, alphaDigits, digits8, DOWN), scale8))) | |
202 | 226 | } | |
203 | 227 | ||
204 | 228 | ||
205 | 229 | func calculateSendAmount (amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount,tokenId) = { | |
206 | 230 | let worstAllowedNewInvariantRatio = (scale16 - ((scale16 * 1) / 10000000)) | |
207 | 231 | let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount) | |
208 | 232 | let x = (balanceA + tokenReceiveAmount) | |
209 | 233 | let y = (balanceB + tokenReceiveAmount) | |
210 | 234 | func getStepAmount (acc,step) = if ((acc._1 == -1)) | |
211 | 235 | then { | |
212 | 236 | let amountToSend = (amountToSendEstimated - (((step * deltaBetweenMaxAndMinSendValue) / 3) / scale3)) | |
213 | 237 | let stepInvariant = if ((tokenId == assetIdA)) | |
214 | 238 | then invariantCalc(x, (balanceB - amountToSend)) | |
215 | 239 | else invariantCalc((balanceA - amountToSend), y) | |
216 | 240 | if ((stepInvariant > invariant)) | |
217 | 241 | then $Tuple2(amountToSend, stepInvariant) | |
218 | 242 | else $Tuple2(-1, 0) | |
219 | 243 | } | |
220 | 244 | else acc | |
221 | 245 | ||
222 | 246 | let amountToSendMin = getStepAmount($Tuple2(-1, 0), 3000) | |
223 | 247 | if ((0 > amountToSendMin._1)) | |
224 | 248 | then throw("Price is worse than minReceived") | |
225 | 249 | else { | |
226 | 250 | let invEstimated = if ((tokenId == assetIdA)) | |
227 | 251 | then invariantCalc(x, (balanceB - amountToSendEstimated)) | |
228 | 252 | else if ((tokenId == assetIdB)) | |
229 | 253 | then invariantCalc((balanceA - amountToSendEstimated), y) | |
230 | 254 | else throw("Wrong asset in payment") | |
231 | 255 | if ((invariant > invEstimated)) | |
232 | 256 | then if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, invEstimated))) | |
233 | 257 | then throw("The requested price is too not profitable for user") | |
234 | 258 | else { | |
235 | 259 | let a = { | |
236 | 260 | let $l = [25, 200, 500] | |
237 | 261 | let $s = size($l) | |
238 | 262 | let $acc0 = $Tuple2(-1, 0) | |
239 | 263 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
240 | 264 | then $a | |
241 | 265 | else getStepAmount($a, $l[$i]) | |
242 | 266 | ||
243 | 267 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
244 | 268 | then $a | |
245 | 269 | else throw("List size exceeds 3") | |
246 | 270 | ||
247 | 271 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
248 | 272 | } | |
249 | 273 | if ((0 > a._1)) | |
250 | 274 | then amountToSendMin._1 | |
251 | 275 | else a._1 | |
252 | 276 | } | |
253 | 277 | else { | |
254 | 278 | let a = { | |
255 | 279 | let $l = [-500, -200, -25] | |
256 | 280 | let $s = size($l) | |
257 | 281 | let $acc0 = $Tuple2(-1, 0) | |
258 | 282 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
259 | 283 | then $a | |
260 | 284 | else getStepAmount($a, $l[$i]) | |
261 | 285 | ||
262 | 286 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
263 | 287 | then $a | |
264 | 288 | else throw("List size exceeds 3") | |
265 | 289 | ||
266 | 290 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
267 | 291 | } | |
268 | 292 | let tupleSendBetter = if ((0 > a._1)) | |
269 | 293 | then $Tuple2(amountToSendEstimated, invEstimated) | |
270 | 294 | else a | |
271 | 295 | if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, tupleSendBetter._2))) | |
272 | 296 | then throw("The requested price is too not profitable for user") | |
273 | 297 | else tupleSendBetter._1 | |
274 | 298 | } | |
275 | 299 | } | |
276 | 300 | } | |
277 | 301 | ||
278 | 302 | ||
279 | 303 | func getAssetInfo (assetId) = match assetId { | |
280 | 304 | case id: ByteVector => | |
281 | 305 | let stringId = toBase58String(id) | |
282 | 306 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
283 | 307 | $Tuple3(stringId, info.name, info.decimals) | |
284 | 308 | case waves: Unit => | |
285 | 309 | $Tuple3("WAVES", "WAVES", 8) | |
286 | 310 | case _ => | |
287 | 311 | throw("Match error") | |
288 | 312 | } | |
289 | 313 | ||
290 | 314 | ||
291 | 315 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
292 | 316 | ||
293 | 317 | ||
294 | 318 | func throwIsActive () = throw("DApp is already active") | |
295 | 319 | ||
296 | 320 | ||
297 | 321 | func isActive () = if (active) | |
298 | 322 | then unit | |
299 | 323 | else throw("DApp is inactive at this moment") | |
300 | 324 | ||
301 | 325 | ||
302 | 326 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
303 | 327 | then unit | |
304 | 328 | else throw("Only admin can call this function") | |
305 | 329 | ||
306 | 330 | ||
307 | 331 | func throwAssets () = throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
308 | 332 | ||
309 | 333 | ||
310 | 334 | func throwOnePayment () = throw("One attached payment expected") | |
311 | 335 | ||
312 | 336 | ||
313 | 337 | func throwThreshold (threshold,amountA,amountB) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(threshold)) + ": ") + toString(amountA)) + " ") + assetNameA) + ", ") + toString(amountB)) + " ") + assetNameB)) | |
314 | 338 | ||
315 | 339 | ||
316 | 340 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
317 | 341 | ||
318 | 342 | ||
319 | 343 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
320 | 344 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
321 | 345 | else $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
322 | 346 | ||
323 | 347 | ||
324 | 348 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
325 | 349 | then { | |
326 | - | let $ | |
327 | - | let call = $ | |
328 | - | let stakingAddr = $ | |
350 | + | let $t01006410130 = calcStakingFuncAndAddres(stake, assetId) | |
351 | + | let call = $t01006410130._1 | |
352 | + | let stakingAddr = $t01006410130._2 | |
329 | 353 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
330 | 354 | } | |
331 | 355 | else { | |
332 | - | let $ | |
333 | - | let call = $ | |
334 | - | let stakingAddr = $ | |
356 | + | let $t01021610282 = calcStakingFuncAndAddres(stake, assetId) | |
357 | + | let call = $t01021610282._1 | |
358 | + | let stakingAddr = $t01021610282._2 | |
335 | 359 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
336 | 360 | } | |
337 | 361 | ||
338 | 362 | ||
339 | 363 | func calculateFeeDiscount (userAddr) = { | |
340 | 364 | let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0) | |
341 | 365 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
342 | 366 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
343 | 367 | if (if ((swopAmount >= parseIntValue(discountValues[0]))) | |
344 | 368 | then (parseIntValue(discountValues[1]) > swopAmount) | |
345 | 369 | else false) | |
346 | 370 | then (feeScale6 - parseIntValue(discounts[0])) | |
347 | 371 | else if (if ((swopAmount >= parseIntValue(discountValues[1]))) | |
348 | 372 | then (parseIntValue(discountValues[2]) > swopAmount) | |
349 | 373 | else false) | |
350 | 374 | then (feeScale6 - parseIntValue(discounts[1])) | |
351 | 375 | else if (if ((swopAmount >= parseIntValue(discountValues[2]))) | |
352 | 376 | then (parseIntValue(discountValues[3]) > swopAmount) | |
353 | 377 | else false) | |
354 | 378 | then (feeScale6 - parseIntValue(discounts[2])) | |
355 | 379 | else if (if ((swopAmount >= parseIntValue(discountValues[3]))) | |
356 | 380 | then (parseIntValue(discountValues[4]) > swopAmount) | |
357 | 381 | else false) | |
358 | 382 | then (feeScale6 - parseIntValue(discounts[3])) | |
359 | 383 | else if ((swopAmount >= parseIntValue(discountValues[4]))) | |
360 | 384 | then (feeScale6 - parseIntValue(discounts[4])) | |
361 | 385 | else feeScale6 | |
362 | 386 | } | |
363 | 387 | ||
364 | 388 | ||
365 | 389 | @Callable(i) | |
366 | - | func init () = { | |
367 | - | let $ | |
368 | - | let pmtAmountA = $ | |
369 | - | let pmtAssetIdA = $ | |
370 | - | let $ | |
371 | - | let pmtAmountB = $ | |
372 | - | let pmtAssetIdB = $ | |
373 | - | let $ | |
374 | - | let pmtStrAssetIdA = $ | |
375 | - | let pmtAssetNameA = $ | |
376 | - | let pmtDecimalsA = $ | |
377 | - | let $ | |
378 | - | let pmtStrAssetIdB = $ | |
379 | - | let pmtAssetNameB = $ | |
380 | - | let pmtDecimalsB = $ | |
390 | + | func init (firstHarvest) = { | |
391 | + | let $t01147511552 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
392 | + | let pmtAmountA = $t01147511552._1 | |
393 | + | let pmtAssetIdA = $t01147511552._2 | |
394 | + | let $t01155711634 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
395 | + | let pmtAmountB = $t01155711634._1 | |
396 | + | let pmtAssetIdB = $t01155711634._2 | |
397 | + | let $t01163911716 = getAssetInfo(pmtAssetIdA) | |
398 | + | let pmtStrAssetIdA = $t01163911716._1 | |
399 | + | let pmtAssetNameA = $t01163911716._2 | |
400 | + | let pmtDecimalsA = $t01163911716._3 | |
401 | + | let $t01172111798 = getAssetInfo(pmtAssetIdB) | |
402 | + | let pmtStrAssetIdB = $t01172111798._1 | |
403 | + | let pmtAssetNameB = $t01172111798._2 | |
404 | + | let pmtDecimalsB = $t01172111798._3 | |
381 | 405 | if (isDefined(getBoolean(this, kActive))) | |
382 | 406 | then throwIsActive() | |
383 | 407 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
384 | 408 | then throw("Assets must be different") | |
385 | 409 | else { | |
386 | 410 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
387 | 411 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
388 | 412 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
389 | 413 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
390 | 414 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
391 | 415 | let shareIssueId = calculateAssetId(shareIssue) | |
392 | 416 | let invariantCalculated = invariantCalc(pmtAmountA, pmtAmountB) | |
393 | 417 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
394 | 418 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
395 | 419 | else 0 | |
396 | 420 | if ((stake1 == stake1)) | |
397 | 421 | then { | |
398 | 422 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
399 | 423 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
400 | 424 | else 0 | |
401 | 425 | if ((stake2 == stake2)) | |
402 | - | then [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
426 | + | then { | |
427 | + | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
428 | + | if (firstHarvest) | |
429 | + | then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
430 | + | else baseEntry | |
431 | + | } | |
403 | 432 | else throw("Strict value is not equal to itself.") | |
404 | 433 | } | |
405 | 434 | else throw("Strict value is not equal to itself.") | |
406 | 435 | } | |
407 | 436 | } | |
408 | 437 | ||
409 | 438 | ||
410 | 439 | ||
411 | 440 | @Callable(i) | |
412 | 441 | func replenishWithTwoTokens () = valueOrElse(isActive(), { | |
413 | 442 | let pmtAssetIdA = i.payments[0].assetId | |
414 | 443 | let pmtAssetIdB = i.payments[1].assetId | |
415 | 444 | let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA) | |
416 | 445 | let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB) | |
417 | - | let $ | |
418 | - | let pmtStrAssetIdA = $ | |
419 | - | let pmtAssetNameA = $ | |
420 | - | let pmtDecimalsA = $ | |
421 | - | let $ | |
422 | - | let pmtStrAssetIdB = $ | |
423 | - | let pmtAssetNameB = $ | |
424 | - | let pmtDecimalsB = $ | |
425 | - | let $ | |
446 | + | let $t01474614823 = getAssetInfo(pmtAssetIdA) | |
447 | + | let pmtStrAssetIdA = $t01474614823._1 | |
448 | + | let pmtAssetNameA = $t01474614823._2 | |
449 | + | let pmtDecimalsA = $t01474614823._3 | |
450 | + | let $t01482814945 = getAssetInfo(pmtAssetIdB) | |
451 | + | let pmtStrAssetIdB = $t01482814945._1 | |
452 | + | let pmtAssetNameB = $t01482814945._2 | |
453 | + | let pmtDecimalsB = $t01482814945._3 | |
454 | + | let $t01495015454 = if ((ratioShareTokensInB > ratioShareTokensInA)) | |
426 | 455 | then { | |
427 | 456 | let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING) | |
428 | 457 | $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA) | |
429 | 458 | } | |
430 | 459 | else { | |
431 | 460 | let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING) | |
432 | 461 | $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB) | |
433 | 462 | } | |
434 | - | let pmtAmountA = $ | |
435 | - | let pmtAmountB = $ | |
436 | - | let change = $ | |
437 | - | let changeAssetId = $ | |
438 | - | let shareTokenRatio = $ | |
463 | + | let pmtAmountA = $t01495015454._1 | |
464 | + | let pmtAmountB = $t01495015454._2 | |
465 | + | let change = $t01495015454._3 | |
466 | + | let changeAssetId = $t01495015454._4 | |
467 | + | let shareTokenRatio = $t01495015454._5 | |
439 | 468 | let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8) | |
440 | 469 | if ((size(i.payments) != 2)) | |
441 | 470 | then throw("Two attached assets expected") | |
442 | 471 | else if (if ((pmtAssetIdA != assetIdA)) | |
443 | 472 | then true | |
444 | 473 | else (pmtAssetIdB != assetIdB)) | |
445 | 474 | then throwAssets() | |
446 | 475 | else if ((shareTokenToPayAmount == 0)) | |
447 | 476 | then throw("Too small amount to replenish") | |
448 | 477 | else if ((0 > change)) | |
449 | 478 | then throw("Change < 0") | |
450 | 479 | else if (!(hasEnoughBalance)) | |
451 | 480 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
452 | 481 | else { | |
453 | 482 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
454 | 483 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
455 | 484 | else 0 | |
456 | 485 | if ((stake1 == stake1)) | |
457 | 486 | then { | |
458 | 487 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
459 | 488 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
460 | 489 | else 0 | |
461 | 490 | if ((stake2 == stake2)) | |
462 | 491 | then [IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), IntegerEntry(kInvariant, invariantCalc((balanceA + pmtAmountA), (balanceB + pmtAmountB))), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId), ScriptTransfer(i.caller, change, changeAssetId)] | |
463 | 492 | else throw("Strict value is not equal to itself.") | |
464 | 493 | } | |
465 | 494 | else throw("Strict value is not equal to itself.") | |
466 | 495 | } | |
467 | 496 | }) | |
468 | 497 | ||
469 | 498 | ||
470 | 499 | ||
471 | 500 | @Callable(i) | |
472 | 501 | func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), { | |
473 | - | let $ | |
474 | - | let pmtAmount = $ | |
475 | - | let pmtAssetId = $ | |
476 | - | let $ | |
477 | - | let pmtStrAssetId = $ | |
478 | - | let pmtAssetName = $ | |
479 | - | let pmtDecimals = $ | |
502 | + | let $t01718717262 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
503 | + | let pmtAmount = $t01718717262._1 | |
504 | + | let pmtAssetId = $t01718717262._2 | |
505 | + | let $t01726717340 = getAssetInfo(pmtAssetId) | |
506 | + | let pmtStrAssetId = $t01726717340._1 | |
507 | + | let pmtAssetName = $t01726717340._2 | |
508 | + | let pmtDecimals = $t01726717340._3 | |
480 | 509 | let pmtMinThreshold = 5000000 | |
481 | 510 | let thresholdValueForMinTolerance = 50000000 | |
482 | 511 | let tolerance = if ((thresholdValueForMinTolerance > pmtAmount)) | |
483 | 512 | then 100000 | |
484 | 513 | else 1 | |
485 | 514 | let slippageValueMinForReplenish = (scale8 - ((scale8 * tolerance) / 10000000)) | |
486 | 515 | let slippageValueMaxForReplenish = (scale8 + ((scale8 * tolerance) / 10000000)) | |
487 | 516 | let slippageValueMinForSwap = (scale8 - ((scale8 * 1) / 10000000)) | |
488 | 517 | if ((pmtMinThreshold > pmtAmount)) | |
489 | 518 | then throw((((("Payment amount " + toString(pmtAmount)) + " does not exceed the minimum amount of ") + toString(pmtMinThreshold)) + " tokens")) | |
490 | 519 | else if ((size(i.payments) != 1)) | |
491 | 520 | then throwOnePayment() | |
492 | 521 | else if (!(hasEnoughBalance)) | |
493 | 522 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
494 | 523 | else if (if ((pmtAssetId != assetIdA)) | |
495 | 524 | then (pmtAssetId != assetIdB) | |
496 | 525 | else false) | |
497 | 526 | then throwAssets() | |
498 | 527 | else { | |
499 | - | let $ | |
528 | + | let $t01831818960 = if ((pmtAssetId == assetIdA)) | |
500 | 529 | then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB) | |
501 | 530 | else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount)) | |
502 | - | let virtualReplenishA = $ | |
503 | - | let virtualReplenishB = $ | |
504 | - | let balanceAfterSwapA = $ | |
505 | - | let balanceAfterSwapB = $ | |
506 | - | let newBalanceA = $ | |
507 | - | let newBalanceB = $ | |
531 | + | let virtualReplenishA = $t01831818960._1 | |
532 | + | let virtualReplenishB = $t01831818960._2 | |
533 | + | let balanceAfterSwapA = $t01831818960._3 | |
534 | + | let balanceAfterSwapB = $t01831818960._4 | |
535 | + | let newBalanceA = $t01831818960._5 | |
536 | + | let newBalanceB = $t01831818960._6 | |
508 | 537 | let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB) | |
509 | 538 | let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB)) | |
510 | 539 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
511 | 540 | if (if ((slippageValueMinForSwap >= fraction(scale8, invariant, invariantNew))) | |
512 | 541 | then true | |
513 | 542 | else (invariant > invariantNew)) | |
514 | 543 | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
515 | 544 | else if (if ((slippageValueMinForReplenish > ratioVirtualBalanceToVirtualReplenish)) | |
516 | 545 | then true | |
517 | 546 | else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish)) | |
518 | 547 | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
519 | 548 | else if (if ((dAppThresholdAmount > newBalanceA)) | |
520 | 549 | then true | |
521 | 550 | else (dAppThresholdAmount > newBalanceB)) | |
522 | 551 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
523 | 552 | else { | |
524 | 553 | let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA) | |
525 | 554 | let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB) | |
526 | 555 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
527 | 556 | let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6) | |
528 | 557 | let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6) | |
529 | 558 | let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply) | |
530 | 559 | let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply) | |
531 | - | let $ | |
560 | + | let $t02094721242 = if ((pmtStrAssetId == strAssetIdA)) | |
532 | 561 | then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB) | |
533 | 562 | else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA) | |
534 | - | let stakeAmount = $ | |
535 | - | let unstakeAmount = $ | |
536 | - | let unstakeAsset = $ | |
563 | + | let stakeAmount = $t02094721242._1 | |
564 | + | let unstakeAmount = $t02094721242._2 | |
565 | + | let unstakeAsset = $t02094721242._3 | |
537 | 566 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
538 | 567 | then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil) | |
539 | 568 | else 0 | |
540 | 569 | if ((stake1 == stake1)) | |
541 | 570 | then { | |
542 | 571 | let stake2 = if (containsElement(stakingAssets, unstakeAsset)) | |
543 | 572 | then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil) | |
544 | 573 | else 0 | |
545 | 574 | if ((stake2 == stake2)) | |
546 | 575 | then [Reissue(shareAssetId, shareTokenToPayAmountAfterFee, true), ScriptTransfer(i.caller, shareTokenToPayAmountAfterFee, shareAssetId), ScriptTransfer(moneyBoxAddress, governanceRewardTokenA, assetIdA), ScriptTransfer(moneyBoxAddress, governanceRewardTokenB, assetIdB), IntegerEntry(kBalanceA, (newBalanceA - governanceRewardTokenA)), IntegerEntry(kBalanceB, (newBalanceB - governanceRewardTokenB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmountAfterFee)), IntegerEntry(kInvariant, invariantCalc((newBalanceA - governanceRewardTokenA), (newBalanceB - governanceRewardTokenB)))] | |
547 | 576 | else throw("Strict value is not equal to itself.") | |
548 | 577 | } | |
549 | 578 | else throw("Strict value is not equal to itself.") | |
550 | 579 | } | |
551 | 580 | } | |
552 | 581 | }) | |
553 | 582 | ||
554 | 583 | ||
555 | 584 | ||
556 | 585 | @Callable(i) | |
557 | 586 | func withdraw () = valueOrElse(isActive(), { | |
558 | - | let $ | |
559 | - | let pmtAmount = $ | |
560 | - | let pmtAssetId = $ | |
587 | + | let $t02252922604 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
588 | + | let pmtAmount = $t02252922604._1 | |
589 | + | let pmtAssetId = $t02252922604._2 | |
561 | 590 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
562 | 591 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
563 | 592 | let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB)) | |
564 | 593 | if ((size(i.payments) != 1)) | |
565 | 594 | then throwOnePayment() | |
566 | 595 | else if ((pmtAssetId != shareAssetId)) | |
567 | 596 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
568 | 597 | else if (!(hasEnoughBalance)) | |
569 | 598 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
570 | 599 | else { | |
571 | 600 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
572 | 601 | then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
573 | 602 | else 0 | |
574 | 603 | if ((stake1 == stake1)) | |
575 | 604 | then { | |
576 | 605 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
577 | 606 | then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
578 | 607 | else 0 | |
579 | 608 | if ((stake2 == stake2)) | |
580 | 609 | then [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - pmtAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
581 | 610 | else throw("Strict value is not equal to itself.") | |
582 | 611 | } | |
583 | 612 | else throw("Strict value is not equal to itself.") | |
584 | 613 | } | |
585 | 614 | }) | |
586 | 615 | ||
587 | 616 | ||
588 | 617 | ||
589 | 618 | @Callable(i) | |
590 | 619 | func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), { | |
591 | - | let $ | |
592 | - | let pmtAmount = $ | |
593 | - | let pmtAssetId = $ | |
620 | + | let $t02415524230 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
621 | + | let pmtAmount = $t02415524230._1 | |
622 | + | let pmtAssetId = $t02415524230._2 | |
594 | 623 | if ((0 >= estimatedAmountToReceive)) | |
595 | 624 | then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive))) | |
596 | 625 | else if ((minAmountToReceive > estimatedAmountToReceive)) | |
597 | 626 | then throw("Minimal amount can't be greater than estimated.") | |
598 | 627 | else if ((size(i.payments) != 1)) | |
599 | 628 | then throwOnePayment() | |
600 | 629 | else if (!(hasEnoughBalance)) | |
601 | 630 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
602 | 631 | else if (if ((pmtAssetId != assetIdA)) | |
603 | 632 | then (pmtAssetId != assetIdB) | |
604 | 633 | else false) | |
605 | 634 | then throwAssets() | |
606 | 635 | else if ((10000000 > pmtAmount)) | |
607 | 636 | then throw("Only swap of 10.000000 or more tokens is allowed") | |
608 | 637 | else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount))) | |
609 | 638 | then true | |
610 | 639 | else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax)) | |
611 | 640 | then throw("Incorrect args and pmt ratio") | |
612 | 641 | else { | |
613 | 642 | let sendAssetId = if ((pmtAssetId == assetIdA)) | |
614 | 643 | then assetIdB | |
615 | 644 | else assetIdA | |
616 | 645 | let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId) | |
617 | 646 | let feeDiscount = calculateFeeDiscount(i.originCaller) | |
618 | 647 | let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6) | |
619 | 648 | let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6) | |
620 | - | let $ | |
649 | + | let $t02568325945 = if ((pmtAssetId == assetIdA)) | |
621 | 650 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward)) | |
622 | 651 | else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount)) | |
623 | - | let newBalanceA = $ | |
624 | - | let newBalanceB = $ | |
652 | + | let newBalanceA = $t02568325945._1 | |
653 | + | let newBalanceB = $t02568325945._2 | |
625 | 654 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
626 | 655 | if (if ((dAppThresholdAmount > newBalanceA)) | |
627 | 656 | then true | |
628 | 657 | else (dAppThresholdAmount > newBalanceB)) | |
629 | 658 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
630 | 659 | else { | |
631 | - | let $ | |
632 | - | let pmtStrAssetId = $ | |
633 | - | let pmtAssetName = $ | |
634 | - | let pmtDecimals = $ | |
635 | - | let $ | |
636 | - | let sendStrAssetId = $ | |
637 | - | let sendAssetName = $ | |
638 | - | let sendDecimals = $ | |
660 | + | let $t02624426317 = getAssetInfo(pmtAssetId) | |
661 | + | let pmtStrAssetId = $t02624426317._1 | |
662 | + | let pmtAssetName = $t02624426317._2 | |
663 | + | let pmtDecimals = $t02624426317._3 | |
664 | + | let $t02633026407 = getAssetInfo(sendAssetId) | |
665 | + | let sendStrAssetId = $t02633026407._1 | |
666 | + | let sendAssetName = $t02633026407._2 | |
667 | + | let sendDecimals = $t02633026407._3 | |
639 | 668 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
640 | 669 | then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil) | |
641 | 670 | else 0 | |
642 | 671 | if ((stake1 == stake1)) | |
643 | 672 | then { | |
644 | 673 | let stake2 = if (containsElement(stakingAssets, sendStrAssetId)) | |
645 | 674 | then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil) | |
646 | 675 | else 0 | |
647 | 676 | if ((stake2 == stake2)) | |
648 | - | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], | |
677 | + | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], [amountMinusFee, sendAssetId]) | |
649 | 678 | else throw("Strict value is not equal to itself.") | |
650 | 679 | } | |
651 | 680 | else throw("Strict value is not equal to itself.") | |
652 | 681 | } | |
653 | 682 | } | |
654 | 683 | }) | |
655 | 684 | ||
656 | 685 | ||
657 | 686 | ||
658 | 687 | @Callable(i) | |
659 | 688 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
660 | 689 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
661 | 690 | else suspend("Paused by admin")) | |
662 | 691 | ||
663 | 692 | ||
664 | 693 | ||
665 | 694 | @Callable(i) | |
666 | 695 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
667 | 696 | then throwIsActive() | |
668 | 697 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
669 | 698 | ||
670 | 699 | ||
671 | 700 | ||
672 | 701 | @Callable(i) | |
673 | 702 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), { | |
674 | 703 | let amountEnrollA = (accountBalanceWithStakedA - balanceA) | |
675 | 704 | let amountEnrollB = (accountBalanceWithStakedB - balanceB) | |
676 | 705 | let invariantNew = invariantCalc((balanceA + amountEnrollA), (balanceB + amountEnrollB)) | |
677 | 706 | if ((i.caller != moneyBoxAddress)) | |
678 | 707 | then throw("Only the money box can call this function") | |
679 | 708 | else if (if ((0 > amountEnrollA)) | |
680 | 709 | then true | |
681 | 710 | else (0 > amountEnrollB)) | |
682 | 711 | then suspend("Enroll amount negative") | |
683 | 712 | else if (if ((amountEnrollA == 0)) | |
684 | 713 | then (amountEnrollB == 0) | |
685 | 714 | else false) | |
686 | 715 | then throw("No money to take") | |
687 | 716 | else { | |
688 | 717 | let stake1 = if (if (containsElement(stakingAssets, strAssetIdA)) | |
689 | 718 | then (amountEnrollA > 0) | |
690 | 719 | else false) | |
691 | 720 | then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
692 | 721 | else 0 | |
693 | 722 | if ((stake1 == stake1)) | |
694 | 723 | then { | |
695 | 724 | let stake2 = if (if (containsElement(stakingAssets, strAssetIdB)) | |
696 | 725 | then (amountEnrollB > 0) | |
697 | 726 | else false) | |
698 | 727 | then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
699 | 728 | else 0 | |
700 | 729 | if ((stake2 == stake2)) | |
701 | 730 | then [IntegerEntry(kInvariant, invariantNew), IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))] | |
702 | 731 | else throw("Strict value is not equal to itself.") | |
703 | 732 | } | |
704 | 733 | else throw("Strict value is not equal to itself.") | |
705 | 734 | } | |
706 | 735 | }) | |
707 | 736 | ||
708 | 737 | ||
709 | 738 | ||
710 | 739 | @Callable(i) | |
740 | + | func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), [IntegerEntry(kShareLimit, shareLimit)])) | |
741 | + | ||
742 | + | ||
743 | + | ||
744 | + | @Callable(i) | |
711 | 745 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
712 | 746 | then throw("Only contract itself can invoke this function") | |
713 | 747 | else { | |
714 | - | let $ | |
715 | - | let call = $ | |
716 | - | let addr = $ | |
717 | - | let params = $ | |
718 | - | let payments = $ | |
748 | + | let $t02961429717 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
749 | + | let call = $t02961429717._1 | |
750 | + | let addr = $t02961429717._2 | |
751 | + | let params = $t02961429717._3 | |
752 | + | let payments = $t02961429717._4 | |
719 | 753 | let inv = invoke(addr, call, params, payments) | |
720 | 754 | if ((inv == inv)) | |
721 | 755 | then nil | |
722 | 756 | else throw("Strict value is not equal to itself.") | |
723 | 757 | } | |
724 | - | ||
725 | - | ||
726 | - | ||
727 | - | @Callable(i) | |
728 | - | func toBigIntInvariant () = valueOrElse(isAdminCall(i), [IntegerEntry(kInvariant, invariantCalc(balanceA, balanceB))]) | |
729 | 758 | ||
730 | 759 | ||
731 | 760 | @Verifier(tx) | |
732 | 761 | func verify () = { | |
733 | 762 | let multiSignedByAdmins = { | |
734 | 763 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
735 | 764 | then 1 | |
736 | 765 | else 0 | |
737 | 766 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
738 | 767 | then 1 | |
739 | 768 | else 0 | |
740 | 769 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
741 | 770 | then 1 | |
742 | 771 | else 0 | |
743 | 772 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
744 | 773 | } | |
745 | 774 | match tx { | |
746 | 775 | case inv: InvokeScriptTransaction => | |
747 | 776 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
748 | 777 | then (inv.function == "takeIntoAccountExtraFunds") | |
749 | 778 | else false | |
750 | 779 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
751 | 780 | then true | |
752 | 781 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
753 | 782 | then true | |
754 | 783 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
755 | 784 | then true | |
756 | 785 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
757 | 786 | if (if (callTakeIntoAccount) | |
758 | 787 | then signedByAdmin | |
759 | 788 | else false) | |
760 | 789 | then true | |
761 | 790 | else multiSignedByAdmins | |
762 | 791 | case _ => | |
763 | 792 | multiSignedByAdmins | |
764 | 793 | } | |
765 | 794 | } | |
766 | 795 |
github/deemru/w8io/169f3d6 112.70 ms ◑