DeFi protocol security
five questions before you deposit
Audited protocols fail. High-TVL protocols get exploited. The difference between protocols that survive and those that do not comes down to upgrade authority, oracle design, governance structure, and treasury management - all verifiable on-chain.
Analyse a protocolUpgrade authority · oracle detection · governance · EVM
Every scan is powered by the XemaS Semantic Intelligence Platform · answers carry their evidence and coverage state
Security is not a function of popularity
The largest DeFi exploits by dollar value have occurred in protocols with high TVL, active communities, and completed audits. An audit certifies the state of code at a specific point in time. It does not cover who can change that code after the fact, what external data the protocol trusts for liquidations, or whether governance can be captured through token accumulation.
Protocol security is a multi-axis assessment. The six dimensions in this guide each represent a distinct attack surface with its own verification methodology. A protocol can score well on contract code and poorly on governance, or vice versa. Every axis needs to be evaluated independently.
All of these dimensions are verifiable on-chain. This guide covers what to check, how to check it, and which combinations of weaknesses constitute a critical risk profile.
Six protocol security dimensions
Each dimension is an independent risk axis. Select any spoke to read the full verification guide for that dimension.
TVL Risk
Total value locked is a usage metric, not a safety metric. Understand concentration risk, TVL versus treasury gaps, and incentivised versus organic deposits.
Oracle Risk
Price oracles are the most exploited attack surface in DeFi. Learn the difference between spot AMM prices, TWAP feeds, and decentralised price aggregators.
Bridge Risk
Cross-chain bridges introduce external trust assumptions. Multisig size, validator count, and custodial versus non-custodial design all determine bridge security.
Governance Risk
Token-weighted governance can be attacked via flash loan vote manipulation. Snapshot versus on-chain execution and quorum design create distinct risk profiles.
Upgrade Risk
Upgradeability means the code you reviewed can be replaced. Who holds the upgrade key, and whether that upgrade requires governance approval, determines whether an upgrade is safe or malicious.
Treasury Security
A treasury funded entirely in the protocol's own token, held by a single EOA, is a structural failure independent of contract quality. Verify custody and asset composition separately.
Five questions to ask about any protocol
Who controls the upgrade keys?
An upgradeable contract is only as trustworthy as whoever holds the upgrade authority. A single EOA holding the proxy admin key means one person can replace the protocol code without governance approval. Check whether the upgrade key belongs to a timelock-gated governance system, a high-threshold multisig, or a single address.
What oracle type feeds the prices?
Protocols that use prices to calculate collateral ratios or trigger liquidations depend entirely on those prices being manipulation-resistant. A spot AMM price can be moved in a single transaction using a flash loan. A time-weighted average over 30 minutes is significantly harder to manipulate. A decentralised price feed with many independent operators provides the strongest resistance.
How large is the validator or multisig set?
Every security committee - whether a governance multisig, a bridge validator set, or a pause guardian - has a threshold: the minimum number of participants needed to execute an action. A 2-of-3 multisig with three individuals from the same team is weaker than it appears. Verify the actual number of independent signers and whether they are publicly disclosed.
Does governance have a timelock?
A governance system that can execute decisions immediately after a vote passes provides no reaction time for users or the community. A timelock inserts a mandatory delay - typically 48 hours to 7 days - between a vote passing and its execution. Verify both that a timelock exists and that its delay is operationally meaningful.
Is the treasury diversified?
A treasury held entirely in the protocol's own token loses value in direct proportion to the token price. If the token declines, the protocol loses both user confidence and operating capital simultaneously. Verify the treasury's actual on-chain holdings, not self-reported figures, and calculate runway in stablecoin terms.
On-chain verification for each dimension
Upgrade authority identification
Resolves whether a contract is upgradeable, identifies the admin address, and determines whether that admin is a timelock, a multisig, or a single EOA.
Oracle dependency detection
Identifies whether the contract reads external price data and traces whether it uses a spot AMM price, a TWAP, or a decentralised price feed.
Governance structure analysis
Checks for timelock presence on governance execution, reads the minimum delay, and identifies whether proposer and executor roles are separated or concentrated.
Treasury and custody profiling
Traces the treasury address from protocol contracts, identifies custody structure, and surfaces asset composition for on-chain verification.
Free · No sign-up required · EVM
What investors get wrong
Confusing TVL with safety
The protocols with the largest exploits had high TVL. High TVL makes a protocol a more attractive target, not a safer one. TVL measures how much is at risk, not how well it is protected.
Ignoring oracle type
Protocols that read spot AMM prices for collateral or liquidation calculations are vulnerable to flash loan manipulation. The oracle type is one of the most consequential variables in protocol risk and is almost never mentioned in marketing materials.
Treating audits as guarantees
Audits check code for known vulnerability patterns at a point in time. They do not cover governance attacks, oracle manipulation, post-audit upgrades, or economic design failures. Any change after an audit resets the security baseline for that change.
Not checking upgrade authority
Most due diligence focuses on whether a contract has been audited. The more operationally critical question is whether the contract can be changed after the audit - and if so, who controls that change. A single EOA holding the upgrade key is a critical risk regardless of audit quality.