Oracle-operator bond contract (tokenomics §8)#18
Merged
Conversation
A separate accounting + slashing path from CountersigStaking, for the oracle operator set. UUPS. Lifecycle: depositBond (>= bondAmount -> Bonded) -> governance admit() -> Active; initiateUnbond/removeOperator -> Exiting -> withdrawBond after the cooldown. A SLASHER partially slashes for provably-incorrect data or downtime (§8); slashed $CSIG goes to slashBeneficiary, and an Active operator dropped below bondAmount is demoted. Bonds stay slashable through the unbonding cooldown, so exiting can't dodge accountability. Tracks activeCount for the min-set-size check; ORACLE_ROLE granting stays governance's job, gated off isActiveOperator(). 20 tests incl. storage slot-5 pin. DeployOracleBond.s.sol. Full suite 169. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
The last unbuilt protocol contract — operator accountability for the oracle set. A separate path from
CountersigStaking(which bonds agents), per §8.CountersigOracleBond(UUPS)depositBond(post ≥ bondAmount → Bonded) → governanceadmit()→ Active →initiateUnbond/removeOperator→ Exiting →withdrawBondafter the cooldown.SLASHERpartially slashes for provably-incorrect reputation data or >24h downtime; slashed $CSIG →slashBeneficiary; an Active operator dropped belowbondAmountis demoted out of the set.activeCountfor the min-3-operator check. Decoupled fromORACLE_ROLEgrants — governance grants those on Reputation/EpochFees offisActiveOperator().Tests & deploy
20 tests (deposit/admit, slash + demotion + still-slashable-while-exiting, unbond cooldown, remove, guards, activeCount, storage-slot pin).
DeployOracleBond.s.sol. Full suite 169, slither clean, deploy dry-run clean.With this, every protocol contract in the tokenomics doc has an implementation.
🤖 Generated with Claude Code