We would like to propose an improvement to increase visibility in L2 EVM execution.
What are the proposed changes?
We propose a new call stack implementation to record opcodes, addresses and function selectors and expose them through a precompiled contract interface.
If implemented, the precompile will give protocols deeper visibility into addresses involved at any point in execution. The added visibility enables more robust exploit prevention mechanisms, including transaction screening.
Why are we recommending this and how do we believe the user/developer experience will be improved?
- This improvement is rooted in the authors’ common goal to prevent smart contract exploits.
- Transaction screening is an emerging and promising exploit prevention approach. Here’s an example - a DeFi protocol may screen incoming transactions against a negative reputation list and/or for anomalous activity outside of normal user behavior, and revert transactions deemed malicious.
- Unfortunately, transaction screening techniques are susceptible to evasion. DeFi protocols only have visibility into
tx.originfields of a transaction, meaning hackers can hide behind various proxies.
- We are recommending this improvement to enable more robust security mechanisms that collectively deliver great protection for DeFi protocols and user funds.
Eager to hear the community’s thoughts and feedback on this improvement. Your insights will be invaluable in refining the RIP. We’re looking forward to an insightful discussion!