Share
Security Research
Why Forta is Proposing RIP-7614
February 8, 2024
•
Forta is the largest network of security intel in web3. The decentralized Forta Network leverages machine learning and a community of security researchers to detect exploits, scams, and other threats.
Rollup Improvement Proposals (RIPs), similar to Ethereum Improvement Proposals (EIPs), are essential for advancing Layer 2 (L2) networks, enhancing the scalability and security of the Ethereum ecosystem. Unlike EIPs, which affect Ethereum's core functionalities, RIPs focus on improvements specific to rollups. In line with other pioneering web3 protocols, Forta is introducing an exploratory RIP to enable native transaction screening within L2 protocols.
Forta's Rollup Improvement Proposal, RIP-7614, puts forward a new precompile for L2s that gives smart contracts more visibility into addresses in the transaction call stack. This additional visibility enables DeFi protocols to perform robust transaction screening, and most importantly… block exploits.
What is RIP-7614?
RIP-7614 proposes a new precompile exposing opcodes, addresses and function signatures in the call stack to called smart contracts. The analogy for RIP-7614 is a “blacklight” that exposes all the hidden elements of a transaction that contracts otherwise can’t see. Let’s break each element down…
Precompiles
are generic smart contracts native to the EVM. Each precompile lives at a fixed address, and represents functionality that any other contract on-chain can leverage.
Opcodes
are the instructions the EVM uses to execute transactions and smart contracts.
Addresses
are the unique, public identifiers for smart contracts and accounts.
Function signature
is a hash of a function string.
How does RIP-7614 advance smart contract security?
Fundamentally, RIP-7614 is not proposing security-specific changes to the EVM. However, the Forta Foundation team is particularly excited about the second order impacts on smart contract security, specifically on-chain threat prevention.
This excitement is rooted in the team’s belief that transaction screening will be incredibly effective at preventing exploits. Transaction screening is the idea that smart contracts can and should screen incoming transactions for threats, and block a transaction if it is deemed too high risk. The screening solutions being developed today focus on screening transactions for malicious and anomalous activity. These solutions are applied at the application layer, and are currently only are opt-in for protocols. If said solutions are broadly adopted, they have the ability to prevent a significant percentage of smart contract attacks.
A related belief is that this screening should happen on-chain, in a transparent and verifiable way. It’s easy to imagine security screening being done by a single third party, in a “black box” fashion with complete control over how and what is screened. This is not the future web3 deserves.
Now, one legitimate technical challenge limiting the effectiveness of transaction screening is address visibility. Today, a DeFi smart contract wanting to screen incoming transactions only has visibility into the msg.sender
and tx.origin
fields. An attacker can use various techniques - including proxy contracts and delegate calls - to obfuscate the true source of the call and circumvent detection. While these circumvention techniques aren’t being used today, researchers expect hackers to quickly adopt them once transaction screening becomes more common.
RIP-7614 introduces a non-intrusive way to increase visibility into hackers’ obfuscation techniques by keeping track of the call stack and exposing the latest list of addresses via an EVM precompiled contract when requested at any specific point of EVM execution.
RIP-7614 = More robust Tx Screening = Less Exploits
Who is supporting RIP-7614?
The original RIP-7614 concept was jointly proposed by team members at OpenZeppelin and the Forta Network. However, the idea was refined based on feedback from a number of other security companies including SphereX, Ironblocks and Neurablock, as well as individuals including Yoav Weiss at the Ethereum Foundation, and Idan Levin at Collider Ventures. The proposed version was collectively authored by:
- Caner Çıdam, Lead Developer at OpenZeppelin
- Jonathan Alexander, CTO at OpenZeppelin
- Christian Seifert, Forta Foundation Council Member
- Andrew Beal, Head of Ecosystem at Forta Foundation
- Ariel Tempelhof, Chief Product Officer at SphereX
- Oren Fine, CTO at SphereX
- Assaf Eli, CTO at Ironblocks
- Or Dadosh, CEO at Ironblocks
- Idan Levin, Partner at Collider Ventures
- Alejandro Navarro, CEO at NeuraBlock
How can you participate in the RIP process?
The Forta Foundation team is looking forward to a thoughtful discussion about this proposal on the Ethereum Magicians forum, and are particularly excited to engage with L2s willing to adopt this change.
RIP-7614 is currently in “Draft” status and subject to change based on public discussion on the Ethereum Magician’s Forum. If you want to join the discussion, you are encouraged to visit the forum and post your thoughts.
Subscribe to Forta’s News
Stay updated on the latest Forta news and announcements.