Skip to content

Updating readme with TWAP known issue#812

Open
wtj2021 wants to merge 1 commit intomainfrom
readme-twap
Open

Updating readme with TWAP known issue#812
wtj2021 wants to merge 1 commit intomainfrom
readme-twap

Conversation

@wtj2021
Copy link
Copy Markdown
Collaborator

@wtj2021 wtj2021 commented Apr 4, 2025

No description provided.

Comment on lines +759 to +772
The impact is at most 40 BPS

The issue seems to be tied to the following:
- If you update the TWAP you will make the previous average match the current one, meaning after a week your average will be equal to the `valueToTrack`

If you don't update the TWAP, the following happens:
- After 1 week, the relative delta time and value is the highest, causing up to 40 BPS of discrepancy between the correct value (which should be equal to `valueToTrack`) and the value the math will report
- Every subsequent week the value will trend towards `valueToTrack` (never reaching it)

## Logs from the test

https://gist.github.com/GalloDaSballo/5cdc0170a6c2481eb616cfd5c57eb84b

We can see that the maximum impact is 40 BPS and happens after one week has passed
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The impact is at most 40 BPS
The issue seems to be tied to the following:
- If you update the TWAP you will make the previous average match the current one, meaning after a week your average will be equal to the `valueToTrack`
If you don't update the TWAP, the following happens:
- After 1 week, the relative delta time and value is the highest, causing up to 40 BPS of discrepancy between the correct value (which should be equal to `valueToTrack`) and the value the math will report
- Every subsequent week the value will trend towards `valueToTrack` (never reaching it)
## Logs from the test
https://gist.github.com/GalloDaSballo/5cdc0170a6c2481eb616cfd5c57eb84b
We can see that the maximum impact is 40 BPS and happens after one week has passed
The impact is at most 40 BPS.
The issue seems to be tied to the following:
- If you update the TWAP you will make the previous average match the current one, meaning after a week your average will be equal to the `valueToTrack`.
If you don't update the TWAP, the following happens:
- After 1 week, the relative delta time and value is the highest, causing up to 40 BPS of discrepancy between the correct value (which should be equal to `valueToTrack`) and the value the math will report.
- Every subsequent week the value will trend towards `valueToTrack` (never reaching it).
## Logs from the test
https://gist.github.com/GalloDaSballo/5cdc0170a6c2481eb616cfd5c57eb84b
We can see that the maximum impact is 40 BPS and happens after one week has passed.

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 this pull request may close these issues.

2 participants