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

Filter out publisher quotes with wide CIs #166

Merged
merged 8 commits into from
Apr 29, 2022
Merged

Filter out publisher quotes with wide CIs #166

merged 8 commits into from
Apr 29, 2022

Conversation

jayantk
Copy link
Contributor

@jayantk jayantk commented Apr 28, 2022

We've had several instances where publishers have submitted prices that are far from everyone else, but with really wide CIs. The aggregation logic is robust to this case, so a single publisher doing this will not cause a problem. However, this particular problem happens frequently enough that I would like to deal with it in a better way.

In previous cases when this has happened, we have asked publishers to not provide a price if their spread / CI is too wide. E.g., the serum publisher implements this logic https://github.com/pyth-network/pyth-serum/blob/main/program/src/serum-pyth/serum-pyth.c#L266 .

However, it's a little silly that we keep asking publishers to do this when we can do it directly in the on-chain program. This change copies that serum publisher logic into the logic for updating a publisher's price.

tompntn
tompntn previously approved these changes Apr 29, 2022
accept pr comment

Co-authored-by: Tom Pointon <[email protected]>
@jayantk jayantk merged commit ac12a50 into main Apr 29, 2022
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