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