Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap Settings #35

Open
Zergity opened this issue Jul 10, 2023 · 0 comments
Open

Swap Settings #35

Zergity opened this issue Jul 10, 2023 · 0 comments
Assignees

Comments

@Zergity
Copy link
Contributor

Zergity commented Jul 10, 2023

create a Settings button and dialog to config the slippage settings, this setting is passed in UTR.output

  • Slippage Tolerance (3%)
  • Pay-Off Min Rate (97%)
  • Pool Filter:
    • Min Interest Rate (0.02%) (this rate must be multiplied with K before compared to pool Interest Rate)
    • Min Liquidity: (1%) (percentage of liquidity of all pools)
    • Max Deleverage Chance: (80%)

UTR.output must set to estimated amountOut * (100% - slippageTolerrance)

Remove Risk Factor; use Deleverage Chance instead:

  • Deleverage Chance of Long token (A) = 2 * rA / R
  • Deleverage Chance of Short token (B) = 2 * rB / R

This DeleverageChance also is used for LeverageDepth opacity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants