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

**URL:** <https://forum.monad.xyz/t/mip-18-callstackdepth-and-callern-call-stack-introspection-opcodes/556>\
**Category:** MIPs\
**Created:** [September 29, 2026, 1:56pm UTC](https://forum.monad.xyz/t/mip-18-callstackdepth-and-callern-call-stack-introspection-opcodes/556 "2026-09-29T13:56:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![port](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.monad.xyz/port/32/284_2.png) [@port](https://forum.monad.xyz/u/port)\
**Post date:** [October 11, 2026, 6:12am UTC](https://forum.monad.xyz/t/mip-18-callstackdepth-and-callern-call-stack-introspection-opcodes/556/2 "2026-10-11T06:12:14Z")

</div>

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.

---

_[View the full topic](https://forum.monad.xyz/t/mip-18-callstackdepth-and-callern-call-stack-introspection-opcodes/556)._
