Skip to content

fix(operator): enforce 1-epoch delay on fee updates to prevent atomic… - #282

Open
0xCassandraX wants to merge 1 commit into
jito-foundation:masterfrom
0xCassandraX:fix/operator-fee-epoch-delay
Open

0xCassandraX wants to merge 1 commit into
jito-foundation:masterfrom
0xCassandraX:fix/operator-fee-epoch-delay

Conversation

@0xCassandraX

Copy link
Copy Markdown

Resolves #281.
Prevents atomic post-epoch snapshot manipulation by enforcing a strict 1-epoch delay on operator fee updates.

Architecture & State Transitions

operator_set_fee no longer immediately mutates the active fee.
Instead, it queues a pending_fee_bps with a fee_effective_epoch of current_epoch + 1.

active_fee_bps(current_epoch) is introduced as the sole authoritative fee resolver for downstream snapshot construction.

Zero ABI Breakage:
The new tracking fields consume 10 bytes from the trailing reserved_space array (261 -> 251 bytes).
Total account size remains rigidly at 512 bytes.

Seamless Migration:
Pre-upgrade accounts carry a zeroed tail in the reserved space, which naturally deserializes as effective_epoch = 0 (the newly introduced NO_PENDING_FEE_CHANGE sentinel), instantly resolving to their historically settled fee.

This branch has not been deployed

No deployments
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.

Immediate Restaking fee updates allow atomic post-epoch snapshot manipulation and theft of vault yield

1 participant