Clarify the meaning and capture point of reward_manifest.price - #485
Open
madninja wants to merge 1 commit into
Open
Clarify the meaning and capture point of reward_manifest.price#485madninja wants to merge 1 commit into
madninja wants to merge 1 commit into
Conversation
State which price statistic the field carries and when it is captured, so "price of the token at time rewards were calculated" can no longer be read as a spot quote at manifest-write time or as an average over the reward period.
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.
Closes #484
reward_manifest.pricewas documented only as "Price of the token at timerewards were calculated", which reads equally well as a spot quote taken when
the manifest is written or as an average over the reward period. Neither is
what the field carries.
What the field actually holds, per reward token:
ema_pricepointestimate, no confidence adjustment, as the on-chain end-of-epoch instruction
read it from the canonical HNT/USD feed. The rewarder recovers that same
value off-chain, so the manifest reports the price the chain applied for the
epoch rather than a separately-sampled one.
when the epoch's rewards were calculated.
The comment now states the statistic, the capture point, and that Pyth's EMA
averaging window is a property of the feed with no relation to the reward
period, and links Pyth's EMA documentation for the weighting details.