tx · 7PZS4pQoYkoJJbda7TW5S7AfASibGiArTje36GH5sSHS

3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW:  -0.03800000 Waves

2022.09.01 12:47 [2209905] smart account 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW > SELF 0.00000000 Waves

{ "type": 13, "id": "7PZS4pQoYkoJJbda7TW5S7AfASibGiArTje36GH5sSHS", "fee": 3800000, "feeAssetId": null, "timestamp": 1662025692629, "version": 2, "chainId": 84, "sender": "3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW", "senderPublicKey": "DfbjpZJBbZwnUKysUkxCbWTE1ZWuoUb6Y6BZdu5iAE8j", "proofs": [ "2citsBzBSJ6kW6GsYVLPDtFDewNASqjgzQYxiS81cEyct8GJmQzMyB8qKRsaTKWphruowk5HAtQ9gtLCKgZgTofs", "UzztC7GYJaXr1amS6UXoAbpSaHqnPkbobLNfgW6muHhb5bXaaeQCVhHXXqXnUEbsKreE7WFvUPoCQiMuJu4yvq9" ], "script": "base64:AAIFAAAAAAAAACMIAhIAEgASBAoCAQESABIECgIBARIAEgASABIFCgMEAQgSAAAAAFUAAAAAB3ZlcnNpb24CAAAABTIuMC4wAAAAAAhrVmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAHa0FjdGl2ZQIAAAAGYWN0aXZlAAAAAAlrQXNzZXRJZEECAAAACkFfYXNzZXRfaWQAAAAACWtBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAAJa0JhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAACWtCYWxhbmNlQgIAAAAPQl9hc3NldF9iYWxhbmNlAAAAAA1rU2hhcmVBc3NldElkAgAAAA5zaGFyZV9hc3NldF9pZAAAAAARa1NoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAAEa0ZlZQIAAAAKY29tbWlzc2lvbgAAAAAKa0ludmFyaWFudAIAAAAJaW52YXJpYW50AAAAAAZrQ2F1c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1bmN0aW9uAgAAABl0YWtlSW50b0FjY291bnRFeHRyYUZ1bmRzBwQAAAANc2lnbmVkQnlBZG1pbgMDAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MQYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTIGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkzBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAEWFkbWluUHViS2V5SW52b2tlAwMFAAAAE2NhbGxUYWtlSW50b0FjY291bnQFAAAADXNpZ25lZEJ5QWRtaW4HBgUAAAATbXVsdGlTaWduZWRCeUFkbWlucwUAAAATbXVsdGlTaWduZWRCeUFkbWluc9TEdQw=", "height": 2209905, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HKv9D6Ty4n47eNVE94NMe4NnCDJ18hrULmGgH7ZKmBQh Next: aK6VykmbRS8JorCBzLxarS72x4eMGBMTqPYyVrkmXJW Diff:
OldNewDifferences
133133
134134 let digits8 = 8
135135
136-let dAppThreshold = 125
136+let dAppThreshold = 50
137137
138-let dAppThresholdScale2 = 1000
138+let dAppThresholdScale2 = 100
139139
140-let exchangeRatioLimitCoef = 2500000
140+let exchangeRatioLimitMin = 90000000
141141
142-let exchangeRatioLimit = 93500000
142+let exchangeRatioLimitMax = 110000000
143143
144144 let alpha = 50
145145
310310 func throwOnePayment () = throw("One attached payment expected")
311311
312312
313-func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
313+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))
314314
315315
316-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))
316+func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
317317
318318
319319 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
323323
324324 func calcStakingParams (stake,amount,assetId) = if (stake)
325325 then {
326- let $t093629428 = calcStakingFuncAndAddres(stake, assetId)
327- let call = $t093629428._1
328- let stakingAddr = $t093629428._2
326+ let $t093469412 = calcStakingFuncAndAddres(stake, assetId)
327+ let call = $t093469412._1
328+ let stakingAddr = $t093469412._2
329329 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
330330 }
331331 else {
332- let $t095149580 = calcStakingFuncAndAddres(stake, assetId)
333- let call = $t095149580._1
334- let stakingAddr = $t095149580._2
332+ let $t094989564 = calcStakingFuncAndAddres(stake, assetId)
333+ let call = $t094989564._1
334+ let stakingAddr = $t094989564._2
335335 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
336336 }
337337
362362 }
363363
364364
365-func calcBalanceAndPmtRatio (ABalance,BBalance,minAmountToReceive,pmtAmount,pmtAssetId) = if ((balanceA > balanceB))
366- then {
367- let ratio = fraction(scale8, balanceA, balanceB)
368- let pratio = if ((pmtAssetId == assetIdA))
369- then fraction(scale8, minAmountToReceive, pmtAmount)
370- else fraction(scale8, pmtAmount, minAmountToReceive)
371- $Tuple2(ratio, pratio)
372- }
373- else {
374- let ratio = fraction(scale8, balanceB, balanceA)
375- let pratio = if ((pmtAssetId == assetIdA))
376- then fraction(scale8, pmtAmount, minAmountToReceive)
377- else fraction(scale8, minAmountToReceive, pmtAmount)
378- $Tuple2(ratio, pratio)
379- }
380-
381-
382365 @Callable(i)
383366 func init () = {
384- let $t01149811575 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
385- let pmtAmountA = $t01149811575._1
386- let pmtAssetIdA = $t01149811575._2
387- let $t01158011657 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
388- let pmtAmountB = $t01158011657._1
389- let pmtAssetIdB = $t01158011657._2
390- let $t01166211739 = getAssetInfo(pmtAssetIdA)
391- let pmtStrAssetIdA = $t01166211739._1
392- let pmtAssetNameA = $t01166211739._2
393- let pmtDecimalsA = $t01166211739._3
394- let $t01174411821 = getAssetInfo(pmtAssetIdB)
395- let pmtStrAssetIdB = $t01174411821._1
396- let pmtAssetNameB = $t01174411821._2
397- let pmtDecimalsB = $t01174411821._3
367+ let $t01073610813 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
368+ let pmtAmountA = $t01073610813._1
369+ let pmtAssetIdA = $t01073610813._2
370+ let $t01081810895 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
371+ let pmtAmountB = $t01081810895._1
372+ let pmtAssetIdB = $t01081810895._2
373+ let $t01090010977 = getAssetInfo(pmtAssetIdA)
374+ let pmtStrAssetIdA = $t01090010977._1
375+ let pmtAssetNameA = $t01090010977._2
376+ let pmtDecimalsA = $t01090010977._3
377+ let $t01098211059 = getAssetInfo(pmtAssetIdB)
378+ let pmtStrAssetIdB = $t01098211059._1
379+ let pmtAssetNameB = $t01098211059._2
380+ let pmtDecimalsB = $t01098211059._3
398381 if (isDefined(getBoolean(this, kActive)))
399382 then throwIsActive()
400383 else if ((pmtAssetIdA == pmtAssetIdB))
431414 let pmtAssetIdB = i.payments[1].assetId
432415 let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA)
433416 let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB)
434- let $t01446914546 = getAssetInfo(pmtAssetIdA)
435- let pmtStrAssetIdA = $t01446914546._1
436- let pmtAssetNameA = $t01446914546._2
437- let pmtDecimalsA = $t01446914546._3
438- let $t01455114668 = getAssetInfo(pmtAssetIdB)
439- let pmtStrAssetIdB = $t01455114668._1
440- let pmtAssetNameB = $t01455114668._2
441- let pmtDecimalsB = $t01455114668._3
442- let $t01467315177 = if ((ratioShareTokensInB > ratioShareTokensInA))
417+ let $t01370713784 = getAssetInfo(pmtAssetIdA)
418+ let pmtStrAssetIdA = $t01370713784._1
419+ let pmtAssetNameA = $t01370713784._2
420+ let pmtDecimalsA = $t01370713784._3
421+ let $t01378913906 = getAssetInfo(pmtAssetIdB)
422+ let pmtStrAssetIdB = $t01378913906._1
423+ let pmtAssetNameB = $t01378913906._2
424+ let pmtDecimalsB = $t01378913906._3
425+ let $t01391114415 = if ((ratioShareTokensInB > ratioShareTokensInA))
443426 then {
444427 let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING)
445428 $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA)
448431 let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING)
449432 $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB)
450433 }
451- let pmtAmountA = $t01467315177._1
452- let pmtAmountB = $t01467315177._2
453- let change = $t01467315177._3
454- let changeAssetId = $t01467315177._4
455- let shareTokenRatio = $t01467315177._5
434+ let pmtAmountA = $t01391114415._1
435+ let pmtAmountB = $t01391114415._2
436+ let change = $t01391114415._3
437+ let changeAssetId = $t01391114415._4
438+ let shareTokenRatio = $t01391114415._5
456439 let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8)
457440 if ((size(i.payments) != 2))
458441 then throw("Two attached assets expected")
487470
488471 @Callable(i)
489472 func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), {
490- let $t01691016985 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
491- let pmtAmount = $t01691016985._1
492- let pmtAssetId = $t01691016985._2
493- let $t01699017063 = getAssetInfo(pmtAssetId)
494- let pmtStrAssetId = $t01699017063._1
495- let pmtAssetName = $t01699017063._2
496- let pmtDecimals = $t01699017063._3
473+ let $t01614816223 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
474+ let pmtAmount = $t01614816223._1
475+ let pmtAssetId = $t01614816223._2
476+ let $t01622816301 = getAssetInfo(pmtAssetId)
477+ let pmtStrAssetId = $t01622816301._1
478+ let pmtAssetName = $t01622816301._2
479+ let pmtDecimals = $t01622816301._3
497480 let pmtMinThreshold = 5000000
498481 let thresholdValueForMinTolerance = 50000000
499482 let tolerance = if ((thresholdValueForMinTolerance > pmtAmount))
513496 else false)
514497 then throwAssets()
515498 else {
516- let $t01804118683 = if ((pmtAssetId == assetIdA))
499+ let $t01727917921 = if ((pmtAssetId == assetIdA))
517500 then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB)
518501 else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount))
519- let virtualReplenishA = $t01804118683._1
520- let virtualReplenishB = $t01804118683._2
521- let balanceAfterSwapA = $t01804118683._3
522- let balanceAfterSwapB = $t01804118683._4
523- let newBalanceA = $t01804118683._5
524- let newBalanceB = $t01804118683._6
502+ let virtualReplenishA = $t01727917921._1
503+ let virtualReplenishB = $t01727917921._2
504+ let balanceAfterSwapA = $t01727917921._3
505+ let balanceAfterSwapB = $t01727917921._4
506+ let newBalanceA = $t01727917921._5
507+ let newBalanceB = $t01727917921._6
525508 let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB)
526509 let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB))
510+ let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
527511 if (if ((slippageValueMinForSwap >= fraction(scale8, invariant, invariantNew)))
528512 then true
529513 else (invariant > invariantNew))
532516 then true
533517 else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish))
534518 then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect")
535- else {
536- let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA)
537- let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB)
538- let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8)
539- let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6)
540- let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6)
541- let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply)
542- let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply)
543- let $t02039420689 = if ((pmtStrAssetId == strAssetIdA))
544- then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB)
545- else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA)
546- let stakeAmount = $t02039420689._1
547- let unstakeAmount = $t02039420689._2
548- let unstakeAsset = $t02039420689._3
549- let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
550- then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil)
551- else 0
552- if ((stake1 == stake1))
553- then {
554- let stake2 = if (containsElement(stakingAssets, unstakeAsset))
555- then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil)
556- else 0
557- if ((stake2 == stake2))
558- 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)))]
559- else throw("Strict value is not equal to itself.")
560- }
561- else throw("Strict value is not equal to itself.")
562- }
519+ else if (if ((dAppThresholdAmount > newBalanceA))
520+ then true
521+ else (dAppThresholdAmount > newBalanceB))
522+ then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
523+ else {
524+ let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA)
525+ let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB)
526+ let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8)
527+ let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6)
528+ let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6)
529+ let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply)
530+ let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply)
531+ let $t01990820203 = if ((pmtStrAssetId == strAssetIdA))
532+ then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB)
533+ else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA)
534+ let stakeAmount = $t01990820203._1
535+ let unstakeAmount = $t01990820203._2
536+ let unstakeAsset = $t01990820203._3
537+ let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
538+ then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil)
539+ else 0
540+ if ((stake1 == stake1))
541+ then {
542+ let stake2 = if (containsElement(stakingAssets, unstakeAsset))
543+ then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil)
544+ else 0
545+ if ((stake2 == stake2))
546+ 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+ else throw("Strict value is not equal to itself.")
548+ }
549+ else throw("Strict value is not equal to itself.")
550+ }
563551 }
564552 })
565553
567555
568556 @Callable(i)
569557 func withdraw () = valueOrElse(isActive(), {
570- let $t02197622051 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
571- let pmtAmount = $t02197622051._1
572- let pmtAssetId = $t02197622051._2
558+ let $t02149021565 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
559+ let pmtAmount = $t02149021565._1
560+ let pmtAssetId = $t02149021565._2
573561 let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply)
574562 let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply)
575563 let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB))
600588
601589 @Callable(i)
602590 func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), {
603- let $t02360223677 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
604- let pmtAmount = $t02360223677._1
605- let pmtAssetId = $t02360223677._2
591+ let $t02311623191 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
592+ let pmtAmount = $t02311623191._1
593+ let pmtAssetId = $t02311623191._2
606594 if ((0 >= estimatedAmountToReceive))
607595 then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
608596 else if ((minAmountToReceive > estimatedAmountToReceive))
617605 then throwAssets()
618606 else if ((10000000 > pmtAmount))
619607 then throw("Only swap of 10.000000 or more tokens is allowed")
620- else {
621- let $t02436324479 = calcBalanceAndPmtRatio(balanceA, balanceB, minAmountToReceive, pmtAmount, pmtAssetId)
622- let balanceRatio = $t02436324479._1
623- let pmtRatio = $t02436324479._2
624- if (((exchangeRatioLimit - fraction(exchangeRatioLimitCoef, balanceRatio, scale8)) > pmtRatio))
625- then throw("Incorrect args and pmt ratio")
626- else {
627- let sendAssetId = if ((pmtAssetId == assetIdA))
628- then assetIdB
629- else assetIdA
630- let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId)
631- let feeDiscount = calculateFeeDiscount(i.originCaller)
632- let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
633- let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
634- let $t02523425512 = if ((pmtAssetId == assetIdA))
635- then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward))
636- else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount))
637- let newBalanceA = $t02523425512._1
638- let newBalanceB = $t02523425512._2
639- let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
640- if (if ((dAppThresholdAmount > newBalanceA))
641- then true
642- else (dAppThresholdAmount > newBalanceB))
643- then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
644- else {
645- let $t02583125904 = getAssetInfo(pmtAssetId)
646- let pmtStrAssetId = $t02583125904._1
647- let pmtAssetName = $t02583125904._2
648- let pmtDecimals = $t02583125904._3
649- let $t02592125998 = getAssetInfo(sendAssetId)
650- let sendStrAssetId = $t02592125998._1
651- let sendAssetName = $t02592125998._2
652- let sendDecimals = $t02592125998._3
653- let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
654- then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
655- else 0
656- if ((stake1 == stake1))
657- then {
658- let stake2 = if (containsElement(stakingAssets, sendStrAssetId))
659- then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil)
660- else 0
661- if ((stake2 == stake2))
662- then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], $Tuple2(amountMinusFee, sendAssetId))
663- else throw("Strict value is not equal to itself.")
664- }
665- else throw("Strict value is not equal to itself.")
666- }
667- }
668- }
608+ else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
609+ then true
610+ else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
611+ then throw("Incorrect args and pmt ratio")
612+ else {
613+ let sendAssetId = if ((pmtAssetId == assetIdA))
614+ then assetIdB
615+ else assetIdA
616+ let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId)
617+ let feeDiscount = calculateFeeDiscount(i.originCaller)
618+ let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
619+ let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
620+ let $t02464424906 = if ((pmtAssetId == assetIdA))
621+ then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward))
622+ else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount))
623+ let newBalanceA = $t02464424906._1
624+ let newBalanceB = $t02464424906._2
625+ let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
626+ if (if ((dAppThresholdAmount > newBalanceA))
627+ then true
628+ else (dAppThresholdAmount > newBalanceB))
629+ then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
630+ else {
631+ let $t02520525278 = getAssetInfo(pmtAssetId)
632+ let pmtStrAssetId = $t02520525278._1
633+ let pmtAssetName = $t02520525278._2
634+ let pmtDecimals = $t02520525278._3
635+ let $t02529125368 = getAssetInfo(sendAssetId)
636+ let sendStrAssetId = $t02529125368._1
637+ let sendAssetName = $t02529125368._2
638+ let sendDecimals = $t02529125368._3
639+ let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
640+ then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
641+ else 0
642+ if ((stake1 == stake1))
643+ then {
644+ let stake2 = if (containsElement(stakingAssets, sendStrAssetId))
645+ then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil)
646+ else 0
647+ 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)], $Tuple2(amountMinusFee, sendAssetId))
649+ else throw("Strict value is not equal to itself.")
650+ }
651+ else throw("Strict value is not equal to itself.")
652+ }
653+ }
669654 })
670655
671656
726711 func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
727712 then throw("Only contract itself can invoke this function")
728713 else {
729- let $t02904129144 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
730- let call = $t02904129144._1
731- let addr = $t02904129144._2
732- let params = $t02904129144._3
733- let payments = $t02904129144._4
714+ let $t02837228475 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
715+ let call = $t02837228475._1
716+ let addr = $t02837228475._2
717+ let params = $t02837228475._3
718+ let payments = $t02837228475._4
734719 let inv = invoke(addr, call, params, payments)
735720 if ((inv == inv))
736721 then nil
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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 kAssetIdA = "A_asset_id"
1111
1212 let kAssetIdB = "B_asset_id"
1313
1414 let kBalanceA = "A_asset_balance"
1515
1616 let kBalanceB = "B_asset_balance"
1717
1818 let kShareAssetId = "share_asset_id"
1919
2020 let kShareAssetSupply = "share_asset_supply"
2121
2222 let kFee = "commission"
2323
2424 let kInvariant = "invariant"
2525
2626 let kCause = "shutdown_cause"
2727
2828 let kUSDNAddress = "staking_usdnnsbt_address"
2929
3030 let kEURNAddress = "staking_eurn_address"
3131
3232 let kDiscounts = "discounts"
3333
3434 let kDiscountValues = "discount_values"
3535
3636 let kUserSwopInGov = "_SWOP_amount"
3737
3838 let kAdminPubKey1 = "admin_pub_1"
3939
4040 let kAdminPubKey2 = "admin_pub_2"
4141
4242 let kAdminPubKey3 = "admin_pub_3"
4343
4444 let kAdminInvokePubKey = "admin_invoke_pub"
4545
4646 let kMoneyBoxAddress = "money_box_address"
4747
4848 let kGovAddress = "governance_address"
4949
5050 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
5151
5252 func getBase58FromOracle (key) = match getString(oracle, key) {
5353 case string: String =>
5454 fromBase58String(string)
5555 case nothing =>
5656 throw((key + "is empty"))
5757 }
5858
5959
6060 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
6161
6262 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
6363
6464 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
6565
6666 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
6767
6868 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
6969
7070 let govAddress = Address(getBase58FromOracle(kGovAddress))
7171
7272 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
7373
7474 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
7575
7676 let stakingAssets = [toBase58String(USDN)]
7777
7878 let active = getBooleanValue(this, kActive)
7979
8080 let strAssetIdA = getStringValue(this, kAssetIdA)
8181
8282 let strAssetIdB = getStringValue(this, kAssetIdB)
8383
8484 let assetIdA = if ((strAssetIdA == "WAVES"))
8585 then unit
8686 else fromBase58String(strAssetIdA)
8787
8888 let assetIdB = if ((strAssetIdB == "WAVES"))
8989 then unit
9090 else fromBase58String(strAssetIdB)
9191
9292 let assetNameA = match assetIdA {
9393 case id: ByteVector =>
9494 value(assetInfo(id)).name
9595 case waves: Unit =>
9696 "WAVES"
9797 case _ =>
9898 throw("Match error")
9999 }
100100
101101 let assetNameB = match assetIdB {
102102 case id: ByteVector =>
103103 value(assetInfo(id)).name
104104 case waves: Unit =>
105105 "WAVES"
106106 case _ =>
107107 throw("Match error")
108108 }
109109
110110 let balanceA = getIntegerValue(this, kBalanceA)
111111
112112 let balanceB = getIntegerValue(this, kBalanceB)
113113
114114 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
115115
116116 let shareAssetSupply = getIntegerValue(this, kShareAssetSupply)
117117
118118 let invariant = getIntegerValue(this, kInvariant)
119119
120120 let fee = getIntegerValue(this, kFee)
121121
122122 let feeGovernance = fraction(fee, 40, 100)
123123
124124 let feeScale6 = 1000000
125125
126126 let scale3 = 1000
127127
128128 let scale8 = 100000000
129129
130130 let scale16 = 10000000000000000
131131
132132 let slippageScale3 = 1000
133133
134134 let digits8 = 8
135135
136-let dAppThreshold = 125
136+let dAppThreshold = 50
137137
138-let dAppThresholdScale2 = 1000
138+let dAppThresholdScale2 = 100
139139
140-let exchangeRatioLimitCoef = 2500000
140+let exchangeRatioLimitMin = 90000000
141141
142-let exchangeRatioLimit = 93500000
142+let exchangeRatioLimitMax = 110000000
143143
144144 let alpha = 50
145145
146146 let alphaDigits = 2
147147
148148 let beta = 4600000000000000
149149
150150 func accountBalance (assetId) = match assetId {
151151 case id: ByteVector =>
152152 assetBalance(this, id)
153153 case waves: Unit =>
154154 wavesBalance(this).available
155155 case _ =>
156156 throw("Match error")
157157 }
158158
159159
160160 func stakedAmount (assetId) = {
161161 let stakedAmountCalculated = match assetId {
162162 case aId: ByteVector =>
163163 if ((aId == USDN))
164164 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
165165 else 0
166166 case _: Unit =>
167167 0
168168 case _ =>
169169 throw("Match error")
170170 }
171171 match stakedAmountCalculated {
172172 case i: Int =>
173173 i
174174 case _ =>
175175 0
176176 }
177177 }
178178
179179
180180 let stakedAmountA = stakedAmount(assetIdA)
181181
182182 let stakedAmountB = stakedAmount(assetIdB)
183183
184184 let availableBalanceA = (balanceA - stakedAmountA)
185185
186186 let availableBalanceB = (balanceB - stakedAmountB)
187187
188188 let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA)
189189
190190 let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB)
191191
192192 let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA))
193193 then (accountBalanceWithStakedB >= balanceB)
194194 else false
195195
196196 func skewness (x,y) = ((fraction(scale16, x, y) + fraction(scale16, y, x)) / 2)
197197
198198
199199 func invariantCalc (x,y) = {
200200 let sk = skewness(x, y)
201201 (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)))
202202 }
203203
204204
205205 func calculateSendAmount (amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount,tokenId) = {
206206 let worstAllowedNewInvariantRatio = (scale16 - ((scale16 * 1) / 10000000))
207207 let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount)
208208 let x = (balanceA + tokenReceiveAmount)
209209 let y = (balanceB + tokenReceiveAmount)
210210 func getStepAmount (acc,step) = if ((acc._1 == -1))
211211 then {
212212 let amountToSend = (amountToSendEstimated - (((step * deltaBetweenMaxAndMinSendValue) / 3) / scale3))
213213 let stepInvariant = if ((tokenId == assetIdA))
214214 then invariantCalc(x, (balanceB - amountToSend))
215215 else invariantCalc((balanceA - amountToSend), y)
216216 if ((stepInvariant > invariant))
217217 then $Tuple2(amountToSend, stepInvariant)
218218 else $Tuple2(-1, 0)
219219 }
220220 else acc
221221
222222 let amountToSendMin = getStepAmount($Tuple2(-1, 0), 3000)
223223 if ((0 > amountToSendMin._1))
224224 then throw("Price is worse than minReceived")
225225 else {
226226 let invEstimated = if ((tokenId == assetIdA))
227227 then invariantCalc(x, (balanceB - amountToSendEstimated))
228228 else if ((tokenId == assetIdB))
229229 then invariantCalc((balanceA - amountToSendEstimated), y)
230230 else throw("Wrong asset in payment")
231231 if ((invariant > invEstimated))
232232 then if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, invEstimated)))
233233 then throw("The requested price is too not profitable for user")
234234 else {
235235 let a = {
236236 let $l = [25, 200, 500]
237237 let $s = size($l)
238238 let $acc0 = $Tuple2(-1, 0)
239239 func $f0_1 ($a,$i) = if (($i >= $s))
240240 then $a
241241 else getStepAmount($a, $l[$i])
242242
243243 func $f0_2 ($a,$i) = if (($i >= $s))
244244 then $a
245245 else throw("List size exceeds 3")
246246
247247 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
248248 }
249249 if ((0 > a._1))
250250 then amountToSendMin._1
251251 else a._1
252252 }
253253 else {
254254 let a = {
255255 let $l = [-500, -200, -25]
256256 let $s = size($l)
257257 let $acc0 = $Tuple2(-1, 0)
258258 func $f0_1 ($a,$i) = if (($i >= $s))
259259 then $a
260260 else getStepAmount($a, $l[$i])
261261
262262 func $f0_2 ($a,$i) = if (($i >= $s))
263263 then $a
264264 else throw("List size exceeds 3")
265265
266266 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
267267 }
268268 let tupleSendBetter = if ((0 > a._1))
269269 then $Tuple2(amountToSendEstimated, invEstimated)
270270 else a
271271 if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, tupleSendBetter._2)))
272272 then throw("The requested price is too not profitable for user")
273273 else tupleSendBetter._1
274274 }
275275 }
276276 }
277277
278278
279279 func getAssetInfo (assetId) = match assetId {
280280 case id: ByteVector =>
281281 let stringId = toBase58String(id)
282282 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
283283 $Tuple3(stringId, info.name, info.decimals)
284284 case waves: Unit =>
285285 $Tuple3("WAVES", "WAVES", 8)
286286 case _ =>
287287 throw("Match error")
288288 }
289289
290290
291291 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
292292
293293
294294 func throwIsActive () = throw("DApp is already active")
295295
296296
297297 func isActive () = if (active)
298298 then unit
299299 else throw("DApp is inactive at this moment")
300300
301301
302302 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
303303 then unit
304304 else throw("Only admin can call this function")
305305
306306
307307 func throwAssets () = throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB))
308308
309309
310310 func throwOnePayment () = throw("One attached payment expected")
311311
312312
313-func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
313+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))
314314
315315
316-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))
316+func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
317317
318318
319319 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
320320 then $Tuple2("lockNeutrino", stakingUSDNAddress)
321321 else $Tuple2("unlockNeutrino", stakingUSDNAddress)
322322
323323
324324 func calcStakingParams (stake,amount,assetId) = if (stake)
325325 then {
326- let $t093629428 = calcStakingFuncAndAddres(stake, assetId)
327- let call = $t093629428._1
328- let stakingAddr = $t093629428._2
326+ let $t093469412 = calcStakingFuncAndAddres(stake, assetId)
327+ let call = $t093469412._1
328+ let stakingAddr = $t093469412._2
329329 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
330330 }
331331 else {
332- let $t095149580 = calcStakingFuncAndAddres(stake, assetId)
333- let call = $t095149580._1
334- let stakingAddr = $t095149580._2
332+ let $t094989564 = calcStakingFuncAndAddres(stake, assetId)
333+ let call = $t094989564._1
334+ let stakingAddr = $t094989564._2
335335 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
336336 }
337337
338338
339339 func calculateFeeDiscount (userAddr) = {
340340 let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
341341 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
342342 let discounts = split(getStringValue(oracle, kDiscounts), ",")
343343 if (if ((swopAmount >= parseIntValue(discountValues[0])))
344344 then (parseIntValue(discountValues[1]) > swopAmount)
345345 else false)
346346 then (feeScale6 - parseIntValue(discounts[0]))
347347 else if (if ((swopAmount >= parseIntValue(discountValues[1])))
348348 then (parseIntValue(discountValues[2]) > swopAmount)
349349 else false)
350350 then (feeScale6 - parseIntValue(discounts[1]))
351351 else if (if ((swopAmount >= parseIntValue(discountValues[2])))
352352 then (parseIntValue(discountValues[3]) > swopAmount)
353353 else false)
354354 then (feeScale6 - parseIntValue(discounts[2]))
355355 else if (if ((swopAmount >= parseIntValue(discountValues[3])))
356356 then (parseIntValue(discountValues[4]) > swopAmount)
357357 else false)
358358 then (feeScale6 - parseIntValue(discounts[3]))
359359 else if ((swopAmount >= parseIntValue(discountValues[4])))
360360 then (feeScale6 - parseIntValue(discounts[4]))
361361 else feeScale6
362362 }
363363
364364
365-func calcBalanceAndPmtRatio (ABalance,BBalance,minAmountToReceive,pmtAmount,pmtAssetId) = if ((balanceA > balanceB))
366- then {
367- let ratio = fraction(scale8, balanceA, balanceB)
368- let pratio = if ((pmtAssetId == assetIdA))
369- then fraction(scale8, minAmountToReceive, pmtAmount)
370- else fraction(scale8, pmtAmount, minAmountToReceive)
371- $Tuple2(ratio, pratio)
372- }
373- else {
374- let ratio = fraction(scale8, balanceB, balanceA)
375- let pratio = if ((pmtAssetId == assetIdA))
376- then fraction(scale8, pmtAmount, minAmountToReceive)
377- else fraction(scale8, minAmountToReceive, pmtAmount)
378- $Tuple2(ratio, pratio)
379- }
380-
381-
382365 @Callable(i)
383366 func init () = {
384- let $t01149811575 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
385- let pmtAmountA = $t01149811575._1
386- let pmtAssetIdA = $t01149811575._2
387- let $t01158011657 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
388- let pmtAmountB = $t01158011657._1
389- let pmtAssetIdB = $t01158011657._2
390- let $t01166211739 = getAssetInfo(pmtAssetIdA)
391- let pmtStrAssetIdA = $t01166211739._1
392- let pmtAssetNameA = $t01166211739._2
393- let pmtDecimalsA = $t01166211739._3
394- let $t01174411821 = getAssetInfo(pmtAssetIdB)
395- let pmtStrAssetIdB = $t01174411821._1
396- let pmtAssetNameB = $t01174411821._2
397- let pmtDecimalsB = $t01174411821._3
367+ let $t01073610813 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
368+ let pmtAmountA = $t01073610813._1
369+ let pmtAssetIdA = $t01073610813._2
370+ let $t01081810895 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
371+ let pmtAmountB = $t01081810895._1
372+ let pmtAssetIdB = $t01081810895._2
373+ let $t01090010977 = getAssetInfo(pmtAssetIdA)
374+ let pmtStrAssetIdA = $t01090010977._1
375+ let pmtAssetNameA = $t01090010977._2
376+ let pmtDecimalsA = $t01090010977._3
377+ let $t01098211059 = getAssetInfo(pmtAssetIdB)
378+ let pmtStrAssetIdB = $t01098211059._1
379+ let pmtAssetNameB = $t01098211059._2
380+ let pmtDecimalsB = $t01098211059._3
398381 if (isDefined(getBoolean(this, kActive)))
399382 then throwIsActive()
400383 else if ((pmtAssetIdA == pmtAssetIdB))
401384 then throw("Assets must be different")
402385 else {
403386 let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7))
404387 let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this))
405388 let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
406389 let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN))
407390 let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
408391 let shareIssueId = calculateAssetId(shareIssue)
409392 let invariantCalculated = invariantCalc(pmtAmountA, pmtAmountB)
410393 let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA))
411394 then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil)
412395 else 0
413396 if ((stake1 == stake1))
414397 then {
415398 let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB))
416399 then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil)
417400 else 0
418401 if ((stake2 == stake2))
419402 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)]
420403 else throw("Strict value is not equal to itself.")
421404 }
422405 else throw("Strict value is not equal to itself.")
423406 }
424407 }
425408
426409
427410
428411 @Callable(i)
429412 func replenishWithTwoTokens () = valueOrElse(isActive(), {
430413 let pmtAssetIdA = i.payments[0].assetId
431414 let pmtAssetIdB = i.payments[1].assetId
432415 let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA)
433416 let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB)
434- let $t01446914546 = getAssetInfo(pmtAssetIdA)
435- let pmtStrAssetIdA = $t01446914546._1
436- let pmtAssetNameA = $t01446914546._2
437- let pmtDecimalsA = $t01446914546._3
438- let $t01455114668 = getAssetInfo(pmtAssetIdB)
439- let pmtStrAssetIdB = $t01455114668._1
440- let pmtAssetNameB = $t01455114668._2
441- let pmtDecimalsB = $t01455114668._3
442- let $t01467315177 = if ((ratioShareTokensInB > ratioShareTokensInA))
417+ let $t01370713784 = getAssetInfo(pmtAssetIdA)
418+ let pmtStrAssetIdA = $t01370713784._1
419+ let pmtAssetNameA = $t01370713784._2
420+ let pmtDecimalsA = $t01370713784._3
421+ let $t01378913906 = getAssetInfo(pmtAssetIdB)
422+ let pmtStrAssetIdB = $t01378913906._1
423+ let pmtAssetNameB = $t01378913906._2
424+ let pmtDecimalsB = $t01378913906._3
425+ let $t01391114415 = if ((ratioShareTokensInB > ratioShareTokensInA))
443426 then {
444427 let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING)
445428 $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA)
446429 }
447430 else {
448431 let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING)
449432 $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB)
450433 }
451- let pmtAmountA = $t01467315177._1
452- let pmtAmountB = $t01467315177._2
453- let change = $t01467315177._3
454- let changeAssetId = $t01467315177._4
455- let shareTokenRatio = $t01467315177._5
434+ let pmtAmountA = $t01391114415._1
435+ let pmtAmountB = $t01391114415._2
436+ let change = $t01391114415._3
437+ let changeAssetId = $t01391114415._4
438+ let shareTokenRatio = $t01391114415._5
456439 let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8)
457440 if ((size(i.payments) != 2))
458441 then throw("Two attached assets expected")
459442 else if (if ((pmtAssetIdA != assetIdA))
460443 then true
461444 else (pmtAssetIdB != assetIdB))
462445 then throwAssets()
463446 else if ((shareTokenToPayAmount == 0))
464447 then throw("Too small amount to replenish")
465448 else if ((0 > change))
466449 then throw("Change < 0")
467450 else if (!(hasEnoughBalance))
468451 then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious())
469452 else {
470453 let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA))
471454 then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil)
472455 else 0
473456 if ((stake1 == stake1))
474457 then {
475458 let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB))
476459 then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil)
477460 else 0
478461 if ((stake2 == stake2))
479462 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)]
480463 else throw("Strict value is not equal to itself.")
481464 }
482465 else throw("Strict value is not equal to itself.")
483466 }
484467 })
485468
486469
487470
488471 @Callable(i)
489472 func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), {
490- let $t01691016985 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
491- let pmtAmount = $t01691016985._1
492- let pmtAssetId = $t01691016985._2
493- let $t01699017063 = getAssetInfo(pmtAssetId)
494- let pmtStrAssetId = $t01699017063._1
495- let pmtAssetName = $t01699017063._2
496- let pmtDecimals = $t01699017063._3
473+ let $t01614816223 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
474+ let pmtAmount = $t01614816223._1
475+ let pmtAssetId = $t01614816223._2
476+ let $t01622816301 = getAssetInfo(pmtAssetId)
477+ let pmtStrAssetId = $t01622816301._1
478+ let pmtAssetName = $t01622816301._2
479+ let pmtDecimals = $t01622816301._3
497480 let pmtMinThreshold = 5000000
498481 let thresholdValueForMinTolerance = 50000000
499482 let tolerance = if ((thresholdValueForMinTolerance > pmtAmount))
500483 then 100000
501484 else 1
502485 let slippageValueMinForReplenish = (scale8 - ((scale8 * tolerance) / 10000000))
503486 let slippageValueMaxForReplenish = (scale8 + ((scale8 * tolerance) / 10000000))
504487 let slippageValueMinForSwap = (scale8 - ((scale8 * 1) / 10000000))
505488 if ((pmtMinThreshold > pmtAmount))
506489 then throw((((("Payment amount " + toString(pmtAmount)) + " does not exceed the minimum amount of ") + toString(pmtMinThreshold)) + " tokens"))
507490 else if ((size(i.payments) != 1))
508491 then throwOnePayment()
509492 else if (!(hasEnoughBalance))
510493 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
511494 else if (if ((pmtAssetId != assetIdA))
512495 then (pmtAssetId != assetIdB)
513496 else false)
514497 then throwAssets()
515498 else {
516- let $t01804118683 = if ((pmtAssetId == assetIdA))
499+ let $t01727917921 = if ((pmtAssetId == assetIdA))
517500 then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB)
518501 else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount))
519- let virtualReplenishA = $t01804118683._1
520- let virtualReplenishB = $t01804118683._2
521- let balanceAfterSwapA = $t01804118683._3
522- let balanceAfterSwapB = $t01804118683._4
523- let newBalanceA = $t01804118683._5
524- let newBalanceB = $t01804118683._6
502+ let virtualReplenishA = $t01727917921._1
503+ let virtualReplenishB = $t01727917921._2
504+ let balanceAfterSwapA = $t01727917921._3
505+ let balanceAfterSwapB = $t01727917921._4
506+ let newBalanceA = $t01727917921._5
507+ let newBalanceB = $t01727917921._6
525508 let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB)
526509 let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB))
510+ let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
527511 if (if ((slippageValueMinForSwap >= fraction(scale8, invariant, invariantNew)))
528512 then true
529513 else (invariant > invariantNew))
530514 then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value")
531515 else if (if ((slippageValueMinForReplenish > ratioVirtualBalanceToVirtualReplenish))
532516 then true
533517 else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish))
534518 then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect")
535- else {
536- let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA)
537- let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB)
538- let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8)
539- let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6)
540- let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6)
541- let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply)
542- let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply)
543- let $t02039420689 = if ((pmtStrAssetId == strAssetIdA))
544- then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB)
545- else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA)
546- let stakeAmount = $t02039420689._1
547- let unstakeAmount = $t02039420689._2
548- let unstakeAsset = $t02039420689._3
549- let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
550- then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil)
551- else 0
552- if ((stake1 == stake1))
553- then {
554- let stake2 = if (containsElement(stakingAssets, unstakeAsset))
555- then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil)
556- else 0
557- if ((stake2 == stake2))
558- 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)))]
559- else throw("Strict value is not equal to itself.")
560- }
561- else throw("Strict value is not equal to itself.")
562- }
519+ else if (if ((dAppThresholdAmount > newBalanceA))
520+ then true
521+ else (dAppThresholdAmount > newBalanceB))
522+ then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
523+ else {
524+ let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA)
525+ let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB)
526+ let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8)
527+ let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6)
528+ let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6)
529+ let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply)
530+ let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply)
531+ let $t01990820203 = if ((pmtStrAssetId == strAssetIdA))
532+ then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB)
533+ else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA)
534+ let stakeAmount = $t01990820203._1
535+ let unstakeAmount = $t01990820203._2
536+ let unstakeAsset = $t01990820203._3
537+ let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
538+ then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil)
539+ else 0
540+ if ((stake1 == stake1))
541+ then {
542+ let stake2 = if (containsElement(stakingAssets, unstakeAsset))
543+ then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil)
544+ else 0
545+ if ((stake2 == stake2))
546+ 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+ else throw("Strict value is not equal to itself.")
548+ }
549+ else throw("Strict value is not equal to itself.")
550+ }
563551 }
564552 })
565553
566554
567555
568556 @Callable(i)
569557 func withdraw () = valueOrElse(isActive(), {
570- let $t02197622051 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
571- let pmtAmount = $t02197622051._1
572- let pmtAssetId = $t02197622051._2
558+ let $t02149021565 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
559+ let pmtAmount = $t02149021565._1
560+ let pmtAssetId = $t02149021565._2
573561 let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply)
574562 let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply)
575563 let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB))
576564 if ((size(i.payments) != 1))
577565 then throwOnePayment()
578566 else if ((pmtAssetId != shareAssetId))
579567 then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
580568 else if (!(hasEnoughBalance))
581569 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
582570 else {
583571 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
584572 then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil)
585573 else 0
586574 if ((stake1 == stake1))
587575 then {
588576 let stake2 = if (containsElement(stakingAssets, strAssetIdB))
589577 then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil)
590578 else 0
591579 if ((stake2 == stake2))
592580 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)]
593581 else throw("Strict value is not equal to itself.")
594582 }
595583 else throw("Strict value is not equal to itself.")
596584 }
597585 })
598586
599587
600588
601589 @Callable(i)
602590 func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), {
603- let $t02360223677 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
604- let pmtAmount = $t02360223677._1
605- let pmtAssetId = $t02360223677._2
591+ let $t02311623191 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
592+ let pmtAmount = $t02311623191._1
593+ let pmtAssetId = $t02311623191._2
606594 if ((0 >= estimatedAmountToReceive))
607595 then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
608596 else if ((minAmountToReceive > estimatedAmountToReceive))
609597 then throw("Minimal amount can't be greater than estimated.")
610598 else if ((size(i.payments) != 1))
611599 then throwOnePayment()
612600 else if (!(hasEnoughBalance))
613601 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
614602 else if (if ((pmtAssetId != assetIdA))
615603 then (pmtAssetId != assetIdB)
616604 else false)
617605 then throwAssets()
618606 else if ((10000000 > pmtAmount))
619607 then throw("Only swap of 10.000000 or more tokens is allowed")
620- else {
621- let $t02436324479 = calcBalanceAndPmtRatio(balanceA, balanceB, minAmountToReceive, pmtAmount, pmtAssetId)
622- let balanceRatio = $t02436324479._1
623- let pmtRatio = $t02436324479._2
624- if (((exchangeRatioLimit - fraction(exchangeRatioLimitCoef, balanceRatio, scale8)) > pmtRatio))
625- then throw("Incorrect args and pmt ratio")
626- else {
627- let sendAssetId = if ((pmtAssetId == assetIdA))
628- then assetIdB
629- else assetIdA
630- let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId)
631- let feeDiscount = calculateFeeDiscount(i.originCaller)
632- let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
633- let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
634- let $t02523425512 = if ((pmtAssetId == assetIdA))
635- then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward))
636- else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount))
637- let newBalanceA = $t02523425512._1
638- let newBalanceB = $t02523425512._2
639- let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
640- if (if ((dAppThresholdAmount > newBalanceA))
641- then true
642- else (dAppThresholdAmount > newBalanceB))
643- then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
644- else {
645- let $t02583125904 = getAssetInfo(pmtAssetId)
646- let pmtStrAssetId = $t02583125904._1
647- let pmtAssetName = $t02583125904._2
648- let pmtDecimals = $t02583125904._3
649- let $t02592125998 = getAssetInfo(sendAssetId)
650- let sendStrAssetId = $t02592125998._1
651- let sendAssetName = $t02592125998._2
652- let sendDecimals = $t02592125998._3
653- let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
654- then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
655- else 0
656- if ((stake1 == stake1))
657- then {
658- let stake2 = if (containsElement(stakingAssets, sendStrAssetId))
659- then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil)
660- else 0
661- if ((stake2 == stake2))
662- then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], $Tuple2(amountMinusFee, sendAssetId))
663- else throw("Strict value is not equal to itself.")
664- }
665- else throw("Strict value is not equal to itself.")
666- }
667- }
668- }
608+ else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
609+ then true
610+ else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
611+ then throw("Incorrect args and pmt ratio")
612+ else {
613+ let sendAssetId = if ((pmtAssetId == assetIdA))
614+ then assetIdB
615+ else assetIdA
616+ let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId)
617+ let feeDiscount = calculateFeeDiscount(i.originCaller)
618+ let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
619+ let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
620+ let $t02464424906 = if ((pmtAssetId == assetIdA))
621+ then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward))
622+ else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount))
623+ let newBalanceA = $t02464424906._1
624+ let newBalanceB = $t02464424906._2
625+ let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2))
626+ if (if ((dAppThresholdAmount > newBalanceA))
627+ then true
628+ else (dAppThresholdAmount > newBalanceB))
629+ then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB)
630+ else {
631+ let $t02520525278 = getAssetInfo(pmtAssetId)
632+ let pmtStrAssetId = $t02520525278._1
633+ let pmtAssetName = $t02520525278._2
634+ let pmtDecimals = $t02520525278._3
635+ let $t02529125368 = getAssetInfo(sendAssetId)
636+ let sendStrAssetId = $t02529125368._1
637+ let sendAssetName = $t02529125368._2
638+ let sendDecimals = $t02529125368._3
639+ let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
640+ then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
641+ else 0
642+ if ((stake1 == stake1))
643+ then {
644+ let stake2 = if (containsElement(stakingAssets, sendStrAssetId))
645+ then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil)
646+ else 0
647+ 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)], $Tuple2(amountMinusFee, sendAssetId))
649+ else throw("Strict value is not equal to itself.")
650+ }
651+ else throw("Strict value is not equal to itself.")
652+ }
653+ }
669654 })
670655
671656
672657
673658 @Callable(i)
674659 func shutdown () = valueOrElse(isAdminCall(i), if (!(active))
675660 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
676661 else suspend("Paused by admin"))
677662
678663
679664
680665 @Callable(i)
681666 func activate () = valueOrElse(isAdminCall(i), if (active)
682667 then throwIsActive()
683668 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
684669
685670
686671
687672 @Callable(i)
688673 func takeIntoAccountExtraFunds () = valueOrElse(isActive(), {
689674 let amountEnrollA = (accountBalanceWithStakedA - balanceA)
690675 let amountEnrollB = (accountBalanceWithStakedB - balanceB)
691676 let invariantNew = invariantCalc((balanceA + amountEnrollA), (balanceB + amountEnrollB))
692677 if ((i.caller != moneyBoxAddress))
693678 then throw("Only the money box can call this function")
694679 else if (if ((0 > amountEnrollA))
695680 then true
696681 else (0 > amountEnrollB))
697682 then suspend("Enroll amount negative")
698683 else if (if ((amountEnrollA == 0))
699684 then (amountEnrollB == 0)
700685 else false)
701686 then throw("No money to take")
702687 else {
703688 let stake1 = if (if (containsElement(stakingAssets, strAssetIdA))
704689 then (amountEnrollA > 0)
705690 else false)
706691 then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil)
707692 else 0
708693 if ((stake1 == stake1))
709694 then {
710695 let stake2 = if (if (containsElement(stakingAssets, strAssetIdB))
711696 then (amountEnrollB > 0)
712697 else false)
713698 then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil)
714699 else 0
715700 if ((stake2 == stake2))
716701 then [IntegerEntry(kInvariant, invariantNew), IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))]
717702 else throw("Strict value is not equal to itself.")
718703 }
719704 else throw("Strict value is not equal to itself.")
720705 }
721706 })
722707
723708
724709
725710 @Callable(i)
726711 func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
727712 then throw("Only contract itself can invoke this function")
728713 else {
729- let $t02904129144 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
730- let call = $t02904129144._1
731- let addr = $t02904129144._2
732- let params = $t02904129144._3
733- let payments = $t02904129144._4
714+ let $t02837228475 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
715+ let call = $t02837228475._1
716+ let addr = $t02837228475._2
717+ let params = $t02837228475._3
718+ let payments = $t02837228475._4
734719 let inv = invoke(addr, call, params, payments)
735720 if ((inv == inv))
736721 then nil
737722 else throw("Strict value is not equal to itself.")
738723 }
739724
740725
741726
742727 @Callable(i)
743728 func toBigIntInvariant () = valueOrElse(isAdminCall(i), [IntegerEntry(kInvariant, invariantCalc(balanceA, balanceB))])
744729
745730
746731 @Verifier(tx)
747732 func verify () = {
748733 let multiSignedByAdmins = {
749734 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
750735 then 1
751736 else 0
752737 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
753738 then 1
754739 else 0
755740 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
756741 then 1
757742 else 0
758743 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
759744 }
760745 match tx {
761746 case inv: InvokeScriptTransaction =>
762747 let callTakeIntoAccount = if ((inv.dApp == this))
763748 then (inv.function == "takeIntoAccountExtraFunds")
764749 else false
765750 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
766751 then true
767752 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
768753 then true
769754 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
770755 then true
771756 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
772757 if (if (callTakeIntoAccount)
773758 then signedByAdmin
774759 else false)
775760 then true
776761 else multiSignedByAdmins
777762 case _ =>
778763 multiSignedByAdmins
779764 }
780765 }
781766

github/deemru/w8io/169f3d6 
127.59 ms