A user receives a link to what appears to be a legitimate DeFi protocol, connects their Ethereum wallet, and is prompted to approve a transaction. The interface looks correct, the contract address seems familiar, and the operation sounds straightforward. But the actual bytecode being executed contains instructions to drain the entire wallet balance to an attacker’s address. This scenario plays out hundreds of times weekly across Ethereum and EVM-compatible networks. Detection happens after the damage is done, if at all. Rabby wallet extension was designed with this specific threat in mind: intercepting malicious or deceptive transactions before they reach the blockchain.
The mechanism that does this interception is not a blocklist or a centralized filter. It is an automated risk analysis system that simulates transactions, decodes contract interactions, analyzes function calls, and flags suspicious patterns in real time. When a user clicks “approve” on any transaction, the wallet executes a complete pre-sign security check that runs locally on the device, examines the actual code being called, and surfaces warnings before the signature is committed to the blockchain. Understanding how this system works—and what it does not protect against—is essential for anyone holding significant assets on EVM networks.
How pre-sign transaction simulation works
Transaction simulation is the foundation of Rabby’s risk detection. Rather than simply passing the signed transaction to the blockchain, the wallet first executes the same transaction in a local, sandboxed environment. This simulation does not modify any state on the actual blockchain; it is a dry run that shows what would happen if the transaction were mined.
When a user initiates a contract interaction—such as approving a token spend, interacting with a lending protocol, or minting an NFT—the wallet decodes the function call and its parameters. It then queries the current state of the blockchain (account balances, contract storage, variable values) and replays the transaction logic against that state. The result is a precise map of what will change: which accounts will lose or gain tokens, which contract variables will be modified, and whether the transaction will revert.
This approach catches several attack vectors immediately. A malicious smart contract that contains hidden logic to transfer all funds when a specific function is called will be exposed during simulation. The wallet will detect that an approval transaction intended to spend 100 tokens actually attempts to transfer the entire balance. A flashloan-based attack that temporarily borrows liquidity to manipulate prices and drain collateral will show the same unintended balance changes. Reentrancy attacks, where a contract calls back into the user’s wallet or another contract to extract value before the original transaction completes, appear in the simulation as unexpected state modifications.
The critical limitation is scope. Simulation examines the immediate transaction and its direct effects. It does not evaluate whether the transaction is economically rational or whether the user intended the outcome. If a contract function is designed to burn tokens as a fee, the simulation will show the burn occurring, but it cannot determine whether the user should have known about that fee. Simulation also depends on accurate blockchain state. If the simulation relies on stale data—such as outdated balances or contract code—the result may not match what actually happens when the transaction is broadcast to the network.
Automatic risk alerts and contract analysis
Beyond simulation, Rabby’s security system analyzes the contract code itself. When a transaction targets a smart contract, the wallet fetches the contract’s bytecode from the blockchain and decompiles it to identify function calls, storage access patterns, and control flow. This analysis happens entirely on the user’s device and is the reason the rabby wallet extension can function without sending personal data to centralized servers for analysis.
The analysis engine flags several categories of risk. One is external calls: function invocations that reach outside the contract being interacted with. A contract that makes multiple external calls, especially to user-specified addresses, creates an opportunity for reentrancy or delegate-call attacks. Another category is unusual storage patterns. Contracts that write to unexpected storage locations or delete critical state variables without obvious reason may be designed to conceal what they are doing.
A third category is permission escalation. If approving a token spend for one amount actually grants unlimited spending permissions, the pre-sign check will detect the mismatch between what the user sees and what the contract actually enforces. Similarly, if a contract function is marked as public when it should be private, or if it performs administrative operations like changing ownership without proper checks, those patterns are flagged. The wallet also examines whether the contract includes self-destruct or selfdestruct operations, which can cause unexpected behavior if invoked.
Security alerts are tiered. Some are strict warnings that block confirmation until the user explicitly overrides them; others are informational notices that explain what is happening but allow the transaction to proceed. The distinction matters. A transaction that attempts to transfer all funds to an unknown address is typically a hard block. A transaction that interacts with a newer protocol that Rabby’s analysis engine does not fully recognize is usually an information-level alert, allowing experienced users to proceed at their own judgment.
Balance change previews and expected versus actual outcomes
One of the most intuitive security features is the balance change preview. Before signing, the wallet displays what will happen to the user’s token balances if the transaction is confirmed. This is generated from the transaction simulation and shows not only the outcome, but also the expected value change in terms the user can understand. For a token swap, the preview shows the amount being sent and the amount expected to be received. For a lending deposit, it shows the resulting collateral and any minting of receipt tokens.
This feature defeats a class of attacks that rely on cognitive mismatch. A phishing site might show a user a screenshot of a legitimate protocol interface, but the actual transaction being signed is different. The contract might be a lookalike designed to capture approvals. When the user approves what they think is an investment but is actually a transfer of their entire holdings, the balance preview makes that discrepancy visible. The user sees “sending 10,000 USDC” and the preview shows “receiving 0 USDC,” which is inconsistent with any legitimate transaction.
The preview also handles slippage and fees. Decentralized exchanges set slippage tolerances to account for price movement between the time a transaction is submitted and the time it is mined. The preview can show the minimum amount likely to be received, the maximum impact of slippage, and any protocol fees. Gas fees appear separately, allowing the user to understand the total cost before committing.
The key assumption is that the user reads and understands the preview. Some attacks succeed because the preview is accurate but the user misinterprets it or is in a hurry. A transaction that correctly shows “sending all holdings” may still be approved if the user is distracted or has not read carefully. The preview reduces the technical barrier to understanding what will happen, but it does not eliminate user error.
Network-level security and EVM-chain compatibility
Rabby’s pre-sign analysis works across Ethereum mainnet and all EVM-compatible networks because the security checks rely on EVM bytecode execution and contract interaction patterns, which are the same across all chains that implement the Ethereum Virtual Machine specification. Whether the transaction occurs on Ethereum, Arbitrum, Optimism, Polygon, or any other EVM chain, the fundamental threat model is identical: a malicious contract can execute arbitrary code if given the opportunity.
The wallet automatically selects the correct blockchain based on the RPC endpoint or the site attempting to connect. When a user visits a DeFi protocol, the protocol suggests a network, and Rabby’s automatic network selection compares that network to the wallet’s current state. If the user is on Ethereum mainnet but the protocol assumes Polygon, Rabby will either switch the network or alert the user to the mismatch. This prevents a category of attack where a user intends to interact with a contract on mainnet but is tricked into performing the same operation on a different chain where the contract address is controlled by an attacker.
However, EVM compatibility does not extend to Bitcoin, Solana, or non-EVM chains. Rabby does not support native Bitcoin transactions, and the analysis engine cannot validate Solana programs or other virtual machine architectures. Users holding Bitcoin alongside EVM assets must use a separate wallet for Bitcoin or bridge Bitcoin to an EVM network via a third-party bridge, each of which introduces additional complexity and risk.
Phishing detection and known malicious contracts
Beyond behavioral analysis, Rabby maintains detection rules for known phishing patterns and documented malicious contracts. If a transaction target address has previously been reported as conducting a scam or if the contract code matches known malicious patterns, the wallet flags it immediately. This layer is not a blockchain-based proof system; it relies on community reports and security research to populate a list of known threats.
The system is reactive rather than proactive. A newly deployed malicious contract will not be in the database until it is discovered, reported, and added to the rule set. This creates a window of vulnerability: the first users to interact with a new scam contract may not receive a clear warning because the contract has no history yet. However, the simulation and code analysis layers often catch these attacks anyway because they examine actual behavior, not just historical records.
Phishing sites themselves are harder to catch at the wallet level. If a website is a perfect clone of a legitimate protocol, uses the same contract addresses, and performs the same operations, the transaction itself may appear legitimate. The user might approving a spend on the correct contract but sending the transaction through an attacker-controlled site. Some protections, such as domain verification and HTTPS certificate checking, exist at the browser level rather than the wallet level. Rabby can alert if a site requests an unusual permission or if the RPC endpoint appears suspicious, but the ultimate defense against phishing remains user attention and verification of URLs.
Open-source verification and supply-chain security
Rabby’s code is published on GitHub and available for inspection. This means the security mechanisms described above are not theoretical—anyone can review the actual implementation, verify that pre-sign checking is not being bypassed, and confirm that no backdoors or data collection are present in the signing process. Open-source verification is particularly important for a wallet, because a closed-source wallet could collect private keys, recovery phrases, or transaction data without the user’s knowledge.
However, open-source code does not automatically mean safe code. Many security vulnerabilities exist in publicly visible codebases simply because they were not discovered during review. The relevant practice is regular audits, responsible disclosure of bugs, and community security review. Users should also verify that the wallet binary they are running matches the published source code—a process called reproducible builds. If Rabby’s download process cannot be verified to match the source repository, a user might be running a modified version with security features disabled.
Installation should only occur through the official rabby.io domain. Counterfeit versions distributed through unofficial channels or malicious browser extension marketplaces have historically been used to steal private keys and recovery phrases. The official site provides links to the Chrome Web Store, Brave web store, and other authenticated distribution channels. Users should verify that the extension ID and developer information match the official Rabby project before creating a wallet or importing existing accounts.
Limitations and what pre-sign checking cannot prevent
Despite its sophistication, Rabby’s pre-sign security analysis has clear boundaries. It cannot prevent a user from voluntarily signing a transaction that will harm them. If a user sees a balance change preview showing that they will receive zero tokens in exchange for sending all their holdings, but they click “confirm” anyway (perhaps because they are following instructions from a social engineering attacker), the wallet cannot stop them. The check is designed to make the decision informed, not to override user agency.
It also cannot prevent theft of the recovery phrase or password. If an attacker gains access to the mnemonic seed or the encryption password protecting it, they can create a new instance of the wallet elsewhere and drain all funds. Protection of the recovery phrase is the user’s responsibility, supported by secure storage practices and never entering it into websites or sharing it with anyone. Rabby enforces password protection on recovery phrases and can integrate with hardware wallets to keep the seed offline entirely, but these are protections the user must choose and properly configure.
Pre-sign checking cannot validate smart contracts written with bugs or unintended behavior. A legitimate protocol that contains a vulnerability—such as a calculation error that allows withdrawing more than was deposited—will pass Rabby’s checks because the contract is executing as designed, even though the design is flawed. The simulation will show the expected outcome correctly; it just cannot determine whether that outcome is economically sound.
Finally, the system depends on accurate blockchain data. If the RPC endpoint being used to fetch contract code or account balances is compromised or returns stale data, the simulation may not match what actually happens when the transaction is broadcast. This is why using a reliable, trustworthy RPC provider or running a personal node is part of a complete security approach alongside using Rabby’s pre-sign checks.
Hardware wallet integration and recovery security
For users with significant holdings, hardware wallet integration elevates the security model. Rather than storing the private key on the device running the browser extension, the key remains on a hardware device such as a Ledger or Trezor. When a transaction requires a signature, Rabby requests the hardware wallet to sign it. The hardware device performs its own verification before approving the signature, and the private key never leaves the physical device.
This architecture separates the threat models. Malware on the computer running Rabby cannot extract the private key because it is never transmitted. However, malware can still trick the hardware device into signing the wrong transaction if the user approves it on the device without carefully reading the verification screen. Most hardware wallets display transaction details for verification before signing, but the user must perform this verification. A rushed or distracted user can still sign a malicious transaction.
Recovery security receives equal attention. If the device is lost or damaged, recovery requires the backup recovery phrase. Rabby requires a password to encrypt the phrase before it is stored locally, adding a layer of protection against someone gaining physical access to a backup. However, the password is only as strong as the user’s memory and practices. A weak password can be brute-forced; a forgotten password may make the recovery phrase inaccessible. The wallet supports MetaMask import and watch-only accounts, allowing users to restore access in limited forms, but restoring full control requires either the recovery phrase with password or access to a hardware device that was backed up during initial setup.
Frequently asked questions
How does the rabby wallet extension detect malicious smart contracts?
The wallet uses three complementary mechanisms: transaction simulation, which executes the transaction in a sandboxed environment to detect unintended state changes; contract code analysis, which examines bytecode for suspicious patterns such as reentrancy vectors or unexpected external calls; and risk databases that flag known malicious contracts and phishing addresses. Simulation catches behavioral anomalies, while code analysis identifies structural risks and known threats provide historical context.
Can rabby wallet extension prevent me from approving a transaction that will drain my funds if I deliberately sign it?
No. The pre-sign security checks are designed to make transactions transparent and to alert you to suspicious patterns, but they cannot override your explicit approval. If you see a balance preview showing that you will receive nothing in return for sending all your funds, but you click confirm anyway, the transaction will proceed. The system protects against accidental harm and deception, not against users making deliberate choices they will later regret.
Does rabby wallet extension work on every blockchain?
Rabby specializes in Ethereum and EVM-compatible networks such as Arbitrum, Optimism, and Polygon. It does not support native Bitcoin or Solana. The pre-sign security analysis relies on EVM bytecode execution and applies only to chains that implement the Ethereum Virtual Machine. You will need separate wallets for non-EVM assets or must use bridges to move them to EVM networks, each of which introduces additional complexity and risk.