Skip to content

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

Description

@garygreen

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions