Conversation
JulissaDantes
approved these changes
Apr 8, 2025
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 |
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.