Master
DeFi Accounting
LP tokens, yield farming, staking rewards, impermanent loss-DeFi creates unique accounting challenges. This guide shows you how to handle them all.
Why DeFi Accounting Is Complex
DeFi introduces accounting challenges that traditional crypto accounting doesn't address.
Multi-Token Positions
Single positions hold multiple assets that shift ratios continuously.
Continuous Accrual
Rewards and fees accrue every block, not at discrete intervals.
Position Lifecycles
Entry, modification, and exit all have distinct accounting treatments.
Cross-Protocol
Strategies span multiple protocols with nested positions.
Impermanent Loss
Hidden cost of liquidity provision that's hard to track and recognize.
Multi-Chain
Activity spans multiple networks requiring unified tracking.
LP Token Accounting
Liquidity pool tokens represent ownership in DEX pools. Understanding the full lifecycle is essential for accurate accounting.
Deposit
- Record disposal of deposited tokens
- Recognize LP token receipt
- Cost basis = Value of all deposited assets
Hold
- Trading fees accrue to position
- Token ratios shift with trades
- Track impermanent loss
Withdraw
- Calculate LP token cost basis
- Record value of tokens received
- Recognize total gain or loss
Example: Uniswap LP Position
Understanding Impermanent Loss
The hidden cost of liquidity provision that every DeFi accountant must track.
What Is Impermanent Loss?
The difference between the value of holding your tokens versus providing liquidity. IL occurs when token prices diverge from your deposit ratio.
IL = (Value if held) - (Value in LP) For 50/50 Pools
When one token's price changes by factor k:
IL = 2 × √k / (1 + k) - 1 Accounting Treatment
IL by Price Change
IL increases as price divergence grows. Fees may offset IL in active pools.
Yield Farming Accounting
Yield farming generates multiple reward types, each requiring distinct accounting treatment.
Tax Treatment: Most jurisdictions treat yield as ordinary income at fair market value when received.
Staking Rewards Accounting
Validator and delegator rewards from proof-of-stake networks.
ETH Staking
Beacon chain validator rewards, MEV, and tips.
- Consensus layer rewards
- Execution layer tips
- MEV rewards
SOL Staking
Validator delegation rewards on Solana.
- Epoch rewards
- Validator commission
- Inflation rewards
DOT Nominating
Polkadot nomination pool rewards.
- Era payouts
- Validator selection
- Unbonding periods
Liquid Staking
stETH, rETH, and other liquid staking derivatives.
- Rebasing vs non-rebasing
- Exchange rate changes
- Wrapper tokens
What to Track
Lending Protocol Accounting
Track supply, borrow, and interest across Aave, Compound, and other lending protocols.
Supplying Assets
- Transfer assets to protocol
- Receive interest-bearing tokens (aTokens, cTokens)
- Track interest accrual continuously
Interest Recognition
- Daily accrual - Most accurate
- Claim-based - Simplest
- Periodic - Monthly/quarterly
Borrowing
- Record liability when borrowing
- Track collateral positions
- Recognize interest expense
NFT Accounting
Treatment varies based on your role: trader, collector, or creator.
Trader
Classification: Inventory
- Mark-to-market valuation
- Ordinary income on sales
- Frequent transaction volume
Collector
Classification: Intangible Asset
- Historical cost basis
- Capital gains on sales
- Impairment testing
Creator
Classification: Revenue
- Initial sale as income
- Royalty income recognition
- Platform fee deductions
Cost Basis Components
Multi-Chain Tracking
DeFi activity spans multiple networks. Unified tracking is essential.
Bridge Matching
Match cross-chain transfers automatically
Gas Tracking
Chain-specific gas costs in native tokens
Unified Reporting
Consolidated view across all chains
Automate Your DeFi Accounting
Coincile handles all major DeFi protocols with automatic position tracking, reward recognition, and impermanent loss calculations.
- 50+ protocol integrations
- Automatic IL calculations
- Multi-chain support
- Reward tracking