Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tbssajal
Copy link
Contributor

@tbssajal tbssajal commented Dec 9, 2024

Outlier detection process is refactored so that

  • Symbols order do not affect outlier detection and price calculation
  • Each symbol is processed independently

closes #1110, closes #1121

Consensus breaking with piccadilly testnet

// Stop considering this reporter for any future calculation.
// This is symbol independant.
voterInfo[_outlier].reportAvailable = false;
voterInfo[_outlier].performance = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't make much sense to me. We are already withholding their performance increment for this report on line 614.

This change would mean that when a report is an outlier for a single symbol, we remove their rewards for all symbols, which doesn't seem fair.

Copy link
Contributor Author

@tbssajal tbssajal Dec 10, 2024

Choose a reason for hiding this comment

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

I kinda agree but I think it also relates to both fairness and consistency issue #1110. Right now it seems to me inconsistent when the outlier is rewarded but also getting slashed.

Copy link
Contributor

@ScottRMalley ScottRMalley Dec 10, 2024

Choose a reason for hiding this comment

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

I agree that the current implementation is dependent on symbol order, and this would at least set rewards to zero regardless of the symbol order, however, I do think that the eventual correct implementation will be to only withhold rewards for symbols where the oracle was an outlier, rather than withhold rewards for all reports in the round where an oracle posted at least one outlier report.

I don't think we are moving forward with merging this PR at the moment, so I'm not requesting changes now, but I do think it's interesting to keep these options in the discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do think that the eventual correct implementation will be to only withhold rewards for symbols where the oracle was an outlier, rather than withhold rewards for all reports in the round where an oracle posted at least one outlier report.

Yeah I kinda agree.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this line. Now outliers can get rewards.

@codecov
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.91%. Comparing base (3a2e46e) to head (359587a).

Additional details and impacted files
@@                     Coverage Diff                      @@
##           oracle-no-reveal-penalty    #1107      +/-   ##
============================================================
- Coverage                     74.98%   74.91%   -0.06%     
============================================================
  Files                            30       30              
  Lines                          4644     4644              
============================================================
- Hits                           3482     3479       -3     
- Misses                          857      858       +1     
- Partials                        305      307       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tbssajal tbssajal force-pushed the oracle-outlier-incentive branch from 51be2da to 8519476 Compare December 10, 2024 12:49
@tbssajal tbssajal changed the title Oracle Outlier Incentive Removal Oracle Outlier Detection Refactor Dec 10, 2024
@tbssajal tbssajal force-pushed the oracle-outlier-incentive branch from 8519476 to a813705 Compare December 10, 2024 15:08
@tbssajal tbssajal force-pushed the oracle-outlier-incentive branch from a813705 to c72c86a Compare March 17, 2025 14:37
@tbssajal tbssajal changed the base branch from develop to oracle-no-reveal-penalty March 17, 2025 14:38
@tbssajal tbssajal force-pushed the oracle-no-reveal-penalty branch from 1459ba5 to 3a2e46e Compare March 18, 2025 15:02
@tbssajal tbssajal force-pushed the oracle-outlier-incentive branch from c72c86a to 359587a Compare March 19, 2025 10:52
@tbssajal tbssajal force-pushed the oracle-no-reveal-penalty branch 4 times, most recently from 67b21a3 to a9156b4 Compare March 26, 2025 13:25
Copy link
Contributor

@Jason-Zhangxin-Chen Jason-Zhangxin-Chen left a comment

Choose a reason for hiding this comment

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

The overall looks good to me, just left two questions on the failure of the remove() function.

address _voter = penalizedVoters.at(0);
// don't consider past reports from the penalized voters
voterInfo[_voter].reportAvailable = false;
require(penalizedVoters.remove(_voter), "voter not removed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, if this remove() returns false, the finalize of the block will be failed, leading a chain on-holding. When will the remove() be failed?

address _voter = outliers.at(0);
// don't consider past reports from the outliers
voterInfo[_voter].reportAvailable = false;
require(outliers.remove(_voter), "voter not removed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question here.

@tbssajal tbssajal force-pushed the oracle-no-reveal-penalty branch 2 times, most recently from 861bbde to ea110a2 Compare April 22, 2025 10:55
@tbssajal tbssajal force-pushed the oracle-no-reveal-penalty branch 3 times, most recently from d5acce6 to 2d9af1f Compare May 21, 2025 13:32
Base automatically changed from oracle-no-reveal-penalty to develop May 22, 2025 08:43
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.

Oracle Penalizing on First Offence Creates Fairness Issue Oracle Outlier Detection Consistency and Fairness

4 participants