Oracle V5-V6 Audit Scope

Repository: Lido Oracle
Directory to audit: src/
Approximate lines of code: ~ 6400 (tool: pygount)

Update details

For the upcoming hard fork, the off-chain Oracle will require certain mandatory changes that must be released prior to the fork to avoid accounting issues (Oracle V5). Simultaneously, we are preparing the implementation of Triggerable Withdrawals, which will also require audit (Oracle V6). In case if Triggerable Withdrawals feature is ready in time the V5 release will be skipped.

The Lido Oracle is optimistically scheduled for a single audit in February, covering both Scope V5 and V6. However, in the worst-case scenario, scope V6 may be delayed and require a separate audit in April.

Changes V5

Goals

  • Oracle should smoothly switch logic after passing pectra hardfork.
  • Update Oracle calculations to align with the latest Ethereum specifications.
  • Don't miss anything from hardfork scope that could break off-chain Oracle.

Relevant EIPs Impacting Oracle V5

  • EIP-7251 - Increase the MAX_EFFECTIVE_BALANCE
  • EIP-7549 - Move committee index outside Attestation

Oracle Components Requiring Updates

  • Accounting Oracle
    • Churn Limit Calculations: Update to accommodate changes introduced by MAX_EFFECTIVE_BALANCE.
    • Bunker Mode Fixes: Adjust to updates in slashing variables.
    • New Withdrawal Credentials: Change behavior to accommodate new type of credential (0x02).
  • Validators Exit Bus Oracle
    • Sweep and Churn Calculations: Transition from validator count-based calculations to balance-based.
  • CSM Oracle
    • Attestation Parsing: Adjust to handle new committee attestations format.
  • Refactoring:
    • Introduce additional sanity checks.
    • Adaptation to Ethereum node-specific behaviors for compatibility.
    • Modifications to the structure of CSM data uploaded to IPFS.

Estimations

Audit start date: Early February
Estimated changes: 10% of code base

Changes V6

Goals

  • Support Triggerable Withdrawal feature in protocol

Oracle Components Requiring Updates

  • Validator Exit Bus Oracle:
    • Update validator exit order predicates
    • Remove usage last requested indexes
  • Accounting Oracle
    • Remove stuck keys reporting

Estimations

Optimistic audit start date: Early February
Pessimistic audit start date: Early April
Estimated changes: 10% of code base

Offchain Oracles

Oncain Oracles

Select a repo