The mechanism
What state the contracts store, which inputs change it, and which invariant the transaction is required to leave behind.
Independent DeFi protocol research
How DeFi protocols work, where the money sits, how they change.
An independent educational resource for understanding how DeFi protocols work: how they account for assets, price trades, liquidate collateral, and change across versions.
What state the contracts store, which inputs change it, and which invariant the transaction is required to leave behind.
Where collateral, reserves, fees, and shares sit after a supply, swap, mint, or withdrawal, including the residual loss when a rule fails.
Which design is deployed, which design it replaced, and which behavior belongs to an older contract that integrations still call.
Pooled and isolated lending, two kinds of automated market maker, a collateralized and a synthetic dollar, liquid staking and restaking, a capital allocator, a yield market, a vault-based exchange, an on-chain perpetuals exchange, a vote-escrow exchange, a modular lending kit, the oracle layer many of them read and the multisig that guards their keys. They are not eighteen copies of one architecture.
Pooled overcollateralized borrowing, with utilization-based interest and collateral liquidation.
Constant-product swaps against pooled reserves, with concentrated liquidity in v3 and v4.
Overcollateralized stablecoin debt against vaults, with a governance-set stability fee and a savings rate.
StableSwap and CryptoSwap invariants, with LP tokens minted against pool liquidity rather than a constant-product share.
Share-based claims on pooled staked ether, with oracle accounting and a withdrawal queue.
A singleton contract of isolated, immutable lending markets, with curated vaults on top and a separate fixed-rate market protocol.
Delegated, slashable stake allocated to operator sets that external services define, with delayed allocation and withdrawal.
Hedged backing assets, signed-order minting for approved counterparties, and a staking vault paid from backing revenue.
An Aave V3 fork funded by Sky, savings vaults backed by rate-limited allocations, and governance through the Sky Atlas.
Yield tokenization into PT and YT, traded against SY in a pool whose curve tightens toward maturity.
Pooled borrowing against inert collateral, with one base asset per market, signed balances and a reserve-funded absorb liquidation.
A single Vault that holds all pool tokens and settles debts and credits atomically, with pluggable pool math and hooks.
A decentralized oracle network signs aggregated reports, and an onchain aggregator verifies a quorum and exposes the median behind a proxy.
A layer-1 chain with an onchain order book and margin engine, a validator-published oracle, and a community vault as liquidation backstop.
Pooled ETH is matched with node-operator bonds into 32 ETH validators, and rETH's exchange rate is updated from reported Beacon Chain balances.
Single-asset ERC-4626 vaults that accept each other's shares as collateral, coordinated by an account connector and settled by controller-vault health checks.
A decentralized exchange whose token emissions are directed by locked or staked holders, who in return earn revenue from the pools they favor.
A proxy smart account whose logic verifies an owner threshold of signatures over a typed transaction hash, with optional modules, guards and a fallback handler.
Each comparison is limited to versions that the cited documentation or repositories actually describe.
V3 gathers supply and debt for a market inside one Pool and reprices every position when risk parameters change. V4 keeps utilization interest at an immutable hub, lets spokes define markets, and adds a collateral risk premium plus a target-health-factor liquidation.
v2 is a fungible constant-product pair with a 0.30 percent fee. v3 keeps constant-product math inside a chosen tick range and represents positions as NFTs. v4 keeps concentrated liquidity, puts every pool in one PoolManager, settles with flash accounting, and lets a hook extend the swap.
Sky did not replace the Vat with a new stablecoin design. DAI remains the internal stablecoin debt. USDS is a one-for-one ERC-20 path onto that debt. sUSDS is a savings vault. MKR converts to SKY at a base rate of 24,000 SKY per MKR, less a delayed-upgrade penalty. The vault safety check is still art times rate against ink times spot.
Curve did not ship a single V1-to-V4 exchange. It shipped an invariant for pegged assets, a later invariant for volatile assets, an FXSwap pool for externally priced markets, a factory of immutable pool instances, and a separate stablecoin whose liquidation is an AMM.
Lido withdrawals are a request, an oracle finalization, and a claim. The claim is an NFT until ETH is paid. Dual Governance, live on Ethereum since 4 July 2025 by Lido’s account, lets stETH holders escrow tokens so a DAO proposal cannot finish before they have had time to exit.
'Morpho V2' is not a replacement for Blue. Blue is the variable-rate core and stays. Vaults V2 is a newer vault design that can allocate across protocols. Midnight is a separate fixed-rate, fixed-term protocol. This guide separates the three so an integrator or lender knows which contract a name points to.
EigenLayer's early design exposed an operator's whole stake to every service it joined. Slashing launched in April 2025 with operator sets and unique stake. Later core releases moved the slasher into the AllocationManager, added operator-set rewards and a seven-day wait before slashed shares are cleared.
Ethena has three distinct exits. Approved counterparties mint and redeem at a signed price. Everyone else sells USDe on a market at whatever price it trades. sUSDe holders unstake through a cooldown that the contract caps at 90 days, and the documents disagree on the current length.
Spark lists eight savings tokens that look alike and are not. Some earn a Sky-set rate and others earn from Spark Liquidity Layer allocations at a rate Spark governance sets, while Sky’s related stUSDS lends against SKY. Small withdrawals use an idle buffer. Larger ones are signed requests that the Liquidity Layer fills.
A Pendle market has three phases. Before maturity PT drifts toward par and YT decays. At maturity PT redeems for the accounting asset. After maturity unredeemed positions stop being yours to earn from. Lending markets that take PT as collateral choose between a market-derived TWAP price and a deterministic linear discount.
Compound v2 and Compound III share a name and a governance Timelock but little else. v2 is a multi-asset pool whose deposits are cTokens that earn, collateralize and get lent. III is a set of single-base-asset markets whose collateral earns nothing. They fail in different places, so a market's version decides which risks apply.
Balancer V2 and V3 both keep tokens in a Vault and pricing math in pools, but they are separate deployments. V3 moves user interaction into routers, adds hooks and ERC-4626 buffers, and changes fee shares and limits. The November 2025 exploit hit V2 pools, so the version of a pool decides which risks apply.
A Chainlink feed returns an answer and timestamps, and it does not stop a consumer from using an old one. A safe read checks that the answer is positive, that its age is within the feed's heartbeat plus a margin, and, on a layer 2, that the sequencer is up and past a grace period. Each protocol decides how much of this to do.
Hyperliquid names several things alike. HyperCore is the native order book and margin engine, the HyperEVM is a smart contract layer on the same consensus, HIP-1 tokens trade on native spot books, and HIP-3 perpetual markets are run by staked deployers. Each has different listing rules, oracles and failure modes.
Rocket Pool's validators have changed form twice. Minipools used one contract per validator and 16 then 8 ETH bonds. Saturn 0 made RPL collateral optional. Saturn 1 introduced megapools, 4 ETH bonds, an RPL revenue share and a new queue. Which generation a validator belongs to decides its bond, its rewards and its exit path.
Euler V2 uses the word vault for four different configurations. A governed vault can be changed by its governor, an escrow vault is a canonical non-borrowable collateral container, a finalized vault has no active governor, and an EulerEarn vault allocates one asset across strategies. Authority is deployment-specific, so the label does not settle who controls what.
Aerodrome on Base inherited Velodrome V2 from Optimism, and on 21 October 2026 both became Aero. AERO, VELO, veAERO, veVELO and sAERO therefore refer to different contracts depending on the date and chain. This guide maps the names and the conversion rates the project publishes.
A Safe's owner threshold is the default, and four things change it. A module can execute without signatures, a guard can block execution, a fallback handler answers unknown calls, and a delegatecall transaction runs foreign code in the Safe's storage. Each is a contract the owners trust, and the operation type is part of what they sign.
The same question asked of different designs.
Aave lends out other suppliers' deposits at a utilization-based rate. Maker mints stablecoin against a vault at a governance-set fee. Side by side.
Constant product, concentrated ranges, StableSwap and CryptoSwap compared: what each curve assumes about prices and where liquidity sits.
How aTokens, Maker debt, stETH, wstETH and sUSDS turn a stored number into a balance, and why copying one into your own ledger goes wrong.
Health factors, vault ratios and LLAMMA bands compared: when a position becomes unsafe, how much is taken, and who bears the loss if it falls short.
How Aave V3, SparkLend and Morpho Blue differ in who sets risk, where losses land, how rates move and how liquidation works, with a table and worked numbers.
How Sky's overcollateralized USDS, Ethena's delta-neutral USDe and Spark's savings vaults hold a dollar, where yield comes from, who can redeem, and how they fail.
How Lido's pooled stETH and EigenLayer's delegated, slashable stake differ in what is promised, who decides faults, how exits work, and how the risks stack.
Markets
What an AMM prices, which state it stores, and how Uniswap and Curve implement different invariants.
Markets
How a liquidity provider’s claim is tracked in Uniswap v2, Uniswap v3 and v4, and Curve NG pools.
Markets
How the x · y = k invariant sets a Uniswap v2 price, and where v3 and Curve stop using it uniformly.
Markets
How a Uniswap v3 or v4 position holds token0, token1, or both as price moves through its tick range.
Credit
How a shared lending pool measures utilization and why that ratio, not an order book, sets borrower competition.
Credit
How Aave’s two-slope utilization curve differs from Maker’s governance-set stability fee.