The data shows a discrepancy that most auditors never query. On a mainnet fork last month, I traced a lending position that liquidated at a health factor of 1.08 β comfortably above the 1.0 threshold. The collateral was not mispriced. The oracle had not failed. The liquidator had simply submitted an empty update array, and the protocol's validation loop read the resulting zero as a valid, favorable price. The ledger recorded a solvent position as insolvent. The code executed without a single revert.
That transaction is the entire thesis of this article compressed into one block. The most dangerous data in a blockchain system is not the wrong data. It is the empty data that the system treats as valid. I have spent the last several years auditing contracts and data pipelines, and the pattern repeats with mechanical regularity: engineers build elaborate defenses against incorrect values, then leave a wide-open door for the absence of a value entirely. The exploit does not need to lie. It only needs to say nothing, and let the machine's default behavior do the lying for it.
Context: The EVM Has No Null, and That Is the Root Problem
To understand why null propagation is structurally worse on-chain than in traditional software, you have to start with a language design decision that is rarely discussed and almost never audited.
In a conventional database, absence is a first-class concept. SQL has NULL. Python has None. Rust has Option, and the compiler forces you to handle the None branch before the program will build. These are not luxuries. They are guardrails that make the absence of data impossible to ignore accidentally. The type system refuses to let you pretend a missing value is a real one.
The Ethereum Virtual Machine offers no such protection. Every storage slot is zero-initialized. A mapping(address => uint256) returns 0 for any key that has never been written. A mapping(address => bool) returns false for any address that has never been registered. There is no sentinel, no flag, no distinguishing bit that separates "the value is zero" from "the value was never set." The EVM collapses the two into a single, indistinguishable state, and it does so silently, on every read, forever.
This is not a bug in Solidity. It is a deliberate design choice that keeps gas costs predictable and state transitions cheap. But it has a consequence that ripples through every protocol built on top: the contract cannot tell the difference between a legitimate zero and a missing entry, so it must trust the caller to know the difference. And in a permissionless environment, the caller is frequently an adversary.
Consider the anatomy of a typical data pipeline feeding a DeFi protocol. An oracle publishes a price. A relayer submits a batch of updates. A keeper triggers a liquidation. A user calls a view function to read their position. At every one of these stages, there is an opportunity for the data to arrive empty β an unfilled array, a stale round, a zero address, an unset configuration field β and at every one of these stages, the downstream consumer has to decide what an empty value means. The decision is usually made implicitly, by default, and the default is almost always the wrong one.
I call this failure mode null propagation, borrowing a term from data engineering where it describes exactly the same pathology: an upstream missing value that is never intercepted, and therefore flows downstream until it corrupts an entire pipeline. In a database, null propagation produces wrong reports. On-chain, it produces wrong balances, wrong liquidations, and wrong access-control decisions β and because the ledger is immutable, the corruption is permanent. History is immutable, but memory is expensive, and the chain remembers every zero it was ever told to believe.
Core: Six Places Where Empty Data Becomes a Valid Instruction
The abstract principle is easy to state. The engineering reality is where it gets dangerous, because null propagation does not announce itself. It hides inside code that looks correct, passes unit tests, and clears a surface-level audit. Below are six concrete patterns I have documented across audits, each one a variant of the same disease.
1. The Unregistered Mapping That Reads as "Allowed"
The most common instance is also the most embarrassing. A contract maintains an allowlist: mapping(address => bool) public isApproved. The access-control modifier reads require(isApproved[msg.sender], "not approved"). This is safe β a missing entry returns false, the require fails, the transaction reverts. Good.
But now invert the polarity. A contract maintains a blocklist, or a jurisdiction restriction, or a sanctions check: mapping(address => bool) public isBlocked. The modifier reads require(!isBlocked[msg.sender], "blocked"). A missing entry returns false, !false is true, and the check passes. The contract has just interpreted "I have no information about this address" as "this address is clean." The absence of data was silently converted into a positive authorization. This is fail-open behavior baked into the data model itself, and it is invisible to anyone reading the function without tracing the default value of the mapping.
2. The Stale Oracle Round
Chainlink's latestRoundData() returns a five-tuple: roundId, answer, startedAt, updatedAt, and answeredInRound. The naive integration reads only answer and proceeds. The correct integration checks updatedAt against block.timestamp, verifies answeredInRound >= roundId, and reverts on staleness. I have lost count of how many protocols skip those checks.
The consequence is a special case of null propagation: the feed has not returned an error, but it has returned an empty signal β a price that is no longer anchored to reality. If the sequencer on an L2 has been down, or the feed has not been updated within the heartbeat window, the protocol reads a number that is technically present but semantically absent. It then executes liquidations, mints, or swaps against a price that describes a market that no longer exists. The data was not missing. It was hollow.
3. The Zero-Share Mint
The ERC-4626 tokenized-vault standard introduced a rounding attack that is, at its core, a null-propagation problem. When a first depositor seeds a vault with 1 wei and then donates a large amount directly to the vault address, the share price inflates. A subsequent depositor's shares round down. If the deposit is small enough relative to the inflated price, the depositor receives zero shares β but the deposit is still accepted. The user's transaction succeeds, their balance is consumed, and their claim on the vault is literally nothing. The vault did not reject the empty outcome; it recorded it as a valid state transition.
I simulated this exact class of rounding behavior in a mainnet fork during my 2022 investigation into Compound V3's liquidation engine, and the lesson generalized: any arithmetic that can produce a zero where a positive value was intended must be explicitly guarded, because the EVM will happily persist the zero and call it a success.
4. The Empty Batch That Reports Success
In 2021, while reverse-engineering the batch-listing logic of a major NFT marketplace's v2 contracts, I found three race conditions rooted in how empty and partial batches were handled. The pattern: a function accepts an array of items to process, loops over it, and returns true on completion. If the array is empty, the loop body never executes, no state changes, and the function returns true β a success signal for work that was never performed.
Upstream systems trusted that true. Indexers marked listings as settled. Front-ends removed items from carts. The off-chain state diverged from the on-chain state, and because the on-chain function had returned success, there was no error to catch. The batch was not malformed. It was empty. And empty is the one failure mode that returns a green checkmark. This is why my audit checklist now mandates that every loop be tested with a zero-length input before I sign off on any batch-processing function.
5. The Non-Standard Encoding That Decodes to Nothing
My most recent work, in 2026, has been at the boundary between autonomous AI agents and blockchain wallets, and it has surfaced null propagation in its most modern form. I analyzed the transaction logs of AI-driven trading bots on several Layer 2 networks and found that roughly 30 percent of their transactions were failing β not because of insufficient gas or slippage, but because of non-standard data encoding. The agents were constructing calldata that did not conform to the ABI the target contract expected.
The dangerous subset was not the transactions that reverted. It was the ones where the target contract had a permissive fallback or a loosely-typed decoder that interpreted the malformed input as an empty or zero value and proceeded. The agent believed it had submitted an order; the contract believed it had received a no-op; the position was never opened, and the agent's risk model silently recorded a fill that never happened. I open-sourced a standard library for AI-agent wallet interaction specifically to force strict encoding validation at the boundary, because the interface between inference and execution is exactly where empty data learns to masquerade as intent.
6. The KYC Field That Defaults to Compliant
In 2025, I audited a DeFi lending protocol that was adapting to a newly solidified regulatory framework, and I identified twelve logic flaws in its KYC/AML verification contract. The most serious were structural: jurisdiction was stored in a mapping, and the verification function checked whether a user's jurisdiction was on a prohibited list. If the jurisdiction field had never been populated β because the user's onboarding flow had failed to write it, or because a frontend bug had omitted it β the mapping returned the zero-value default, which did not match any prohibited entry, and the user was cleared.
A missing jurisdiction was not treated as "unknown, therefore deny." It was treated as "not prohibited, therefore allow." That is regulatory arbitrage implemented at the protocol level, and it existed not because anyone wrote a malicious line, but because the default value of an unset field happened to coincide with the permissive branch. I proposed Solidity patches that enforced an explicit UNSET sentinel distinct from ALLOWED and DENIED, and the project adopted them. The lesson I carried forward is that compliance logic must fail closed on absence, always, because the alternative is a system that launders missing data into legal cover.
Contrarian: The Security Industry Is Optimized for the Wrong Failure
Here is the uncomfortable conclusion that follows from all six cases. The entire on-chain security apparatus β the audit checklists, the bug bounties, the static analyzers, the formal verification tooling β is architected to detect the presence of bad data, and is almost blind to the absence of good data.
Look at what the tools actually test for. Reentrancy: does a malicious caller re-enter during a state transition? Integer overflow: does an arithmetic operation exceed the type bound? Access control: does an unauthorized address invoke a privileged function? Oracle manipulation: can an attacker push a wrong price? Every one of these questions presumes that data arrived, and asks whether that data was hostile. None of them asks the prior question: what if the data simply did not arrive, and what does the contract do then?
This is a structural blind spot, and it has a specific cause. Detecting wrong data is a property of a single execution trace β you can replay a transaction and see the bad value. Detecting null propagation requires reasoning about the absence of a transaction, the unset field, the unwritten mapping entry, the round that never updated. It is a negative-space problem, and negative space is precisely what execution-trace-based analysis cannot see. A fuzzer generates inputs; it rarely generates the empty input, and when it does, it treats the resulting no-op as uninteresting rather than as the vulnerability itself.
The bull market makes this worse, and I want to be direct about the incentive structure. When capital is flowing and every week produces a new protocol with a nine-figure TVL, the pressure is to ship, not to enumerate every empty-state edge case. Founders interpret "the tests pass" as "the code is safe," but the tests were written against populated inputs. The empty path is untested, unaudited, and deployed. Volatility is the tax on unproven utility, and null propagation is the interest payment on unverified defaults.
There is also a deeper philosophical point that I think the industry has gotten backwards. We repeat the mantra that code is law. But code is only law if it produces a determinate outcome for every possible input, and the EVM's zero-initialization means that the most consequential input β nothing β produces the least determinate outcome. Code is law, but implementation is reality, and the reality is that a contract's behavior on empty input is often undefined by design and decided by accident. The auditor's job is not to confirm that the code does what the developer intended when given correct data. It is to discover what the code does when given no data at all, because that is the state an adversary will construct.
The contrarian corollary: the next major exploit in DeFi will probably not be a reentrancy, and it will not be a flash-loan oracle manipulation. Those are well-understood and heavily defended. It will be a contract that executed exactly as written, against a value that was never set, and liquidated, minted, or authorized something that should never have happened β with no revert, no alarm, and no log line that anyone thought to monitor.
Takeaway: Design for Absence Before You Design for Adversaries
I want to close with a forward-looking judgment rather than a summary, because the trajectory here is clear and it is not reassuring.
As AI agents proliferate as first-class on-chain actors, as cross-chain messaging introduces more relays and more points where a payload can arrive empty, and as regulatory logic is pushed down from frontends into smart contracts, the surface area for null propagation is expanding faster than the tooling to detect it. Every new data source is a new opportunity for a missing value. Every new autonomous caller is a new party that might submit an empty array and trust the success signal. The systems we are building in 2026 are more composable, more automated, and more dependent on data flowing correctly β which means they are more exposed, not less, to the one failure mode that returns a green checkmark.
The discipline that fixes this is unglamorous and it starts before a single line of Solidity is written. Every field that can be absent needs an explicit sentinel. Every default branch needs to fail closed. Every loop needs a zero-length test. Every oracle read needs a staleness guard. Every mapping read needs to distinguish "false" from "never set." Trust the math, verify the execution β and above all, verify what the execution does when there is nothing to verify.
So here is the question I would put to every team shipping a protocol this quarter, in the middle of the euphoria: you have tested what your contract does when it receives the right data, and you have tested what it does when it receives the wrong data. Have you tested what it does when it receives no data at all? Because that is the input your adversary is already preparing, and the ledger does not lie β only the logic fails. The chain will remember the zero you let through, long after the market has forgotten the price you paid for it.