Skip to content
Monpediaby Unity Nodes
MIPs

MIP-18: `CALLSTACKDEPTH` and `CALLERN` Call Stack Introspection Opcodes

2 posts111 views2 likesLast activity Oct 2026

MIPs mentionedMIP-18

From forum.monad.xyz, every post in full, each linked to its post. Open the thread on the forum ↗

  1. baltoliOP 2 likes
    Monad Improvement Proposals

    Monad Improvement Proposals

    Monad Improvement Proposals (MIPs)

    This MIP proposes two new opcodes that allow-fine grained introspection of the EVM call stack.

    Open on the forum ↗
  2. port

    This looks amazing, very well scoped!

    Though I might have one question here: The authorization section has a warning against using CALLERN(n > 0) for auth, so would a similar warning for CALLSTACKDEPTH help here? Because require(CALLSTACKDEPTH == 0) is almost like a direct call only flag and if im getting this right, would prevent users that come through a smart wallet or a router or multicall3.

    Here is how I would maybe add it under security considerations:
    Contracts SHOULD NOT restrict functionality based on CALLSTACKDEPTH, as this breaks composability with smart accounts and batching contracts.

    This is definitely not something about the proposal itself but just something that I had in mind while reading the spec.

    Open on the forum ↗