Skip to content
Onchain Economics

Metrics··1 min read

Gross margin in DeFi protocols

Gross margin is retained revenue as a percentage of gross fees, measuring protocol efficiency at capturing value after pass-throughs.

Browse more on Guides or view Metrics.

Gross margin measures what a protocol keeps from each dollar of fees after required pass-throughs. A DEX collecting $1M in swap fees might retain only $100K after paying liquidity providers. Understanding gross margin prevents confusing gross fees with protocol revenue.

Key takeaways

  • Gross margin equals (retained revenue / gross fees) × 100, showing protocol efficiency at capturing value
  • DEXs typically have 5-20% margins, lending 15-35%, perps 50-80%, LSTs 5-10%
  • Margins compress under competition as protocols reduce take rates to attract users and liquidity
  • Gross margin excludes operating expenses like emissions; net margin accounts for all costs
  • Better substitutes include take rate (protocol's fee share) and capital efficiency (revenue/TVL)

Defining gross margin for DeFi

Traditional gross margin is revenue minus cost of goods sold. For DeFi, adapt this as: fees retained by the protocol after required payments to liquidity providers, stakers, or other capital providers who must be compensated for the protocol to function.

A DEX collects swap fees. Most fees go to liquidity providers—the cost of having liquidity. The protocol's gross margin is what remains after LP payments. If swap fees are $1M and LPs receive $900K, gross margin is $100K or 10%.

This differs from gross fees. A protocol announcing "$1M in fees" may retain only $100K. Confusing gross fees with retained revenue overstates protocol economics by 10x. Always identify the retention rate.

Margins by protocol type

DEXs (5-20%): Most fee revenue goes to LPs. Uniswap historically retained 0% (all to LPs) until activating the fee switch. Protocols with active fee switches retain 10-20% of LP fees, meaning 5-20% gross margin on total swap fees.

Lending (15-35%): Protocols keep the spread between borrower rates and depositor rates. If borrowers pay 8% and depositors receive 6%, the 2% spread on borrowed assets is retained. Margins depend on spread size and utilization rates.

Perpetuals (50-80%): Higher margins because the "liquidity providers" are often insurance funds or protocol-controlled pools, not external LPs requiring high fee shares. Trading fees flow primarily to the protocol.

LSTs (5-10%): Take a small percentage of staking rewards. With 4% staking yield and 10% take rate, the protocol earns 0.4% on staked assets. Low margin but applied to very large TVL bases.

Why margins compress

Competition drives margin compression. When multiple protocols offer the same service, they compete by reducing fees or increasing LP rewards. Either action compresses protocol margins.

Aggregators accelerate compression. When users route through aggregators that find the best rates across protocols, protocols must compete on execution quality and fees. The aggregator captures some value; protocol margins shrink.

Commoditization is the end state. For simple services like token swaps, protocols struggle to maintain margins because the service is interchangeable. Sustainable margins require differentiation: superior liquidity, unique features, or network effects.

Beyond gross margin

Gross margin ignores operating expenses. A protocol with 20% gross margin but 25% of revenue spent on emissions has negative net margin. For complete economics, subtract team costs, grants, incentives, and other operating expenses.

Take rate is often more useful: the percentage of transaction value the protocol captures. A DEX with 0.30% swap fee and 10% protocol share has 0.03% take rate. This directly shows value capture per dollar of volume.

Capital efficiency (revenue/TVL) measures how much revenue a protocol generates per dollar of locked capital. Higher capital efficiency means better use of deposited assets. This matters more than gross margin for comparing protocols with different TVLs.

See live data

Links open DefiLlama or other external sources.

Related Concepts

FAQ

What's a 'good' gross margin in DeFi?

It varies dramatically by protocol type. A DEX with 15% gross margin is doing well; a perps protocol with 15% margin is underperforming. Compare margins within protocol categories, not across them.

Does higher gross margin mean better investment?

Not necessarily. High margins can attract competition. Sustainable value comes from margins that can be defended through moats: network effects, liquidity depth, brand, or technical advantages. Undefended high margins compress over time.

How do I find a protocol's gross margin?

Calculate from public data: total fees divided by protocol-retained revenue. DefiLlama shows both fees and revenue for many protocols. The ratio gives gross margin. Be careful to use consistent time periods.

Cite this definition

Gross margin is retained revenue as a percentage of gross fees, measuring what the protocol keeps after required pass-throughs to capital providers.

Related articles