Skip to content

VRAM vs Oracle Phase layout collision in _insurance_isolation_padding[4..14] #2097

@dcccrypto

Description

@dcccrypto

Summary

_insurance_isolation_padding bytes [4..14] in MarketConfig are shared between Oracle Phase (PERC-622) and VRAM fields. Currently dormant (VRAM never enabled), but enabling VRAM on any market would corrupt cumulative_volume and phase2_delta_slots.

Overlapping Ranges

  • cumul_vol [3..11] vs ewmv [4..8] vs last_vol_price [8..12]
  • phase2_delta [11..14] vs vol_margin_scale [12..14]

Risk

Enabling VRAM corrupts oracle phase tracking; oracle phase transitions corrupt VRAM state. Mutual destruction if both active.

Recommendation

Relocate VRAM fields to free padding after PERC-8452. May need CONFIG_LEN expansion.

Found during PERC-8452 analysis (docs/PERC-8452-k2-bps-layout-analysis.md in percolator-prog).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions