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

Create IL Simulator #1

Closed
SamusElderg opened this issue Oct 15, 2022 · 0 comments · Fixed by #11
Closed

Create IL Simulator #1

SamusElderg opened this issue Oct 15, 2022 · 0 comments · Fixed by #11

Comments

@SamusElderg
Copy link
Contributor

Variables for the user to plug in:
• Average trade size Vs TVL (global)
• Initial USD prices of each asset
• Asset price movement of one asset (repeatable)
• Select between the SP liquidity sensitive fee swap output calc and the fixed UniSwap model (or show results of both by default for easier comparison?)

Per repeatable "asset movement" variable:
• simulate the swaps per "average trade size" var until the pool balances exceed the resulting asset ratio calculated by the target "asset price movement"
• use the resulting pool balance and new asset prices to calculate the impermanent loss/gain in USD per repeatable field (so we can see the results after each asset price movement)

Based on rough spreadsheet work, it was calculated with:
• 2.5x asset price movement
• 0.25% of TVL average trade size
The IL is neutral (little-to-no IL)

Smaller price movement and/or higher average trade size results in overall gains in USD value Vs holding the initially pooled assets

@nowaycs nowaycs linked a pull request Jan 16, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant