Protocol Economics··1 min read
Cost of funds in DeFi
What protocols pay capital providers (LPs, stakers, validators) is cost of funds, not profit sharing. Learn why ignoring this breaks profitability analysis.
Browse more on Guides or view Protocol Economics.
Every protocol needs capital to operate. LPs supply liquidity. Stakers secure networks. Validators process transactions. They all get paid. That payment is the cost of funds. Ignoring it breaks profitability analysis completely.
Key takeaways
- Cost of funds includes all required payments to generate fees: LP shares, staker rewards, validator tips, and incentives
- LPs and stakers are capital providers charging for their service; their compensation is economically a cost, not profit sharing
- Incentives function as variable costs that scale with activity but often exceed the revenue they generate
- Cost structures vary dramatically by protocol type, making cross-category comparisons meaningless without adjustment
- Gross profit equals revenue minus cost of funds; this is the starting point for measuring protocol profitability
What "Cost of Funds" Means in DeFi
Cost of funds is what you pay to have capital available. Banks pay depositors interest. That's their cost of funds. Businesses pay debt holders coupons. That's their cost of funds. DeFi protocols pay LPs, stakers, and validators. Same concept, different labels.
The economics are identical. A protocol cannot generate swap fees without liquidity. Liquidity providers supply that liquidity. They charge for it through their share of fees. This is the cost of having funds available to facilitate swaps. It's not optional. It's structural.
Traditional accounting calls this "cost of goods sold" or "cost of revenue." It's the direct cost required to deliver the service. Everything left after subtracting COGS is gross profit. DeFi should use the same framework. Cost of funds is COGS. What remains after paying it is gross profit.
LPs as Capital Providers
Liquidity providers deposit capital into pools. This capital enables trading. Without it, swaps fail or execute at terrible prices. LPs are not customers. They're suppliers. They provide the raw material (liquidity) that the protocol needs to operate.
LPs charge for this service by taking a percentage of swap fees. On a 0.3% swap fee pool where LPs get 0.25% and the protocol gets 0.05%, the LP share is the cost of funds. The protocol pays 83% of gross fees to access the capital needed to generate those fees.
This isn't profit sharing. It's payment for capital. If the protocol could operate without LPs, it would keep 100% of fees. It can't. LPs are economically necessary. Their compensation is a cost, just like paying rent or electricity in a physical business.
Treating LP payments as distributions rather than costs systematically overstates profitability. A protocol retaining 17% of fees isn't 83% profitable. It has 17% gross margin. The 83% to LPs is cost of funds, not profit distribution.
Stakers as Security Providers
Staking protocols require capital to secure the network. Stakers lock tokens. They run validators or delegate to operators. They provide economic security through slashing risk. This is a service. The protocol pays for it.
Staker rewards come from two sources: inflation and fees. Inflation-funded rewards are emissions (a separate expense). Fee-funded rewards are cost of funds. If a protocol retains 30% of fees and distributes 70% to stakers, the 70% is cost of security.
Without stakers, the protocol cannot process transactions securely. Staking is economically required. The payment to stakers is not discretionary profit sharing. It's the cost of having security available. Treat it as COGS.
Some protocols have both LP and staker costs. A DEX pays LPs for liquidity and stakers for governance/security. Total cost of funds is the sum. Gross profit is fees minus both payments. Many protocols have negative gross profit once all costs are accounted for.
Incentives as Variable Cost
Token incentives (emissions) are an operating expense. But they're also a cost of funds when used to attract liquidity or staking. A protocol offering 50% APY in token rewards to LPs is paying for liquidity. That's cost of funds.
The cost is variable. More incentives attract more liquidity. Less incentives reduce liquidity. This is classic supply and demand. The protocol is purchasing liquidity at market rates determined by competitive yield farming.
Calculate this cost at fair value. If the protocol issues 10M tokens worth $2 each to LPs annually, that's $20M cost of funds. Add this to the LP share of fees. Total cost of funds is fee payments plus incentive payments. Gross profit is revenue minus both.
When incentives exceed revenue, gross profit is negative. The protocol is paying more for capital than it earns from using that capital. This is unsustainable. It's only rational if the incentives are temporary and the protocol can graduate to fee-only capital attraction.
Why Ignoring Cost of Funds Breaks Profitability
If you treat all fees as revenue, you think a protocol with $100M in fees is highly profitable. Then you discover $90M went to LPs. Actual retained revenue is $10M. The "profitable" protocol just became 90% smaller in economic terms.
Then you discover $15M in annual incentives to maintain that liquidity. Cost of funds (LP share plus incentives) is $105M. Revenue is $10M. The protocol has -$95M gross profit. The apparently profitable protocol is burning capital at an extreme rate.
This isn't a corner case. Most protocols operate this way during growth phases. The issue is investors who don't account for cost of funds. They see $100M in fees, assume profitability, and get confused when the token doesn't perform. The economics were never profitable. The analysis was incomplete.
Cost Structures by Protocol Type
DEX
DEXs have simple cost structures. Gross fees are swap fees. Cost of funds is the LP share (typically 80-95% of fees) plus liquidity mining incentives. Retained revenue is the protocol fee portion. Operating expenses beyond cost of funds are minimal.
Example: Uniswap v3 with protocol fees enabled. Total fees $500M, LP share $475M (95%), protocol revenue $25M. No incentives. Cost of funds is $475M. Gross profit is $25M. Clean and sustainable.
Lending
Lending protocols have variable cost of funds based on utilization. Depositors provide capital. Borrowers pay interest. The spread is gross profit. But depositor interest is cost of funds, not revenue.
Example: Aave with $200M borrower interest, $150M depositor interest, $50M retained revenue. Cost of funds is $150M (depositor payments). Add $30M in incentives. Total cost of funds: $180M. Gross profit: $20M ($50M revenue minus $30M incentive cost, but we already counted depositor interest separately, so gross is $50M minus $30M = $20M after incentives).
Perps
Perps have multiple cost components. Trading fees are gross revenue. Market maker rebates are cost of funds. Insurance fund allocations are costs. GLP or similar liquidity provider payments are costs.
Example: A perps protocol with $100M trading fees, $20M to market makers, $10M to GLP providers, $70M retained. Cost of funds: $30M. Gross profit: $70M. Add incentives and the picture changes, but the base economics are strong.
Liquid Staking
LST protocols have transparent costs. Stakers earn rewards. The protocol takes a fee (5-10%). Depositors get the rest. The depositor share is cost of funds. The protocol share is gross profit.
Example: Lido earns $400M in staking rewards. Depositors get $380M (95%). Lido retains $20M (5%). Cost of funds: $380M. Gross profit: $20M. Minimal incentives. Clean margin structure.
| Protocol Type | Primary Cost of Funds | Typical Gross Margin |
|---|---|---|
| DEX | LP share of fees (80-95%) | 5-20% |
| Lending | Depositor interest (65-85%) | 15-35% |
| Perps | Liquidity provider payments (20-50%) | 50-80% |
| Liquid Staking | Depositor share of rewards (90-95%) | 5-10% |
| L2 Sequencer | L1 data availability costs (10-90%) | Variable (10-90%) |
See live data
- Protocol fee generation across DeFi
- TVL as deployed capital proxy
- Revenue data showing retained amounts
Links open DefiLlama or other external sources.
Related Concepts
Understanding cost of funds requires context on protocol economics:
- Fees vs revenue vs profit: How cost of funds separates fees from actual revenue
- DeFi income statement: Where cost of funds fits in a complete P&L framework
- Real yield: Why LP and staker payments are costs, not yield to protocols
- Take rate in crypto: How take rate determines the gap between fees and retained revenue
- Protocol revenue: What remains after cost of funds payments
- Gross margin in DeFi: Measuring protocol efficiency after capital costs
FAQ
Why are LP payments a cost instead of profit sharing?
Because LPs provide a required service (liquidity) that the protocol must pay for. Without LP capital, the protocol cannot generate swap fees. The LP payment is the price of accessing that capital, just like interest on a loan. It's economically a cost, not discretionary profit distribution.
Should emissions be included in cost of funds?
Yes, when used to attract or retain capital providers (LPs, stakers). Emissions used to incentivize liquidity or staking are payment for capital. They should be measured at fair value and added to direct payments (like LP fee shares) to calculate total cost of funds.
How do I calculate gross profit for a DeFi protocol?
Start with gross fees collected. Subtract all payments to capital providers: LP shares, staker rewards, validator tips. Subtract emissions used for capital attraction. What remains is gross profit. This is revenue available for operating expenses and stakeholder distributions.
Can cost of funds exceed revenue?
Absolutely. This happens when incentives required to attract capital exceed the fees generated by that capital. It's common in early-stage protocols. It means the protocol has negative gross profit and is burning capital to maintain operations. It's only sustainable temporarily.
Why do different protocol types have different cost structures?
Because they provide different services requiring different capital structures. DEXs need liquid pools (high LP cost). Lending needs deposit capital (high depositor cost). Perps need both liquidity and leverage (moderate costs). Each model has natural cost of funds determined by competitive dynamics.
Is lower cost of funds always better?
Not necessarily. Lower costs mean higher gross margins, but artificially suppressing costs can reduce service quality. A DEX paying LPs too little loses liquidity, which widens spreads, which loses users. Optimal cost of funds balances margin with service quality and competitiveness.
How does cost of funds change over time?
It varies with competition and market conditions. When yields elsewhere increase, protocols must pay more to retain capital (higher cost of funds). When competition intensifies, protocols might reduce fees, which reduces gross revenue while costs stay fixed (compressed margins). Monitor trends, not snapshots.
Cite this definition
Cost of funds in DeFi is the total compensation paid to capital providers including LP fee shares, staker rewards, validator payments, and capital-attraction incentives, functioning as COGS that must be subtracted from gross fees to calculate gross profit and assess true protocol economics.
Related articles
Protocol Economics
Onchain treasury management: how DAOs allocate capital vs. corporate finance
Compare DAO treasury strategies to corporate capital allocation frameworks. Identify common failures in concentration risk, grant spending, buyback timing, and compensation structures.
Protocol Economics
Harberger taxes and onchain property rights: radical markets meet NFTs and domain names
How blockchain enables the first real implementations of Harberger taxation for digital property. Analyze live experiments in partial common ownership across ENS names, virtual land, and NFTs.
Protocol Economics
MEV as a hidden tax: measuring the deadweight loss of blockchain extraction
Frame MEV through public finance economics: tax incidence, deadweight loss, and rent-seeking. Quantify how much MEV costs users and evaluate whether solutions like Flashbots reduce this invisible tax.
Protocol Economics
The monetary policy of Layer 1s: how token emission schedules mirror central banking
Compare Bitcoin halvings, Ethereum burns, and Solana disinflation to central bank monetary policy frameworks. Understand how protocol-level money supply rules shape token value.