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

Impermanent loss calculator doesn't factor in increase in value of assets #35

Open
garygreen opened this issue Apr 22, 2023 · 0 comments

Comments

@garygreen
Copy link

The calculator assumes a linear-return as the number of days progress towards the calculated Future Price. In reality, as that price is reached, the underlying fees generated have increased in value.

Animation

Take note here:
1 day position = $0.94 return
200 day position = $187.53 ($0.94 * 200)
In reality, the position would be generating MATIC and USDC, where MATIC is increasing in value. So a linear return isn't the ideal calculation here.

When the position of days is increased, I would expect to see the return of MATIC and USDC increase rather than stay the same - that way it could factor in increase in value.

Simpler way to view this problem

It's easier to visualise if you increase the Future price to be something extreme like $500 in future, across a 200 day position:

Take note of 1 day position, $0.94 yield, $1.5 future price

image

Take note of 200 day position, ONLY $187.53 yield, yet $500 future price

image

Clearly this doesn't make any sense. If your earning yield for 200 days generating MATIC and it's future price is $500 per MATIC, the yield wouldn't be only $187.53

Hope that makes sense?

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

1 participant