Skip to content

EIP-8024 — DUPN, SWAPN, EXCHANGE

Status: Runnable locally (stdio v0.1, self-hosted). Public MCP not launched yet — use the website exploration today.

What became possible

On Amsterdam, the EVM executes three new stack opcodes: DUPN (0xe6), SWAPN (0xe7), and EXCHANGE (0xe8). They extend deep stack access beyond DUP16 / SWAP16 without breaking backward compatibility.

The MCP server runs any raw bytecode you (or your agent) supply under Amsterdam and returns deterministic gas, stack, and optional traces. It does not ship fixed demo programs — your agent constructs bytecode from the spec.

What you can ask your agent

Connect the MCP server (Connect), then try prompts like:

  • “Is EIP-8024 supported on Amsterdam? What can I do with it?”
  • “Give me a minimal DUPN example for depth 17, encode it as bytecode, and run it on Amsterdam with trace.”
  • “I have this pre-Amsterdam stack-manipulation bytecode — rewrite it using SWAPN where it helps, then compare gas before and after.”
  • “Run this bytecode on Amsterdam and tell me if DUPN succeeds or fails and why.”
  • “Compare two variants: my original bytecode vs a DUPN-based rewrite on Amsterdam.”

These are inspiration prompts — ask in plain language; your agent uses the connected server and reports results back to you.

What the server does

StepActionPurpose
1Discover supportConfirm 8024 is runnable; read opcode encoding from the live catalog
2Run bytecodeExecute programs under a fork config (Amsterdam only is fine)

Fork caveat

Amsterdam already bundles EIP-8024 in EthereumJS v10. Passing eips: [8024] is accepted but is not a before/after toggle on Amsterdam itself.

For 8024 off vs on (optional), run the same bytecode on baseline fork osaka, then on preview fork amsterdam. The catalog exposes this pair on the EIP-8024 module as comparison: { baselineForkId: "osaka", previewForkId: "amsterdam" }. You do not need osaka for Amsterdam-only 8024 runs.

Twins and spec

Link
Website exploration (interactive textbook)EIP-8024 on feelyourprotocol.org
Canonical specEIP-8024
Coverage indexCoverage

Changelog

EIP-8024 MCP Catalogue Changelog
  1. v0.32026-08-27Osaka baseline vs Amsterdam preview — run twice to compare 8024 behavior.
  2. v0.22026-08-27Human prompts without tool names; action table uses plain labels.
  3. v0.12026-08-27Initial human catalogue page — inspiration prompts, tools, fork caveat, twin links.

Use = end-user reference. Internals = architecture and operations. Each section carries its own micro-changelog.