tx · 9epzN5MhX2XGfVJSStYggB9krcGFaViUUWQLVfsKQGac

3MvMXhKFMPz4BuZj9Jr9UysuxbWFKRJZgb3:  -0.10000000 Waves

2023.01.24 12:05 [2418837] smart account 3MvMXhKFMPz4BuZj9Jr9UysuxbWFKRJZgb3 > SELF 0.00000000 Waves

{ "type": 13, "id": "9epzN5MhX2XGfVJSStYggB9krcGFaViUUWQLVfsKQGac", "fee": 10000000, "feeAssetId": null, "timestamp": 1674551208317, "version": 2, "chainId": 84, "sender": "3MvMXhKFMPz4BuZj9Jr9UysuxbWFKRJZgb3", "senderPublicKey": "DsnSbWaHh9UERrdY9ujfzmjph8zAbKdZPnUkX2hHFAZw", "proofs": [ "5HnKe3HGUDmkFfioVHnHP4n4bCdrELLwfvR9FhaZ8GuFq9Ltz9at3Vh3V4iANFgRdXxwCveHdYKRZoo3iBE28rs9", "2jFfAZrSJ5gUHVCxkYqE3Aoyx6uEmnmLzLBPSxw57QzVxSKq5qUTjAtVq7fSnzaRCKhQoLK5ooV43BTt5xkFWJoo" ], "script": "base64:BgJJCAISAwoBBBIECgIEARIGCgQBAQQBEgMKAQESBgoEAQgBARIECgIBARIDCgEBEgASABIAEgMKAQESBQoDBAEIEgASBAoCAQESAG0AB3ZlcnNpb24CBTIuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMAC2tEZXByZWNhdGVkAgtkZXByZWNhdGVkXwAJa0Fzc2V0SWRBAgpBX2Fzc2V0X2lkAAlrQXNzZXRJZEICCkJfYXNzZXRfaWQACWtCYWxhbmNlQQIPQV9hc3NldF9iYWxhbmNlAAlrQmFsYW5jZUICD0JfYXNzZXRfYmFsYW5jZQANa1NoYXJlQXNzZXRJZAIOc2hhcmVfYXNzZXRfaWQAEWtTaGFyZUFzc2V0U3VwcGx5AhJzaGFyZV9hc3NldF9zdXBwbHkABGtGZWUCCmNvbW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RoaXMJAAACCAUDaW52CGZ1bmN0aW9uAhl0YWtlSW50b0FjY291bnRFeHRyYUZ1bmRzBwQNc2lnbmVkQnlBZG1pbgMDAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkyBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkzBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAURYWRtaW5QdWJLZXlJbnZva2UDAwUTY2FsbFRha2VJbnRvQWNjb3VudAUNc2lnbmVkQnlBZG1pbgcGBRNtdWx0aVNpZ25lZEJ5QWRtaW5zBRNtdWx0aVNpZ25lZEJ5QWRtaW5zvhr87A==", "height": 2418837, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6UgAP4es1pmcvqtLGEP7p3RASGL1M31EK7SquG6NY8Bg Next: 8rNSW1bvagcYARswfJfhVhDwwqWBZFQnWYHugVb9vckH Diff:
OldNewDifferences
88 let kActive = "active"
99
1010 let kActiveGlob = "active_all_contracts"
11+
12+let kDeprecated = "deprecated_"
1113
1214 let kAssetIdA = "A_asset_id"
1315
5052 let kPeriodLength = "period_length"
5153
5254 let kStartHeight = "start_height"
55+
56+let kDAppThreshold = "dApp_threshold"
5357
5458 let kAdminPubKey1 = "admin_pub_1"
5559
115119
116120 let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
117121
122+let deprecatedPool = valueOrElse(getBoolean(oracle, (kDeprecated + toString(this))), false)
123+
118124 let strAssetIdA = getStringValue(this, kAssetIdA)
119125
120126 let strAssetIdB = getStringValue(this, kAssetIdB)
169175
170176 let digits8 = 8
171177
172-let dAppThreshold = 50
178+let exchangeRatioLimitMin = 60000000
173179
174-let dAppThresholdScale2 = 100
175-
176-let exchangeRatioLimitMin = 90000000
177-
178-let exchangeRatioLimitMax = 110000000
180+let exchangeRatioLimitMax = 140000000
179181
180182 let alpha = 50
181183
337339 else throw("DApp is inactive at this moment")
338340
339341
342+func isDepricated () = if (!(deprecatedPool))
343+ then unit
344+ else throw("Pool is deprecated. Only withdraw action allowed.")
345+
346+
340347 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
341348 then unit
342349 else throw("Only admin can call this function")
353360 func throwOnePayment () = throw("One attached payment expected")
354361
355362
356-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))
357-
358-
359363 func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
360364
361365
366370
367371 func calcStakingParams (stake,amount,assetId) = if (stake)
368372 then {
369- let $t01050410570 = calcStakingFuncAndAddres(stake, assetId)
370- let call = $t01050410570._1
371- let stakingAddr = $t01050410570._2
373+ let $t01044410510 = calcStakingFuncAndAddres(stake, assetId)
374+ let call = $t01044410510._1
375+ let stakingAddr = $t01044410510._2
372376 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
373377 }
374378 else {
375- let $t01065610722 = calcStakingFuncAndAddres(stake, assetId)
376- let call = $t01065610722._1
377- let stakingAddr = $t01065610722._2
379+ let $t01059610662 = calcStakingFuncAndAddres(stake, assetId)
380+ let call = $t01059610662._1
381+ let stakingAddr = $t01059610662._2
378382 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
379383 }
380384
406410 }
407411
408412
413+func checkDAppThreshold (newBalanceA,newBalanceB,pmtAssetId) = {
414+ let dAppThreshold = getIntegerValue(this, kDAppThreshold)
415+ let ratio = if (if ((pmtAssetId == assetIdA))
416+ then (newBalanceA > newBalanceB)
417+ else false)
418+ then fraction(newBalanceA, 1, newBalanceB, CEILING)
419+ else if (if ((pmtAssetId == assetIdB))
420+ then (newBalanceB > newBalanceA)
421+ else false)
422+ then fraction(newBalanceB, 1, newBalanceA, CEILING)
423+ else 0
424+ if ((ratio > dAppThreshold))
425+ then {
426+ let $t01240712515 = if ((pmtAssetId == assetIdA))
427+ then $Tuple2(assetNameB, assetNameA)
428+ else $Tuple2(assetNameA, assetNameB)
429+ let token1 = $t01240712515._1
430+ let token2 = $t01240712515._2
431+ throw((((("Buying " + token1) + " is temporarily unavailable due to the ") + token2) + " depeg"))
432+ }
433+ else true
434+ }
435+
436+
409437 func replenishWithTwoTokensCalc (i,stakeFarming,lockType) = {
410438 let pmtAssetIdA = i.payments[0].assetId
411439 let pmtAssetIdB = i.payments[1].assetId
412440 let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA)
413441 let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB)
414- let $t01231312390 = getAssetInfo(pmtAssetIdA)
415- let pmtStrAssetIdA = $t01231312390._1
416- let pmtAssetNameA = $t01231312390._2
417- let pmtDecimalsA = $t01231312390._3
418- let $t01239512512 = getAssetInfo(pmtAssetIdB)
419- let pmtStrAssetIdB = $t01239512512._1
420- let pmtAssetNameB = $t01239512512._2
421- let pmtDecimalsB = $t01239512512._3
422- let $t01251713021 = if ((ratioShareTokensInB > ratioShareTokensInA))
442+ let $t01297513052 = getAssetInfo(pmtAssetIdA)
443+ let pmtStrAssetIdA = $t01297513052._1
444+ let pmtAssetNameA = $t01297513052._2
445+ let pmtDecimalsA = $t01297513052._3
446+ let $t01305713174 = getAssetInfo(pmtAssetIdB)
447+ let pmtStrAssetIdB = $t01305713174._1
448+ let pmtAssetNameB = $t01305713174._2
449+ let pmtDecimalsB = $t01305713174._3
450+ let $t01317913683 = if ((ratioShareTokensInB > ratioShareTokensInA))
423451 then {
424452 let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING)
425453 $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA)
428456 let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING)
429457 $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB)
430458 }
431- let pmtAmountA = $t01251713021._1
432- let pmtAmountB = $t01251713021._2
433- let change = $t01251713021._3
434- let changeAssetId = $t01251713021._4
435- let shareTokenRatio = $t01251713021._5
459+ let pmtAmountA = $t01317913683._1
460+ let pmtAmountB = $t01317913683._2
461+ let change = $t01317913683._3
462+ let changeAssetId = $t01317913683._4
463+ let shareTokenRatio = $t01317913683._5
436464 let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8)
437465 if (if ((size(i.payments) != 2))
438466 then (size(i.payments) != 3)
487515
488516
489517 func replenishWithOneTokenCalc (i,virtualSwapTokenPay,virtualSwapTokenGet,stakeFarming,lockType) = {
490- let $t01541115486 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
491- let pmtAmount = $t01541115486._1
492- let pmtAssetId = $t01541115486._2
493- let $t01549115564 = getAssetInfo(pmtAssetId)
494- let pmtStrAssetId = $t01549115564._1
495- let pmtAssetName = $t01549115564._2
496- let pmtDecimals = $t01549115564._3
518+ let $t01607316148 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
519+ let pmtAmount = $t01607316148._1
520+ let pmtAssetId = $t01607316148._2
521+ let $t01615316226 = getAssetInfo(pmtAssetId)
522+ let pmtStrAssetId = $t01615316226._1
523+ let pmtAssetName = $t01615316226._2
524+ let pmtDecimals = $t01615316226._3
497525 let pmtMinThreshold = 5000000
498526 let thresholdValueForMinTolerance = 50000000
499527 let tolerance = if ((thresholdValueForMinTolerance > pmtAmount))
515543 else false)
516544 then throwAssets()
517545 else {
518- let $t01657117213 = if ((pmtAssetId == assetIdA))
546+ let $t01722817870 = if ((pmtAssetId == assetIdA))
519547 then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB)
520548 else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount))
521- let virtualReplenishA = $t01657117213._1
522- let virtualReplenishB = $t01657117213._2
523- let balanceAfterSwapA = $t01657117213._3
524- let balanceAfterSwapB = $t01657117213._4
525- let newBalanceA = $t01657117213._5
526- let newBalanceB = $t01657117213._6
549+ let virtualReplenishA = $t01722817870._1
550+ let virtualReplenishB = $t01722817870._2
551+ let balanceAfterSwapA = $t01722817870._3
552+ let balanceAfterSwapB = $t01722817870._4
553+ let newBalanceA = $t01722817870._5
554+ let newBalanceB = $t01722817870._6
527555 let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB)
528556 let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB))
529- let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
530557 if (if ((slippageValueMinForSwap >= fraction(scale8, invariant, invariantNew)))
531558 then true
532559 else (invariant > invariantNew))
535562 then true
536563 else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish))
537564 then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect")
538- else if (if ((dAppThresholdAmount > newBalanceA))
539- then true
540- else (dAppThresholdAmount > newBalanceB))
541- then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
565+ else if (!(checkDAppThreshold(newBalanceA, newBalanceB, pmtAssetId)))
566+ then throw()
542567 else {
543568 let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA)
544569 let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB)
547572 let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6)
548573 let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply)
549574 let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply)
550- let $t01920319498 = if ((pmtStrAssetId == strAssetIdA))
575+ let $t01962119904 = if ((pmtStrAssetId == strAssetIdA))
551576 then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB)
552577 else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA)
553- let stakeAmount = $t01920319498._1
554- let unstakeAmount = $t01920319498._2
555- let unstakeAsset = $t01920319498._3
578+ let stakeAmount = $t01962119904._1
579+ let unstakeAmount = $t01962119904._2
580+ let unstakeAsset = $t01962119904._3
556581 let stake1 = if (contains(stakingAssets, pmtStrAssetId))
557582 then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil)
558583 else 0
592617
593618
594619 func withdrawCalc (i,unlockAmount) = {
595- let $t02148521820 = if ((size(i.payments) == 1))
620+ let $t02175322088 = if ((size(i.payments) == 1))
596621 then if ((i.payments[0].assetId != shareAssetId))
597622 then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
598623 else $Tuple2(i.payments[0].amount, i.payments[0].assetId)
599624 else $Tuple2(0, shareAssetId)
600- let pmtAmount = $t02148521820._1
601- let pmtAssetId = $t02148521820._2
625+ let pmtAmount = $t02175322088._1
626+ let pmtAssetId = $t02175322088._2
602627 if (!(hasEnoughBalance))
603628 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
604629 else {
632657
633658 @Callable(i)
634659 func init (firstHarvest) = {
635- let $t02337223449 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
636- let pmtAmountA = $t02337223449._1
637- let pmtAssetIdA = $t02337223449._2
638- let $t02345423531 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
639- let pmtAmountB = $t02345423531._1
640- let pmtAssetIdB = $t02345423531._2
641- let $t02353623613 = getAssetInfo(pmtAssetIdA)
642- let pmtStrAssetIdA = $t02353623613._1
643- let pmtAssetNameA = $t02353623613._2
644- let pmtDecimalsA = $t02353623613._3
645- let $t02361823695 = getAssetInfo(pmtAssetIdB)
646- let pmtStrAssetIdB = $t02361823695._1
647- let pmtAssetNameB = $t02361823695._2
648- let pmtDecimalsB = $t02361823695._3
660+ let $t02364023717 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
661+ let pmtAmountA = $t02364023717._1
662+ let pmtAssetIdA = $t02364023717._2
663+ let $t02372223799 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
664+ let pmtAmountB = $t02372223799._1
665+ let pmtAssetIdB = $t02372223799._2
666+ let $t02380423881 = getAssetInfo(pmtAssetIdA)
667+ let pmtStrAssetIdA = $t02380423881._1
668+ let pmtAssetNameA = $t02380423881._2
669+ let pmtDecimalsA = $t02380423881._3
670+ let $t02388623963 = getAssetInfo(pmtAssetIdB)
671+ let pmtStrAssetIdB = $t02388623963._1
672+ let pmtAssetNameB = $t02388623963._2
673+ let pmtDecimalsB = $t02388623963._3
649674 if (isDefined(getBoolean(this, kActive)))
650675 then throwIsActive()
651676 else if ((pmtAssetIdA == pmtAssetIdB))
668693 else 0
669694 if ((stake2 == stake2))
670695 then {
671- 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)]
696+ 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")), IntegerEntry(kDAppThreshold, 3), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)]
672697 if (firstHarvest)
673698 then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
674699 else baseEntry
682707
683708
684709 @Callable(i)
685-func replenishWithTwoTokensV2 (stakeFarming,lockType) = valueOrElse(isActive(), replenishWithTwoTokensCalc(i, stakeFarming, lockType))
710+func replenishWithTwoTokensV2 (stakeFarming,lockType) = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithTwoTokensCalc(i, stakeFarming, lockType)))
686711
687712
688713
689714 @Callable(i)
690-func replenishWithOneTokenV2 (virtualSwapTokenPay,virtualSwapTokenGet,stakeFarming,lockType) = valueOrElse(isActive(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, stakeFarming, lockType))
715+func replenishWithOneTokenV2 (virtualSwapTokenPay,virtualSwapTokenGet,stakeFarming,lockType) = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, stakeFarming, lockType)))
691716
692717
693718
697722
698723
699724 @Callable(i)
700-func withdrawOneToken (unlockAmount,withdrawAsset,estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), {
701- let $t02706527400 = if ((size(i.payments) == 1))
725+func withdrawOneToken (unlockAmount,withdrawAsset,estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), valueOrElse(isDepricated(), {
726+ let $t02752527884 = if ((size(i.payments) == 1))
702727 then if ((i.payments[0].assetId != shareAssetId))
703728 then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
704729 else $Tuple2(i.payments[0].amount, i.payments[0].assetId)
705730 else $Tuple2(0, shareAssetId)
706- let pmtAmount = $t02706527400._1
707- let pmtAssetId = $t02706527400._2
731+ let pmtAmount = $t02752527884._1
732+ let pmtAssetId = $t02752527884._2
708733 let withdrawAmount = (pmtAmount + unlockAmount)
709734 if (if ((withdrawAsset != strAssetIdA))
710735 then (withdrawAsset != strAssetIdB)
730755 else calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, amountToPayA, assetIdA, newVirtBalcA, newVirtBalcB, invariantCalc(newVirtBalcA, newVirtBalcB))
731756 let govReward = fraction(amountExchangedWithFee, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
732757 let amountExchanged = fraction(amountExchangedWithFee, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
733- let $t02900329332 = if ((withdrawAsset == strAssetIdA))
734- then $Tuple3((amountToPayA + amountExchanged), (((balanceA - amountToPayA) - amountExchanged) - govReward), balanceB)
735- else $Tuple3((amountToPayB + amountExchanged), balanceA, (((balanceB - amountToPayB) - amountExchanged) - govReward))
736- let amountToPay = $t02900329332._1
737- let balanceANew = $t02900329332._2
738- let balanceBNew = $t02900329332._3
739- let invariantCalculated = invariantCalc(balanceANew, balanceBNew)
740- let stake1 = if (contains(stakingAssets, withdrawAsset))
741- then invoke(this, "stakeUnstake", [false, (amountToPay + govReward), withdrawAsset], nil)
742- else 0
743- if ((stake1 == stake1))
744- then [IntegerEntry(kBalanceA, balanceANew), IntegerEntry(kBalanceB, balanceBNew), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, withdrawAmount), ScriptTransfer(i.caller, amountToPay, fromBase58String(withdrawAsset)), ScriptTransfer(moneyBoxAddress, govReward, fromBase58String(withdrawAsset))]
745- else throw("Strict value is not equal to itself.")
758+ let $t02957529949 = if ((withdrawAsset == strAssetIdA))
759+ then $Tuple4((amountToPayA + amountExchanged), (((balanceA - amountToPayA) - amountExchanged) - govReward), balanceB, assetIdB)
760+ else $Tuple4((amountToPayB + amountExchanged), balanceA, (((balanceB - amountToPayB) - amountExchanged) - govReward), assetIdA)
761+ let amountToPay = $t02957529949._1
762+ let balanceANew = $t02957529949._2
763+ let balanceBNew = $t02957529949._3
764+ let virtAssetId = $t02957529949._4
765+ if (!(checkDAppThreshold(balanceANew, balanceBNew, virtAssetId)))
766+ then throw()
767+ else {
768+ let invariantCalculated = invariantCalc(balanceANew, balanceBNew)
769+ let stake1 = if (contains(stakingAssets, withdrawAsset))
770+ then invoke(this, "stakeUnstake", [false, (amountToPay + govReward), withdrawAsset], nil)
771+ else 0
772+ if ((stake1 == stake1))
773+ then [IntegerEntry(kBalanceA, balanceANew), IntegerEntry(kBalanceB, balanceBNew), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, withdrawAmount), ScriptTransfer(i.caller, amountToPay, fromBase58String(withdrawAsset)), ScriptTransfer(moneyBoxAddress, govReward, fromBase58String(withdrawAsset))]
774+ else throw("Strict value is not equal to itself.")
775+ }
746776 }
747777 else throw("Strict value is not equal to itself.")
748778 }
749- })
779+ }))
750780
751781
752782
753783 @Callable(i)
754-func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), {
755- let $t03020530280 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
756- let pmtAmount = $t03020530280._1
757- let pmtAssetId = $t03020530280._2
784+func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), valueOrElse(isDepricated(), {
785+ let $t03101931094 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
786+ let pmtAmount = $t03101931094._1
787+ let pmtAssetId = $t03101931094._2
758788 if ((0 >= estimatedAmountToReceive))
759789 then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
760790 else if ((minAmountToReceive > estimatedAmountToReceive))
781811 let feeDiscount = calculateFeeDiscount(i.originCaller)
782812 let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
783813 let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
784- let $t03176432026 = if ((pmtAssetId == assetIdA))
814+ let $t03269032968 = if ((pmtAssetId == assetIdA))
785815 then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward))
786816 else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount))
787- let newBalanceA = $t03176432026._1
788- let newBalanceB = $t03176432026._2
789- let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
790- if (if ((dAppThresholdAmount > newBalanceA))
791- then true
792- else (dAppThresholdAmount > newBalanceB))
793- then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
817+ let newBalanceA = $t03269032968._1
818+ let newBalanceB = $t03269032968._2
819+ if (!(checkDAppThreshold(newBalanceA, newBalanceB, pmtAssetId)))
820+ then throw()
794821 else {
795- let $t03232532398 = getAssetInfo(pmtAssetId)
796- let pmtStrAssetId = $t03232532398._1
797- let pmtAssetName = $t03232532398._2
798- let pmtDecimals = $t03232532398._3
799- let $t03241132488 = getAssetInfo(sendAssetId)
800- let sendStrAssetId = $t03241132488._1
801- let sendAssetName = $t03241132488._2
802- let sendDecimals = $t03241132488._3
822+ let $t03307433147 = getAssetInfo(pmtAssetId)
823+ let pmtStrAssetId = $t03307433147._1
824+ let pmtAssetName = $t03307433147._2
825+ let pmtDecimals = $t03307433147._3
826+ let $t03316033237 = getAssetInfo(sendAssetId)
827+ let sendStrAssetId = $t03316033237._1
828+ let sendAssetName = $t03316033237._2
829+ let sendDecimals = $t03316033237._3
803830 let stake1 = if (contains(stakingAssets, pmtStrAssetId))
804831 then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
805832 else 0
815842 else throw("Strict value is not equal to itself.")
816843 }
817844 }
818- })
845+ }))
819846
820847
821848
894921 func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
895922 then throw("Only contract itself can invoke this function")
896923 else {
897- let $t03593236035 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
898- let call = $t03593236035._1
899- let addr = $t03593236035._2
900- let params = $t03593236035._3
901- let payments = $t03593236035._4
924+ let $t03688936992 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
925+ let call = $t03688936992._1
926+ let addr = $t03688936992._2
927+ let params = $t03688936992._3
928+ let payments = $t03688936992._4
902929 let inv = invoke(addr, call, params, payments)
903930 if ((inv == inv))
904931 then nil
908935
909936
910937 @Callable(i)
911-func replenishWithTwoTokens () = valueOrElse(isActive(), replenishWithTwoTokensCalc(i, false, 0))
938+func replenishWithTwoTokens () = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithTwoTokensCalc(i, false, 0)))
912939
913940
914941
915942 @Callable(i)
916-func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, false, 0))
943+func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, false, 0)))
917944
918945
919946
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let version = "2.0.0"
55
66 let kVersion = "version"
77
88 let kActive = "active"
99
1010 let kActiveGlob = "active_all_contracts"
11+
12+let kDeprecated = "deprecated_"
1113
1214 let kAssetIdA = "A_asset_id"
1315
1416 let kAssetIdB = "B_asset_id"
1517
1618 let kBalanceA = "A_asset_balance"
1719
1820 let kBalanceB = "B_asset_balance"
1921
2022 let kShareAssetId = "share_asset_id"
2123
2224 let kShareAssetSupply = "share_asset_supply"
2325
2426 let kFee = "commission"
2527
2628 let kInvariant = "invariant"
2729
2830 let kCause = "shutdown_cause"
2931
3032 let kUSDNAddress = "staking_usdnnsbt_address"
3133
3234 let kEURNAddress = "staking_eurn_address"
3335
3436 let kDiscounts = "discounts"
3537
3638 let kDiscountValues = "discount_values"
3739
3840 let kUserSwopInGov = "_SWOP_amount"
3941
4042 let kUserGSwopInGov = "_GSwop_amount"
4143
4244 let kFirstHarvest = "first_harvest"
4345
4446 let kFirstHarvestHeight = "first_harvest_height"
4547
4648 let kShareLimit = "share_limit_on_first_harvest"
4749
4850 let kBasePeriod = "base_period"
4951
5052 let kPeriodLength = "period_length"
5153
5254 let kStartHeight = "start_height"
55+
56+let kDAppThreshold = "dApp_threshold"
5357
5458 let kAdminPubKey1 = "admin_pub_1"
5559
5660 let kAdminPubKey2 = "admin_pub_2"
5761
5862 let kAdminPubKey3 = "admin_pub_3"
5963
6064 let kAdminInvokePubKey = "admin_invoke_pub"
6165
6266 let kMoneyBoxAddress = "money_box_address"
6367
6468 let kGovAddress = "governance_address"
6569
6670 let kFarmingAddress = "farming_address"
6771
6872 let kVotingAddress = "voting_address"
6973
7074 let kUSDNAssetId = "usdn_asset_id"
7175
7276 let kStakingAssets = "staking_assets"
7377
7478 let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
7579
7680 func getBase58FromOracle (key) = match getString(oracle, key) {
7781 case string: String =>
7882 fromBase58String(string)
7983 case nothing =>
8084 throw((key + "is empty"))
8185 }
8286
8387
8488 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
8589
8690 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
8791
8892 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
8993
9094 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
9195
9296 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
9397
9498 let govAddress = Address(getBase58FromOracle(kGovAddress))
9599
96100 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
97101
98102 let votingAddress = Address(getBase58FromOracle(kVotingAddress))
99103
100104 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
101105
102106 let USDN = getBase58FromOracle(kUSDNAssetId)
103107
104108 let stakingAssets = getStringValue(oracle, kStakingAssets)
105109
106110 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
107111
108112 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
109113
110114 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
111115
112116 let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
113117
114118 let active = getBooleanValue(this, kActive)
115119
116120 let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
117121
122+let deprecatedPool = valueOrElse(getBoolean(oracle, (kDeprecated + toString(this))), false)
123+
118124 let strAssetIdA = getStringValue(this, kAssetIdA)
119125
120126 let strAssetIdB = getStringValue(this, kAssetIdB)
121127
122128 let assetIdA = if ((strAssetIdA == "WAVES"))
123129 then unit
124130 else fromBase58String(strAssetIdA)
125131
126132 let assetIdB = if ((strAssetIdB == "WAVES"))
127133 then unit
128134 else fromBase58String(strAssetIdB)
129135
130136 let assetNameA = match assetIdA {
131137 case id: ByteVector =>
132138 value(assetInfo(id)).name
133139 case waves: Unit =>
134140 "WAVES"
135141 case _ =>
136142 throw("Match error")
137143 }
138144
139145 let assetNameB = match assetIdB {
140146 case id: ByteVector =>
141147 value(assetInfo(id)).name
142148 case waves: Unit =>
143149 "WAVES"
144150 case _ =>
145151 throw("Match error")
146152 }
147153
148154 let balanceA = getIntegerValue(this, kBalanceA)
149155
150156 let balanceB = getIntegerValue(this, kBalanceB)
151157
152158 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
153159
154160 let shareAssetSupply = getIntegerValue(this, kShareAssetSupply)
155161
156162 let invariant = getIntegerValue(this, kInvariant)
157163
158164 let fee = getIntegerValue(this, kFee)
159165
160166 let feeGovernance = fraction(fee, 40, 100)
161167
162168 let feeScale6 = 1000000
163169
164170 let scale3 = 1000
165171
166172 let scale8 = 100000000
167173
168174 let scale16 = 10000000000000000
169175
170176 let digits8 = 8
171177
172-let dAppThreshold = 50
178+let exchangeRatioLimitMin = 60000000
173179
174-let dAppThresholdScale2 = 100
175-
176-let exchangeRatioLimitMin = 90000000
177-
178-let exchangeRatioLimitMax = 110000000
180+let exchangeRatioLimitMax = 140000000
179181
180182 let alpha = 50
181183
182184 let alphaDigits = 2
183185
184186 let beta = 4600000000000000
185187
186188 func accountBalance (assetId) = match assetId {
187189 case id: ByteVector =>
188190 assetBalance(this, id)
189191 case waves: Unit =>
190192 wavesBalance(this).available
191193 case _ =>
192194 throw("Match error")
193195 }
194196
195197
196198 func stakedAmount (assetId) = {
197199 let stakedAmountCalculated = match assetId {
198200 case aId: ByteVector =>
199201 if ((aId == USDN))
200202 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
201203 else 0
202204 case _: Unit =>
203205 0
204206 case _ =>
205207 throw("Match error")
206208 }
207209 match stakedAmountCalculated {
208210 case i: Int =>
209211 i
210212 case _ =>
211213 0
212214 }
213215 }
214216
215217
216218 let stakedAmountA = stakedAmount(assetIdA)
217219
218220 let stakedAmountB = stakedAmount(assetIdB)
219221
220222 let availableBalanceA = (balanceA - stakedAmountA)
221223
222224 let availableBalanceB = (balanceB - stakedAmountB)
223225
224226 let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA)
225227
226228 let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB)
227229
228230 let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA))
229231 then (accountBalanceWithStakedB >= balanceB)
230232 else false
231233
232234 func skewness (x,y) = ((fraction(scale16, x, y) + fraction(scale16, y, x)) / 2)
233235
234236
235237 func invariantCalc (x,y) = {
236238 let sk = skewness(x, y)
237239 (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)))
238240 }
239241
240242
241243 func calculateSendAmount (amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount,tokenId,balcA,balcB,invCur) = {
242244 let worstAllowedNewInvariantRatio = (scale16 - ((scale16 * 1) / 10000000))
243245 let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount)
244246 let x = (balcA + tokenReceiveAmount)
245247 let y = (balcB + tokenReceiveAmount)
246248 func getStepAmount (acc,step) = if ((acc._1 == -1))
247249 then {
248250 let amountToSend = (amountToSendEstimated - (((step * deltaBetweenMaxAndMinSendValue) / 3) / scale3))
249251 let stepInvariant = if ((tokenId == assetIdA))
250252 then invariantCalc(x, (balcB - amountToSend))
251253 else invariantCalc((balcA - amountToSend), y)
252254 if ((stepInvariant > invCur))
253255 then $Tuple2(amountToSend, stepInvariant)
254256 else $Tuple2(-1, 0)
255257 }
256258 else acc
257259
258260 let amountToSendMin = getStepAmount($Tuple2(-1, 0), 3000)
259261 if ((0 > amountToSendMin._1))
260262 then throw("Price is worse than minReceived")
261263 else {
262264 let invEstimated = if ((tokenId == assetIdA))
263265 then invariantCalc(x, (balcB - amountToSendEstimated))
264266 else if ((tokenId == assetIdB))
265267 then invariantCalc((balcA - amountToSendEstimated), y)
266268 else throw("Wrong asset in payment")
267269 if ((invCur > invEstimated))
268270 then if ((worstAllowedNewInvariantRatio >= fraction(scale16, invCur, invEstimated)))
269271 then throw("The requested price is too not profitable for user")
270272 else {
271273 let a = {
272274 let $l = [25, 200, 500]
273275 let $s = size($l)
274276 let $acc0 = $Tuple2(-1, 0)
275277 func $f0_1 ($a,$i) = if (($i >= $s))
276278 then $a
277279 else getStepAmount($a, $l[$i])
278280
279281 func $f0_2 ($a,$i) = if (($i >= $s))
280282 then $a
281283 else throw("List size exceeds 3")
282284
283285 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
284286 }
285287 if ((0 > a._1))
286288 then amountToSendMin._1
287289 else a._1
288290 }
289291 else {
290292 let a = {
291293 let $l = [-500, -200, -25]
292294 let $s = size($l)
293295 let $acc0 = $Tuple2(-1, 0)
294296 func $f0_1 ($a,$i) = if (($i >= $s))
295297 then $a
296298 else getStepAmount($a, $l[$i])
297299
298300 func $f0_2 ($a,$i) = if (($i >= $s))
299301 then $a
300302 else throw("List size exceeds 3")
301303
302304 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
303305 }
304306 let tupleSendBetter = if ((0 > a._1))
305307 then $Tuple2(amountToSendEstimated, invEstimated)
306308 else a
307309 if ((worstAllowedNewInvariantRatio >= fraction(scale16, invCur, tupleSendBetter._2)))
308310 then throw("The requested price is too not profitable for user")
309311 else tupleSendBetter._1
310312 }
311313 }
312314 }
313315
314316
315317 func getAssetInfo (assetId) = match assetId {
316318 case id: ByteVector =>
317319 let stringId = toBase58String(id)
318320 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
319321 $Tuple3(stringId, info.name, info.decimals)
320322 case waves: Unit =>
321323 $Tuple3("WAVES", "WAVES", 8)
322324 case _ =>
323325 throw("Match error")
324326 }
325327
326328
327329 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
328330
329331
330332 func throwIsActive () = throw("DApp is already active")
331333
332334
333335 func isActive () = if (if (active)
334336 then activeGlob
335337 else false)
336338 then unit
337339 else throw("DApp is inactive at this moment")
338340
339341
342+func isDepricated () = if (!(deprecatedPool))
343+ then unit
344+ else throw("Pool is deprecated. Only withdraw action allowed.")
345+
346+
340347 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
341348 then unit
342349 else throw("Only admin can call this function")
343350
344351
345352 func isSelfCall (i) = if ((this == i.caller))
346353 then unit
347354 else throw("Only contract itself can call this function")
348355
349356
350357 func throwAssets () = throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB))
351358
352359
353360 func throwOnePayment () = throw("One attached payment expected")
354361
355362
356-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))
357-
358-
359363 func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
360364
361365
362366 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
363367 then $Tuple2("lockNeutrino", stakingUSDNAddress)
364368 else $Tuple2("unlockNeutrino", stakingUSDNAddress)
365369
366370
367371 func calcStakingParams (stake,amount,assetId) = if (stake)
368372 then {
369- let $t01050410570 = calcStakingFuncAndAddres(stake, assetId)
370- let call = $t01050410570._1
371- let stakingAddr = $t01050410570._2
373+ let $t01044410510 = calcStakingFuncAndAddres(stake, assetId)
374+ let call = $t01044410510._1
375+ let stakingAddr = $t01044410510._2
372376 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
373377 }
374378 else {
375- let $t01065610722 = calcStakingFuncAndAddres(stake, assetId)
376- let call = $t01065610722._1
377- let stakingAddr = $t01065610722._2
379+ let $t01059610662 = calcStakingFuncAndAddres(stake, assetId)
380+ let call = $t01059610662._1
381+ let stakingAddr = $t01059610662._2
378382 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
379383 }
380384
381385
382386 func calculateFeeDiscount (userAddr) = {
383387 let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
384388 let gSwopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserGSwopInGov)), swopAmount)
385389 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
386390 let discounts = split(getStringValue(oracle, kDiscounts), ",")
387391 if (if ((gSwopAmount >= parseIntValue(discountValues[0])))
388392 then (parseIntValue(discountValues[1]) > gSwopAmount)
389393 else false)
390394 then (feeScale6 - parseIntValue(discounts[0]))
391395 else if (if ((gSwopAmount >= parseIntValue(discountValues[1])))
392396 then (parseIntValue(discountValues[2]) > gSwopAmount)
393397 else false)
394398 then (feeScale6 - parseIntValue(discounts[1]))
395399 else if (if ((gSwopAmount >= parseIntValue(discountValues[2])))
396400 then (parseIntValue(discountValues[3]) > gSwopAmount)
397401 else false)
398402 then (feeScale6 - parseIntValue(discounts[2]))
399403 else if (if ((gSwopAmount >= parseIntValue(discountValues[3])))
400404 then (parseIntValue(discountValues[4]) > gSwopAmount)
401405 else false)
402406 then (feeScale6 - parseIntValue(discounts[3]))
403407 else if ((gSwopAmount >= parseIntValue(discountValues[4])))
404408 then (feeScale6 - parseIntValue(discounts[4]))
405409 else feeScale6
406410 }
407411
408412
413+func checkDAppThreshold (newBalanceA,newBalanceB,pmtAssetId) = {
414+ let dAppThreshold = getIntegerValue(this, kDAppThreshold)
415+ let ratio = if (if ((pmtAssetId == assetIdA))
416+ then (newBalanceA > newBalanceB)
417+ else false)
418+ then fraction(newBalanceA, 1, newBalanceB, CEILING)
419+ else if (if ((pmtAssetId == assetIdB))
420+ then (newBalanceB > newBalanceA)
421+ else false)
422+ then fraction(newBalanceB, 1, newBalanceA, CEILING)
423+ else 0
424+ if ((ratio > dAppThreshold))
425+ then {
426+ let $t01240712515 = if ((pmtAssetId == assetIdA))
427+ then $Tuple2(assetNameB, assetNameA)
428+ else $Tuple2(assetNameA, assetNameB)
429+ let token1 = $t01240712515._1
430+ let token2 = $t01240712515._2
431+ throw((((("Buying " + token1) + " is temporarily unavailable due to the ") + token2) + " depeg"))
432+ }
433+ else true
434+ }
435+
436+
409437 func replenishWithTwoTokensCalc (i,stakeFarming,lockType) = {
410438 let pmtAssetIdA = i.payments[0].assetId
411439 let pmtAssetIdB = i.payments[1].assetId
412440 let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA)
413441 let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB)
414- let $t01231312390 = getAssetInfo(pmtAssetIdA)
415- let pmtStrAssetIdA = $t01231312390._1
416- let pmtAssetNameA = $t01231312390._2
417- let pmtDecimalsA = $t01231312390._3
418- let $t01239512512 = getAssetInfo(pmtAssetIdB)
419- let pmtStrAssetIdB = $t01239512512._1
420- let pmtAssetNameB = $t01239512512._2
421- let pmtDecimalsB = $t01239512512._3
422- let $t01251713021 = if ((ratioShareTokensInB > ratioShareTokensInA))
442+ let $t01297513052 = getAssetInfo(pmtAssetIdA)
443+ let pmtStrAssetIdA = $t01297513052._1
444+ let pmtAssetNameA = $t01297513052._2
445+ let pmtDecimalsA = $t01297513052._3
446+ let $t01305713174 = getAssetInfo(pmtAssetIdB)
447+ let pmtStrAssetIdB = $t01305713174._1
448+ let pmtAssetNameB = $t01305713174._2
449+ let pmtDecimalsB = $t01305713174._3
450+ let $t01317913683 = if ((ratioShareTokensInB > ratioShareTokensInA))
423451 then {
424452 let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING)
425453 $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA)
426454 }
427455 else {
428456 let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING)
429457 $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB)
430458 }
431- let pmtAmountA = $t01251713021._1
432- let pmtAmountB = $t01251713021._2
433- let change = $t01251713021._3
434- let changeAssetId = $t01251713021._4
435- let shareTokenRatio = $t01251713021._5
459+ let pmtAmountA = $t01317913683._1
460+ let pmtAmountB = $t01317913683._2
461+ let change = $t01317913683._3
462+ let changeAssetId = $t01317913683._4
463+ let shareTokenRatio = $t01317913683._5
436464 let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8)
437465 if (if ((size(i.payments) != 2))
438466 then (size(i.payments) != 3)
439467 else false)
440468 then throw("Two or three payments expected")
441469 else if (if ((pmtAssetIdA != assetIdA))
442470 then true
443471 else (pmtAssetIdB != assetIdB))
444472 then throwAssets()
445473 else if ((shareTokenToPayAmount == 0))
446474 then throw("Too small amount to replenish")
447475 else if ((0 > change))
448476 then throw("Change < 0")
449477 else if (!(hasEnoughBalance))
450478 then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious())
451479 else {
452480 let stake1 = if (contains(stakingAssets, pmtStrAssetIdA))
453481 then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil)
454482 else 0
455483 if ((stake1 == stake1))
456484 then {
457485 let stake2 = if (contains(stakingAssets, pmtStrAssetIdB))
458486 then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil)
459487 else 0
460488 if ((stake2 == stake2))
461489 then {
462490 let scriptActions = [IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), IntegerEntry(kInvariant, invariantCalc((balanceA + pmtAmountA), (balanceB + pmtAmountB))), ScriptTransfer(i.caller, change, changeAssetId)]
463491 if (stakeFarming)
464492 then {
465493 let stPayments = ([AttachedPayment(shareAssetId, shareTokenToPayAmount)] ++ (if ((size(i.payments) == 3))
466494 then [AttachedPayment(if ((i.payments[2].assetId == base58''))
467495 then unit
468496 else i.payments[2].assetId, i.payments[2].amount)]
469497 else nil))
470498 let re = invoke(this, "reissueShare", [shareTokenToPayAmount], nil)
471499 if ((re == re))
472500 then {
473501 let s = invoke(farmingAddress, "lockShareTokensFromPool", [i.caller.bytes, toString(this), lockType], stPayments)
474502 if ((s == s))
475503 then scriptActions
476504 else throw("Strict value is not equal to itself.")
477505 }
478506 else throw("Strict value is not equal to itself.")
479507 }
480508 else (scriptActions ++ [Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)])
481509 }
482510 else throw("Strict value is not equal to itself.")
483511 }
484512 else throw("Strict value is not equal to itself.")
485513 }
486514 }
487515
488516
489517 func replenishWithOneTokenCalc (i,virtualSwapTokenPay,virtualSwapTokenGet,stakeFarming,lockType) = {
490- let $t01541115486 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
491- let pmtAmount = $t01541115486._1
492- let pmtAssetId = $t01541115486._2
493- let $t01549115564 = getAssetInfo(pmtAssetId)
494- let pmtStrAssetId = $t01549115564._1
495- let pmtAssetName = $t01549115564._2
496- let pmtDecimals = $t01549115564._3
518+ let $t01607316148 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
519+ let pmtAmount = $t01607316148._1
520+ let pmtAssetId = $t01607316148._2
521+ let $t01615316226 = getAssetInfo(pmtAssetId)
522+ let pmtStrAssetId = $t01615316226._1
523+ let pmtAssetName = $t01615316226._2
524+ let pmtDecimals = $t01615316226._3
497525 let pmtMinThreshold = 5000000
498526 let thresholdValueForMinTolerance = 50000000
499527 let tolerance = if ((thresholdValueForMinTolerance > pmtAmount))
500528 then 100000
501529 else 1
502530 let slippageValueMinForReplenish = (scale8 - ((scale8 * tolerance) / 10000000))
503531 let slippageValueMaxForReplenish = (scale8 + ((scale8 * tolerance) / 10000000))
504532 let slippageValueMinForSwap = (scale8 - ((scale8 * 1) / 10000000))
505533 if ((pmtMinThreshold > pmtAmount))
506534 then throw((((("Payment amount " + toString(pmtAmount)) + " does not exceed the minimum amount of ") + toString(pmtMinThreshold)) + " tokens"))
507535 else if (if ((size(i.payments) != 1))
508536 then (size(i.payments) != 2)
509537 else false)
510538 then throw("One or two payments expected")
511539 else if (!(hasEnoughBalance))
512540 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
513541 else if (if ((pmtAssetId != assetIdA))
514542 then (pmtAssetId != assetIdB)
515543 else false)
516544 then throwAssets()
517545 else {
518- let $t01657117213 = if ((pmtAssetId == assetIdA))
546+ let $t01722817870 = if ((pmtAssetId == assetIdA))
519547 then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB)
520548 else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount))
521- let virtualReplenishA = $t01657117213._1
522- let virtualReplenishB = $t01657117213._2
523- let balanceAfterSwapA = $t01657117213._3
524- let balanceAfterSwapB = $t01657117213._4
525- let newBalanceA = $t01657117213._5
526- let newBalanceB = $t01657117213._6
549+ let virtualReplenishA = $t01722817870._1
550+ let virtualReplenishB = $t01722817870._2
551+ let balanceAfterSwapA = $t01722817870._3
552+ let balanceAfterSwapB = $t01722817870._4
553+ let newBalanceA = $t01722817870._5
554+ let newBalanceB = $t01722817870._6
527555 let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB)
528556 let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB))
529- let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
530557 if (if ((slippageValueMinForSwap >= fraction(scale8, invariant, invariantNew)))
531558 then true
532559 else (invariant > invariantNew))
533560 then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value")
534561 else if (if ((slippageValueMinForReplenish > ratioVirtualBalanceToVirtualReplenish))
535562 then true
536563 else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish))
537564 then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect")
538- else if (if ((dAppThresholdAmount > newBalanceA))
539- then true
540- else (dAppThresholdAmount > newBalanceB))
541- then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
565+ else if (!(checkDAppThreshold(newBalanceA, newBalanceB, pmtAssetId)))
566+ then throw()
542567 else {
543568 let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA)
544569 let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB)
545570 let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8)
546571 let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6)
547572 let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6)
548573 let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply)
549574 let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply)
550- let $t01920319498 = if ((pmtStrAssetId == strAssetIdA))
575+ let $t01962119904 = if ((pmtStrAssetId == strAssetIdA))
551576 then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB)
552577 else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA)
553- let stakeAmount = $t01920319498._1
554- let unstakeAmount = $t01920319498._2
555- let unstakeAsset = $t01920319498._3
578+ let stakeAmount = $t01962119904._1
579+ let unstakeAmount = $t01962119904._2
580+ let unstakeAsset = $t01962119904._3
556581 let stake1 = if (contains(stakingAssets, pmtStrAssetId))
557582 then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil)
558583 else 0
559584 if ((stake1 == stake1))
560585 then {
561586 let stake2 = if (contains(stakingAssets, unstakeAsset))
562587 then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil)
563588 else 0
564589 if ((stake2 == stake2))
565590 then {
566591 let scriptActions = [IntegerEntry(kBalanceA, (newBalanceA - governanceRewardTokenA)), IntegerEntry(kBalanceB, (newBalanceB - governanceRewardTokenB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmountAfterFee)), IntegerEntry(kInvariant, invariantCalc((newBalanceA - governanceRewardTokenA), (newBalanceB - governanceRewardTokenB))), ScriptTransfer(moneyBoxAddress, governanceRewardTokenA, assetIdA), ScriptTransfer(moneyBoxAddress, governanceRewardTokenB, assetIdB)]
567592 if (stakeFarming)
568593 then {
569594 let stPayments = ([AttachedPayment(shareAssetId, shareTokenToPayAmountAfterFee)] ++ (if ((size(i.payments) == 2))
570595 then [AttachedPayment(if ((i.payments[1].assetId == base58''))
571596 then unit
572597 else i.payments[1].assetId, i.payments[1].amount)]
573598 else nil))
574599 let re = invoke(this, "reissueShare", [shareTokenToPayAmountAfterFee], nil)
575600 if ((re == re))
576601 then {
577602 let s = invoke(farmingAddress, "lockShareTokensFromPool", [i.caller.bytes, toString(this), lockType], stPayments)
578603 if ((s == s))
579604 then scriptActions
580605 else throw("Strict value is not equal to itself.")
581606 }
582607 else throw("Strict value is not equal to itself.")
583608 }
584609 else (scriptActions ++ [Reissue(shareAssetId, shareTokenToPayAmountAfterFee, true), ScriptTransfer(i.caller, shareTokenToPayAmountAfterFee, shareAssetId)])
585610 }
586611 else throw("Strict value is not equal to itself.")
587612 }
588613 else throw("Strict value is not equal to itself.")
589614 }
590615 }
591616 }
592617
593618
594619 func withdrawCalc (i,unlockAmount) = {
595- let $t02148521820 = if ((size(i.payments) == 1))
620+ let $t02175322088 = if ((size(i.payments) == 1))
596621 then if ((i.payments[0].assetId != shareAssetId))
597622 then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
598623 else $Tuple2(i.payments[0].amount, i.payments[0].assetId)
599624 else $Tuple2(0, shareAssetId)
600- let pmtAmount = $t02148521820._1
601- let pmtAssetId = $t02148521820._2
625+ let pmtAmount = $t02175322088._1
626+ let pmtAssetId = $t02175322088._2
602627 if (!(hasEnoughBalance))
603628 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
604629 else {
605630 let unlock = if ((unlockAmount > 0))
606631 then invoke(farmingAddress, "withdrawShareTokensFromPool", [i.caller.bytes, toString(this), unlockAmount], nil)
607632 else 0
608633 if ((unlock == unlock))
609634 then {
610635 let withdrawAmount = (pmtAmount + unlockAmount)
611636 let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply)
612637 let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply)
613638 let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB))
614639 let stake1 = if (contains(stakingAssets, strAssetIdA))
615640 then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil)
616641 else 0
617642 if ((stake1 == stake1))
618643 then {
619644 let stake2 = if (contains(stakingAssets, strAssetIdB))
620645 then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil)
621646 else 0
622647 if ((stake2 == stake2))
623648 then [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, withdrawAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)]
624649 else throw("Strict value is not equal to itself.")
625650 }
626651 else throw("Strict value is not equal to itself.")
627652 }
628653 else throw("Strict value is not equal to itself.")
629654 }
630655 }
631656
632657
633658 @Callable(i)
634659 func init (firstHarvest) = {
635- let $t02337223449 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
636- let pmtAmountA = $t02337223449._1
637- let pmtAssetIdA = $t02337223449._2
638- let $t02345423531 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
639- let pmtAmountB = $t02345423531._1
640- let pmtAssetIdB = $t02345423531._2
641- let $t02353623613 = getAssetInfo(pmtAssetIdA)
642- let pmtStrAssetIdA = $t02353623613._1
643- let pmtAssetNameA = $t02353623613._2
644- let pmtDecimalsA = $t02353623613._3
645- let $t02361823695 = getAssetInfo(pmtAssetIdB)
646- let pmtStrAssetIdB = $t02361823695._1
647- let pmtAssetNameB = $t02361823695._2
648- let pmtDecimalsB = $t02361823695._3
660+ let $t02364023717 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
661+ let pmtAmountA = $t02364023717._1
662+ let pmtAssetIdA = $t02364023717._2
663+ let $t02372223799 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
664+ let pmtAmountB = $t02372223799._1
665+ let pmtAssetIdB = $t02372223799._2
666+ let $t02380423881 = getAssetInfo(pmtAssetIdA)
667+ let pmtStrAssetIdA = $t02380423881._1
668+ let pmtAssetNameA = $t02380423881._2
669+ let pmtDecimalsA = $t02380423881._3
670+ let $t02388623963 = getAssetInfo(pmtAssetIdB)
671+ let pmtStrAssetIdB = $t02388623963._1
672+ let pmtAssetNameB = $t02388623963._2
673+ let pmtDecimalsB = $t02388623963._3
649674 if (isDefined(getBoolean(this, kActive)))
650675 then throwIsActive()
651676 else if ((pmtAssetIdA == pmtAssetIdB))
652677 then throw("Assets must be different")
653678 else {
654679 let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7))
655680 let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this))
656681 let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
657682 let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN))
658683 let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
659684 let shareIssueId = calculateAssetId(shareIssue)
660685 let invariantCalculated = invariantCalc(pmtAmountA, pmtAmountB)
661686 let stake1 = if (contains(stakingAssets, pmtStrAssetIdA))
662687 then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil)
663688 else 0
664689 if ((stake1 == stake1))
665690 then {
666691 let stake2 = if (contains(stakingAssets, pmtStrAssetIdB))
667692 then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil)
668693 else 0
669694 if ((stake2 == stake2))
670695 then {
671- 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)]
696+ 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")), IntegerEntry(kDAppThreshold, 3), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)]
672697 if (firstHarvest)
673698 then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
674699 else baseEntry
675700 }
676701 else throw("Strict value is not equal to itself.")
677702 }
678703 else throw("Strict value is not equal to itself.")
679704 }
680705 }
681706
682707
683708
684709 @Callable(i)
685-func replenishWithTwoTokensV2 (stakeFarming,lockType) = valueOrElse(isActive(), replenishWithTwoTokensCalc(i, stakeFarming, lockType))
710+func replenishWithTwoTokensV2 (stakeFarming,lockType) = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithTwoTokensCalc(i, stakeFarming, lockType)))
686711
687712
688713
689714 @Callable(i)
690-func replenishWithOneTokenV2 (virtualSwapTokenPay,virtualSwapTokenGet,stakeFarming,lockType) = valueOrElse(isActive(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, stakeFarming, lockType))
715+func replenishWithOneTokenV2 (virtualSwapTokenPay,virtualSwapTokenGet,stakeFarming,lockType) = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, stakeFarming, lockType)))
691716
692717
693718
694719 @Callable(i)
695720 func withdrawV2 (unlockAmount) = valueOrElse(isActive(), withdrawCalc(i, unlockAmount))
696721
697722
698723
699724 @Callable(i)
700-func withdrawOneToken (unlockAmount,withdrawAsset,estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), {
701- let $t02706527400 = if ((size(i.payments) == 1))
725+func withdrawOneToken (unlockAmount,withdrawAsset,estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), valueOrElse(isDepricated(), {
726+ let $t02752527884 = if ((size(i.payments) == 1))
702727 then if ((i.payments[0].assetId != shareAssetId))
703728 then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
704729 else $Tuple2(i.payments[0].amount, i.payments[0].assetId)
705730 else $Tuple2(0, shareAssetId)
706- let pmtAmount = $t02706527400._1
707- let pmtAssetId = $t02706527400._2
731+ let pmtAmount = $t02752527884._1
732+ let pmtAssetId = $t02752527884._2
708733 let withdrawAmount = (pmtAmount + unlockAmount)
709734 if (if ((withdrawAsset != strAssetIdA))
710735 then (withdrawAsset != strAssetIdB)
711736 else false)
712737 then throw("Incorrect withdraw asset")
713738 else if ((0 >= withdrawAmount))
714739 then throw("withdraw amount must be grater than 0")
715740 else if (!(hasEnoughBalance))
716741 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
717742 else {
718743 let unlock = if ((unlockAmount > 0))
719744 then invoke(farmingAddress, "withdrawShareTokensFromPool", [i.caller.bytes, toString(this), unlockAmount], nil)
720745 else 0
721746 if ((unlock == unlock))
722747 then {
723748 let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply)
724749 let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply)
725750 let newVirtBalcA = (balanceA - amountToPayA)
726751 let newVirtBalcB = (balanceB - amountToPayB)
727752 let feeDiscount = calculateFeeDiscount(i.originCaller)
728753 let amountExchangedWithFee = if ((withdrawAsset == strAssetIdA))
729754 then calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, amountToPayB, assetIdB, newVirtBalcA, newVirtBalcB, invariantCalc(newVirtBalcA, newVirtBalcB))
730755 else calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, amountToPayA, assetIdA, newVirtBalcA, newVirtBalcB, invariantCalc(newVirtBalcA, newVirtBalcB))
731756 let govReward = fraction(amountExchangedWithFee, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
732757 let amountExchanged = fraction(amountExchangedWithFee, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
733- let $t02900329332 = if ((withdrawAsset == strAssetIdA))
734- then $Tuple3((amountToPayA + amountExchanged), (((balanceA - amountToPayA) - amountExchanged) - govReward), balanceB)
735- else $Tuple3((amountToPayB + amountExchanged), balanceA, (((balanceB - amountToPayB) - amountExchanged) - govReward))
736- let amountToPay = $t02900329332._1
737- let balanceANew = $t02900329332._2
738- let balanceBNew = $t02900329332._3
739- let invariantCalculated = invariantCalc(balanceANew, balanceBNew)
740- let stake1 = if (contains(stakingAssets, withdrawAsset))
741- then invoke(this, "stakeUnstake", [false, (amountToPay + govReward), withdrawAsset], nil)
742- else 0
743- if ((stake1 == stake1))
744- then [IntegerEntry(kBalanceA, balanceANew), IntegerEntry(kBalanceB, balanceBNew), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, withdrawAmount), ScriptTransfer(i.caller, amountToPay, fromBase58String(withdrawAsset)), ScriptTransfer(moneyBoxAddress, govReward, fromBase58String(withdrawAsset))]
745- else throw("Strict value is not equal to itself.")
758+ let $t02957529949 = if ((withdrawAsset == strAssetIdA))
759+ then $Tuple4((amountToPayA + amountExchanged), (((balanceA - amountToPayA) - amountExchanged) - govReward), balanceB, assetIdB)
760+ else $Tuple4((amountToPayB + amountExchanged), balanceA, (((balanceB - amountToPayB) - amountExchanged) - govReward), assetIdA)
761+ let amountToPay = $t02957529949._1
762+ let balanceANew = $t02957529949._2
763+ let balanceBNew = $t02957529949._3
764+ let virtAssetId = $t02957529949._4
765+ if (!(checkDAppThreshold(balanceANew, balanceBNew, virtAssetId)))
766+ then throw()
767+ else {
768+ let invariantCalculated = invariantCalc(balanceANew, balanceBNew)
769+ let stake1 = if (contains(stakingAssets, withdrawAsset))
770+ then invoke(this, "stakeUnstake", [false, (amountToPay + govReward), withdrawAsset], nil)
771+ else 0
772+ if ((stake1 == stake1))
773+ then [IntegerEntry(kBalanceA, balanceANew), IntegerEntry(kBalanceB, balanceBNew), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, withdrawAmount), ScriptTransfer(i.caller, amountToPay, fromBase58String(withdrawAsset)), ScriptTransfer(moneyBoxAddress, govReward, fromBase58String(withdrawAsset))]
774+ else throw("Strict value is not equal to itself.")
775+ }
746776 }
747777 else throw("Strict value is not equal to itself.")
748778 }
749- })
779+ }))
750780
751781
752782
753783 @Callable(i)
754-func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), {
755- let $t03020530280 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
756- let pmtAmount = $t03020530280._1
757- let pmtAssetId = $t03020530280._2
784+func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), valueOrElse(isDepricated(), {
785+ let $t03101931094 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
786+ let pmtAmount = $t03101931094._1
787+ let pmtAssetId = $t03101931094._2
758788 if ((0 >= estimatedAmountToReceive))
759789 then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
760790 else if ((minAmountToReceive > estimatedAmountToReceive))
761791 then throw("Minimal amount can't be greater than estimated.")
762792 else if ((size(i.payments) != 1))
763793 then throwOnePayment()
764794 else if (!(hasEnoughBalance))
765795 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
766796 else if (if ((pmtAssetId != assetIdA))
767797 then (pmtAssetId != assetIdB)
768798 else false)
769799 then throwAssets()
770800 else if ((10000000 > pmtAmount))
771801 then throw("Only swap of 10.000000 or more tokens is allowed")
772802 else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
773803 then true
774804 else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
775805 then throw("Incorrect args and pmt ratio")
776806 else {
777807 let sendAssetId = if ((pmtAssetId == assetIdA))
778808 then assetIdB
779809 else assetIdA
780810 let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId, balanceA, balanceB, invariant)
781811 let feeDiscount = calculateFeeDiscount(i.originCaller)
782812 let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
783813 let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
784- let $t03176432026 = if ((pmtAssetId == assetIdA))
814+ let $t03269032968 = if ((pmtAssetId == assetIdA))
785815 then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward))
786816 else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount))
787- let newBalanceA = $t03176432026._1
788- let newBalanceB = $t03176432026._2
789- let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
790- if (if ((dAppThresholdAmount > newBalanceA))
791- then true
792- else (dAppThresholdAmount > newBalanceB))
793- then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
817+ let newBalanceA = $t03269032968._1
818+ let newBalanceB = $t03269032968._2
819+ if (!(checkDAppThreshold(newBalanceA, newBalanceB, pmtAssetId)))
820+ then throw()
794821 else {
795- let $t03232532398 = getAssetInfo(pmtAssetId)
796- let pmtStrAssetId = $t03232532398._1
797- let pmtAssetName = $t03232532398._2
798- let pmtDecimals = $t03232532398._3
799- let $t03241132488 = getAssetInfo(sendAssetId)
800- let sendStrAssetId = $t03241132488._1
801- let sendAssetName = $t03241132488._2
802- let sendDecimals = $t03241132488._3
822+ let $t03307433147 = getAssetInfo(pmtAssetId)
823+ let pmtStrAssetId = $t03307433147._1
824+ let pmtAssetName = $t03307433147._2
825+ let pmtDecimals = $t03307433147._3
826+ let $t03316033237 = getAssetInfo(sendAssetId)
827+ let sendStrAssetId = $t03316033237._1
828+ let sendAssetName = $t03316033237._2
829+ let sendDecimals = $t03316033237._3
803830 let stake1 = if (contains(stakingAssets, pmtStrAssetId))
804831 then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
805832 else 0
806833 if ((stake1 == stake1))
807834 then {
808835 let stake2 = if (contains(stakingAssets, sendStrAssetId))
809836 then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil)
810837 else 0
811838 if ((stake2 == stake2))
812839 then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], [amountMinusFee, sendAssetId])
813840 else throw("Strict value is not equal to itself.")
814841 }
815842 else throw("Strict value is not equal to itself.")
816843 }
817844 }
818- })
845+ }))
819846
820847
821848
822849 @Callable(msg)
823850 func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)])
824851
825852
826853
827854 @Callable(i)
828855 func shutdown () = valueOrElse(isAdminCall(i), if (!(active))
829856 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
830857 else suspend("Paused by admin"))
831858
832859
833860
834861 @Callable(i)
835862 func activate () = valueOrElse(isAdminCall(i), if (active)
836863 then throwIsActive()
837864 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
838865
839866
840867
841868 @Callable(i)
842869 func takeIntoAccountExtraFunds () = valueOrElse(isActive(), {
843870 let claim = if (if ((assetIdA == USDN))
844871 then true
845872 else (assetIdB == USDN))
846873 then invoke(stakingUSDNAddress, "claimRewards", nil, nil)
847874 else 0
848875 if ((claim == claim))
849876 then {
850877 let amountEnrollA = (accountBalanceWithStakedA - balanceA)
851878 let amountEnrollB = (accountBalanceWithStakedB - balanceB)
852879 let invariantNew = invariantCalc((balanceA + amountEnrollA), (balanceB + amountEnrollB))
853880 if ((i.caller != moneyBoxAddress))
854881 then throw("Only the money box can call this function")
855882 else if (if ((0 > amountEnrollA))
856883 then true
857884 else (0 > amountEnrollB))
858885 then suspend("Enroll amount negative")
859886 else if (if ((amountEnrollA == 0))
860887 then (amountEnrollB == 0)
861888 else false)
862889 then throw("No money to take")
863890 else {
864891 let stake1 = if (if (contains(stakingAssets, strAssetIdA))
865892 then (amountEnrollA > 0)
866893 else false)
867894 then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil)
868895 else 0
869896 if ((stake1 == stake1))
870897 then {
871898 let stake2 = if (if (contains(stakingAssets, strAssetIdB))
872899 then (amountEnrollB > 0)
873900 else false)
874901 then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil)
875902 else 0
876903 if ((stake2 == stake2))
877904 then [IntegerEntry(kInvariant, invariantNew), IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))]
878905 else throw("Strict value is not equal to itself.")
879906 }
880907 else throw("Strict value is not equal to itself.")
881908 }
882909 }
883910 else throw("Strict value is not equal to itself.")
884911 })
885912
886913
887914
888915 @Callable(i)
889916 func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), [IntegerEntry(kShareLimit, shareLimit)]))
890917
891918
892919
893920 @Callable(i)
894921 func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
895922 then throw("Only contract itself can invoke this function")
896923 else {
897- let $t03593236035 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
898- let call = $t03593236035._1
899- let addr = $t03593236035._2
900- let params = $t03593236035._3
901- let payments = $t03593236035._4
924+ let $t03688936992 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
925+ let call = $t03688936992._1
926+ let addr = $t03688936992._2
927+ let params = $t03688936992._3
928+ let payments = $t03688936992._4
902929 let inv = invoke(addr, call, params, payments)
903930 if ((inv == inv))
904931 then nil
905932 else throw("Strict value is not equal to itself.")
906933 }
907934
908935
909936
910937 @Callable(i)
911-func replenishWithTwoTokens () = valueOrElse(isActive(), replenishWithTwoTokensCalc(i, false, 0))
938+func replenishWithTwoTokens () = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithTwoTokensCalc(i, false, 0)))
912939
913940
914941
915942 @Callable(i)
916-func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, false, 0))
943+func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), valueOrElse(isDepricated(), replenishWithOneTokenCalc(i, virtualSwapTokenPay, virtualSwapTokenGet, false, 0)))
917944
918945
919946
920947 @Callable(i)
921948 func withdraw () = valueOrElse(isActive(), withdrawCalc(i, 0))
922949
923950
924951 @Verifier(tx)
925952 func verify () = {
926953 let multiSignedByAdmins = {
927954 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
928955 then 1
929956 else 0
930957 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
931958 then 1
932959 else 0
933960 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
934961 then 1
935962 else 0
936963 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
937964 }
938965 match tx {
939966 case inv: InvokeScriptTransaction =>
940967 let callTakeIntoAccount = if ((inv.dApp == this))
941968 then (inv.function == "takeIntoAccountExtraFunds")
942969 else false
943970 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
944971 then true
945972 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
946973 then true
947974 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
948975 then true
949976 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
950977 if (if (callTakeIntoAccount)
951978 then signedByAdmin
952979 else false)
953980 then true
954981 else multiSignedByAdmins
955982 case _ =>
956983 multiSignedByAdmins
957984 }
958985 }
959986

github/deemru/w8io/169f3d6 
136.71 ms