Skip to content

Oracle-operator bond contract (tokenomics §8)#18

Merged
RunTimeAdmin merged 1 commit into
masterfrom
feat/oracle-operator-bond
Jul 13, 2026
Merged

Oracle-operator bond contract (tokenomics §8)#18
RunTimeAdmin merged 1 commit into
masterfrom
feat/oracle-operator-bond

Conversation

@RunTimeAdmin

Copy link
Copy Markdown
Owner

The last unbuilt protocol contract — operator accountability for the oracle set. A separate path from CountersigStaking (which bonds agents), per §8.

CountersigOracleBond (UUPS)

  • Lifecycle: depositBond (post ≥ bondAmount → Bonded) → governance admit() → Active → initiateUnbond/removeOperator → Exiting → withdrawBond after the cooldown.
  • Slashing (§8): a SLASHER partially slashes for provably-incorrect reputation data or >24h downtime; slashed $CSIG → slashBeneficiary; an Active operator dropped below bondAmount is demoted out of the set.
  • Exit can't dodge slashing — bonds stay slashable through the unbonding cooldown (same discipline as agent staking).
  • Tracks activeCount for the min-3-operator check. Decoupled from ORACLE_ROLE grants — governance grants those on Reputation/EpochFees off isActiveOperator().

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

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>
@RunTimeAdmin RunTimeAdmin merged commit 3f7b6b0 into master Jul 13, 2026
3 checks passed
@RunTimeAdmin RunTimeAdmin deleted the feat/oracle-operator-bond branch July 13, 2026 03:18
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