Skip to content

docs(tip-1048): x storage precompile (MEV-based expiring storage)#3880

Open
decofe wants to merge 1 commit into
mainfrom
tip/1048-reopen
Open

docs(tip-1048): x storage precompile (MEV-based expiring storage)#3880
decofe wants to merge 1 commit into
mainfrom
tip/1048-reopen

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented May 10, 2026

Reopened from #3631 for renewed discussion.

TIP-1048: X Storage Precompile

Approach: MEV-based expiring storage with arbitrary TTLs and out-of-protocol cleanup.

Key design points

  • Three entrypoints: XSTORE(slot, value, expiry), XLOAD(slot), XCLEAR(addr, slot)
  • Arbitrary expiry times via block.timestamp-based TTL
  • Tiered gas pricing: 20k (≤1h) → 250k (>1yr), approaching permanent storage cost for long TTLs
  • Permissionless XCLEAR with 15k gas refund incentivizes cleanup by validators and searchers
  • Cleanup mechanism is hot-swappable — can move to in-protocol later without changing user APIs

Tradeoffs vs TIP-1040 (Epoch-based)

  • ✅ Full flexibility — arbitrary expiry times
  • ✅ Simpler Reth changes — uses standard precompile storage
  • ✅ Hot-swappable cleanup mechanism
  • ❌ Relies on out-of-protocol garbage collection (MEV incentives)
  • ❌ State not bounded by design — depends on cleanup actors

See thread discussion: https://tempoxyz.slack.com/archives/C0A761BDJ6P/p1774624334588709

cc @klkvr @mallesh-tempoxyz

Reopened from #3631. Expiring key-value storage with XSTORE/XLOAD/XCLEAR.
Arbitrary TTL, permissionless cleanup via XCLEAR with gas refund incentive.

Amp-Thread-ID: https://ampcode.com/threads/T-019e12a5-b71d-72db-afef-0fcd16f065d5
@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked stale due to 7 days of inactivity.

@github-actions github-actions Bot added the stale label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant