Tax Considerations for DeFi Lending | Lending & Borrowing on XRPL | XRP Academy - XRP Academy
3 free lessons remaining this month

Free preview access resets monthly

Upgrade for Unlimited
Skip to main content
intermediate50 min

Tax Considerations for DeFi Lending

Learning Objectives

Identify the tax-triggering events in DeFi lending and their general treatment

Understand how interest income from lending is typically taxed

Recognize the tax implications of liquidation events

Appreciate the tax efficiency of borrowing versus selling

Establish documentation practices for tax compliance

⚠️ TAX DISCLAIMER ⚠️

This lesson provides EDUCATIONAL INFORMATION ONLY.

It is NOT tax advice.
It is NOT legal advice.
It should NOT be relied upon for actual tax filing.

Tax laws vary by jurisdiction and change frequently.
Individual circumstances affect tax treatment.
DeFi-specific guidance is evolving and often unclear.

ALWAYS consult a qualified tax professional
for advice on your specific situation.

This lesson aims to:
├── Raise awareness of tax implications
├── Provide framework for understanding issues
├── Highlight areas requiring professional guidance
├── Encourage proper documentation
└── NOT replace professional tax advice
```


The often-ignored cost:

THE TAX IMPACT ON RETURNS:

EXAMPLE: IGNORING TAXES

Position: $10,000 RLUSD earning 8% APY
Gross yield: $800/year
"I'm making 8%!"

EXAMPLE: ACCOUNTING FOR TAXES

Same position, US taxpayer in 32% bracket:
├── Gross yield: $800
├── Tax owed (ordinary income): $256
├── After-tax yield: $544
├── Effective return: 5.44%
└── "I'm actually making 5.44%"

THE DIFFERENCE:

├── Reported return: 8%
├── Actual return: 5.44%
├── Tax leakage: 32% of gains
├── Common mistake: Ignoring this
└── Real returns are after-tax returns

WHY THIS MATTERS:

Comparison to Alternatives:
├── DeFi lending: 8% gross, ~5.4% after-tax
├── Municipal bonds: 4% tax-free = 4% after-tax
├── Difference narrower than headline suggests
└── Tax efficiency is part of the analysis

Compounding Impact:
├── Year 1: Lost $256 to taxes
├── That $256 doesn't compound
├── Over years, significant difference
├── Tax drag accumulates
└── Long-term impact substantial


---

Understanding the trigger points:

TAX EVENT FRAMEWORK:

GENERALLY TAXABLE EVENTS:

  1. Receiving Interest/Yield

  2. Token Swaps

  3. Receiving Reward Tokens

  4. Liquidations

GENERALLY NOT TAXABLE EVENTS:

  1. Depositing Crypto

  2. Borrowing

  3. Withdrawing Your Deposit

GRAY AREAS:

Receipt of aTokens/cTokens:
├── Is exchanging USDC for aUSDC taxable?
├── Arguments both ways
├── IRS hasn't clarified
├── Conservative: Treat as non-taxable
├── Aggressive: Treat as swap (taxable)
└── Consult tax professional

Staking Within Lending:
├── Depositing into protocol
├── Some argue it's not a disposition
├── Others treat as taxable swap
├── Jurisdiction dependent
└── Unclear and evolving
```

How lending yields are typically taxed:

INTEREST INCOME TAXATION:

GENERAL TREATMENT:

Classification:
├── Interest from lending = Ordinary income
├── NOT capital gains (usually)
├── Taxed at marginal income rate
├── Same as salary, wages, bank interest
└── Often the highest rate

Timing:
├── Generally taxable when received
├── Or when accrued (depending on method)
├── If interest accrues but not withdrawn:
│ May still be taxable
├── Consult on specific timing
└── Don't assume deferral

Rate (US Example, 2024):

Marginal Tax Brackets:
├── 10%: Up to $11,600
├── 12%: $11,601 - $47,150
├── 22%: $47,151 - $100,525
├── 24%: $100,526 - $191,950
├── 32%: $191,951 - $243,725
├── 35%: $243,726 - $609,350
├── 37%: Over $609,350
└── Plus state taxes in most states

Example Calculation:

Income: $150,000 salary
DeFi interest: $5,000
├── Interest taxed at marginal rate
├── Falls in 24% bracket (for federal)
├── Federal tax on interest: $1,200
├── State tax (varies): ~$250 (5% example)
├── Total tax on $5,000: ~$1,450
├── After-tax yield: $3,550
└── Effective tax rate on yield: 29%

REBASING TOKEN COMPLEXITY:

With aTokens (Aave):
├── Balance increases continuously
├── Each block = Tiny interest payment
├── Technically thousands of taxable events?
├── Practically: Calculate net interest
├── Record at end of period
└── Guidance unclear, practical approach needed

REWARD TOKEN INCOME:

If Protocol Pays in Governance Tokens:
├── Value of tokens at receipt = Taxable income
├── Even if you don't sell
├── Even if tokens drop in value later
├── Income locked in at receipt
└── Can create "phantom income" problem

Example:
├── Received 100 PROTO tokens worth $500
├── Taxable income: $500
├── Tax owed (32% bracket): $160
├── Later, PROTO drops to $100
├── Still owe $160 but only have $100 value
└── This has caused real problems for people
```

When dispositions occur:

CAPITAL GAINS/LOSSES IN LENDING:

WHEN CAPITAL GAINS APPLY:

Collateral Liquidation:
├── Forced sale of collateral
├── Sale price = Debt covered + penalty
├── Cost basis = Original purchase price
├── Gain/Loss = Sale price - Cost basis
├── Capital gain/loss treatment
└── Timing and holding period matter

Voluntary Position Closure:
├── Swapping collateral to repay debt
├── Treated as selling collateral
├── Same gain/loss calculation
├── Even though purpose was debt repayment
└── Sale is still a sale

Token Swaps:
├── Converting RLUSD interest to XRP
├── Treated as selling RLUSD
├── Buying XRP at market price
├── Gain/loss on RLUSD portion
└── Every swap is potentially taxable

SHORT-TERM VS. LONG-TERM:

Holding Period:
├── < 1 year: Short-term capital gains
├── > 1 year: Long-term capital gains
├── Holding period restarts on new acquisition
└── Long-term rates significantly lower

US Long-Term Capital Gains Rates (2024):
├── 0%: Income up to $47,025
├── 15%: Income $47,026 - $518,900
├── 20%: Income over $518,900
├── Plus 3.8% NIIT for high earners
└── Much better than ordinary income rates

LIQUIDATION TAX EXAMPLE:

Original Position:
├── Bought 10,000 XRP at $0.50 = $5,000 cost basis
├── Deposited as collateral when XRP = $2.50
├── Borrowed $15,000 RLUSD

Liquidation:
├── XRP drops to $1.80
├── Liquidation triggered
├── 8,333 XRP sold at $1.80 = $15,000 (covers debt)
├── Cost basis of liquidated XRP: $4,167 (8,333 × $0.50)
├── Gain: $15,000 - $4,167 = $10,833
└── You owe capital gains tax on $10,833

Adding Insult to Injury:
├── Lost position you wanted to keep
├── Lost remaining collateral to penalty
├── AND owe taxes on the "gain"
├── Liquidation is terrible for taxes
└── Strong motivation to avoid liquidation

LOSS HARVESTING OPPORTUNITY:

If Liquidation Results in Loss:
├── Can potentially offset other gains
├── $3,000/year against ordinary income (US)
├── Carry forward excess losses
├── Silver lining to bad situation
└── Consult tax professional on rules


---

The tax advantage of borrowing:

BORROWING FOR TAX EFFICIENCY:

THE CORE CONCEPT:

Selling Asset:
├── Triggers capital gains tax
├── Immediate tax liability
├── Lose future appreciation potential
├── Lose asset permanently
└── Tax-inefficient liquidity

Borrowing Against Asset:
├── NOT a taxable event
├── No immediate tax
├── Keep appreciation potential
├── Keep asset ownership
├── Interest cost instead of tax cost
└── Tax-efficient liquidity

COMPARISON EXAMPLE:

Scenario: Need $50,000 for a purchase

Option A: Sell XRP
├── Hold 50,000 XRP bought at $0.50 ($25,000 basis)
├── Current value: $2.00 = $100,000
├── Sell 25,000 XRP for $50,000
├── Gain: $50,000 - $12,500 basis = $37,500
├── Tax (20% LTCG): $7,500
├── Net after tax: $42,500
├── Must sell more to get $50,000 net
└── Total tax impact: ~$8,000-9,000

Option B: Borrow RLUSD
├── Deposit 30,000 XRP as collateral ($60,000)
├── Borrow $50,000 RLUSD (83% of collateral but ~50% LTV of total)
├── Tax on borrowing: $0
├── Interest at 8% annually: $4,000/year
├── Get full $50,000
├── Keep XRP exposure
└── No immediate tax

BREAK-EVEN ANALYSIS:

When is borrowing better?

If you hold the loan for:
├── 1 year: $4,000 interest vs. $8,000 tax
│ → Borrowing better
├── 2 years: $8,000 interest vs. $8,000 tax
│ → Break-even
├── 3+ years: Interest exceeds tax
│ → Selling might be better

Variables:
├── Your capital gains rate
├── Interest rate on loan
├── Expected holding period
├── Expected price appreciation
└── Calculate for your situation

IF XRP APPRECIATES:

Sold Scenario:
├── Sold at $2.00, used funds
├── XRP goes to $5.00
├── You missed 150% gain on sold XRP
├── Opportunity cost: $62,500
└── Plus paid taxes

Borrowed Scenario:
├── Still own XRP
├── XRP goes to $5.00
├── Collateral now worth $150,000
├── Position much healthier
├── Can repay loan from gains if desired
└── Captured appreciation
```

Can you deduct interest paid?

INTEREST DEDUCTION POSSIBILITIES:

GENERAL RULE (US):

Personal Interest:
├── Generally NOT deductible
├── Like credit card interest
├── DeFi borrowing for personal use
├── No deduction
└── Just a cost

Investment Interest:
├── May be deductible
├── Against investment income
├── Requires itemizing
├── Complex rules apply
├── Limited to investment income generated
└── Consult tax professional

Business Interest:
├── If borrowing for business purposes
├── May be deductible as business expense
├── Requires legitimate business use
├── Documentation important
└── More favorable treatment

PRACTICAL CONSIDERATIONS:

Tracing Requirement:
├── Must trace borrowed funds to use
├── What did you do with borrowed RLUSD?
├── If bought investments → Investment interest
├── If personal use → Not deductible
├── Documentation critical
└── Can't just claim deduction

Example - Investment Use:
├── Borrow $10,000 RLUSD
├── Buy more XRP with it
├── Interest paid: $800/year
├── May deduct against investment income
├── If you have $800+ investment income: Full deduction
├── Net effect: Interest is pre-tax cost
└── Improves economics

Example - Personal Use:
├── Borrow $10,000 RLUSD
├── Pay for vacation
├── Interest paid: $800/year
├── NOT deductible
├── After-tax cost: $800
└── Full cost to you

DOCUMENTATION FOR DEDUCTIBILITY:

If Claiming Investment Interest:
├── Document the loan
├── Document what you bought
├── Track the funds clearly
├── Don't commingle
├── Keep records 7+ years
└── Be prepared to substantiate
```

Using losses strategically:

TAX-LOSS HARVESTING IN DEFI:

CONCEPT:

├── Sell assets at a loss
├── Realize capital loss
├── Use loss to offset gains
├── Reduce tax liability
├── Can repurchase similar (not identical) assets
└── "Harvesting" the tax benefit of losses

IN DEFI LENDING CONTEXT:

Scenario 1: Voluntary Loss Realization
├── Have XRP with unrealized loss
├── Sell XRP, realize loss
├── Use loss to offset other gains
├── Wait 30+ days (wash sale rule)
├── Repurchase XRP if desired
└── Captured tax benefit

Scenario 2: Liquidation Loss
├── If liquidation results in capital loss
├── Claim the loss on taxes
├── Offset against gains
├── Some silver lining to bad outcome
└── Document carefully

WASH SALE RULES (US):

The Rule:
├── Can't buy "substantially identical" security
├── Within 30 days before or after sale
├── Or loss is disallowed
└── Prevents artificial loss harvesting

For Crypto:
├── IRS hasn't clearly applied to crypto
├── Stocks: Different stocks aren't identical
├── Crypto: Is BTC "substantially identical" to ETH? (No)
├── Is XRP substantially identical to XRP? (Yes, probably)
├── Conservative: Follow wash sale rules
├── Aggressive: Argue they don't apply
└── Evolving area—consult professional

PRACTICAL STRATEGY:

If You Have Losses:
├── Consider realizing before year-end
├── Can offset gains from interest, other trading
├── $3,000/year against ordinary income
├── Carry forward excess losses
└── Tax planning opportunity

If You Have Gains:
├── Consider loss positions to offset
├── Better to realize losses than let them expire
├── Active tax management
└── Part of overall strategy


---

Essential records:

DOCUMENTATION REQUIREMENTS:

TRANSACTION-LEVEL RECORDS:

For Every DeFi Transaction:
├── Date and time
├── Type of transaction
├── Assets involved
├── Amounts
├── Fair market value at time of transaction
├── Fees paid
├── Transaction hash
├── Protocol involved
└── Purpose/note

Specific to Lending:

Deposits:
├── Date deposited
├── Amount deposited
├── Asset deposited
├── Fair market value at deposit
├── Cost basis of deposited asset
├── Protocol and pool
└── Transaction hash

Interest Received:
├── Period covered
├── Amount received
├── Asset received (if different from deposit)
├── Fair market value at receipt
├── Running total for year
└── Source protocol

Borrows:
├── Date borrowed
├── Amount borrowed
├── Collateral provided
├── Interest rate
├── Protocol terms
└── Transaction hash

Repayments:
├── Date repaid
├── Amount repaid (principal vs. interest)
├── Running debt balance
├── Total interest paid
└── Transaction hash

Liquidations:
├── Date of liquidation
├── Amount liquidated
├── Price at liquidation
├── Penalty paid
├── Remaining balance
├── Original cost basis of liquidated collateral
└── All transaction hashes

POSITION-LEVEL SUMMARY:

For Each Position, Track:
├── Opening date
├── Closing date
├── Total deposited
├── Total withdrawn
├── Total interest earned
├── Total interest paid (if borrowing)
├── Net gain/loss
├── Capital gains/losses triggered
└── Supporting transaction records
```

How to maintain records:

DOCUMENTATION TOOLS:

CRYPTO TAX SOFTWARE:

Popular Options:
├── Koinly
├── CoinTracker
├── TokenTax
├── CryptoTrader.Tax (now CoinLedger)
├── Accointing
└── Many others

Features:
├── Import transactions automatically
├── Calculate cost basis
├── Generate tax reports
├── Handle DeFi transactions (varying quality)
├── Export for accountant
└── Simplify reporting

Limitations:
├── DeFi support varies widely
├── XRPL support may be limited
├── May need manual adjustment
├── Not foolproof—verify output
├── Cost money (usually)
└── Quality varies

MANUAL TRACKING:

Spreadsheet Approach:
├── Create comprehensive transaction log
├── Calculate cost basis manually
├── Track interest income separately
├── Summary sheets for tax filing
├── Full control but labor-intensive
└── Good for verification

Minimum Fields:
├── Date
├── Transaction type
├── Asset
├── Amount
├── Fair market value
├── Cost basis (for dispositions)
├── Gain/loss (for dispositions)
├── Notes
└── Link/hash

BEST PRACTICE:

Hybrid Approach:
├── Use tax software for basic tracking
├── Maintain manual spreadsheet as backup
├── Verify software output against manual records
├── Keep raw transaction data
├── Document methodology
└── Be prepared to defend

XRPL-SPECIFIC CONSIDERATIONS:

XRPL Transaction Export:
├── Bithomp, XRPScan for transaction history
├── Export to CSV for processing
├── May need manual classification
├── DeFi protocol specifics may require manual handling
└── Ecosystem tooling developing
```

Getting proper help:

WORKING WITH TAX PROFESSIONALS:

FINDING THE RIGHT PROFESSIONAL:

What to Look For:
├── Crypto/DeFi experience
├── Familiarity with DeFi lending specifically
├── Up-to-date on guidance
├── CPA or EA credentials
├── Good communication
└── Reasonable fees

Questions to Ask:
├── How many crypto clients do you have?
├── Are you familiar with DeFi lending?
├── How do you handle [specific situation]?
├── What documentation do you need?
├── What's your approach to unclear areas?
└── What are your fees?

Red Flags:
├── No crypto experience
├── Overly aggressive positions without disclosure
├── Dismissive of DeFi complexity
├── Can't explain their approach
├── Unwilling to learn
└── No clear engagement terms

WHAT TO PROVIDE:

Comprehensive Package:
├── All transaction records
├── Summary of each position
├── Interest income totals
├── Capital gains/losses summary
├── Your questions/concerns
├── Prior year returns for context
└── Organized by type

Be Prepared For:
├── Questions about methodology
├── Requests for additional documentation
├── Discussion of uncertain areas
├── Choices between approaches
├── Potential amended returns needed
└── Ongoing dialogue

COST-BENEFIT:

When Professional Help Is Worth It:
├── Significant DeFi activity (> $10K)
├── Complex positions (borrowing, liquidations)
├── High income (higher stakes)
├── Audit risk considerations
├── Peace of mind value
└── Usually worth the cost

DIY Might Be OK If:
├── Simple lending only
├── Small amounts
├── Straightforward situations
├── Tax software handles well
├── You understand the basics
└── Low audit risk


---

For US taxpayers:

US TAX FRAMEWORK:

CURRENT GUIDANCE:

IRS Position:
├── Crypto is property (not currency)
├── General tax principles apply
├── Limited DeFi-specific guidance
├── Reporting requirements increasing
├── Enforcement increasing
└── Take seriously

Relevant Forms:
├── Schedule D: Capital gains/losses
├── Form 8949: Sales and dispositions
├── Schedule 1: Other income (interest)
├── FBAR: Foreign accounts (if applicable)
├── Form 8938: Foreign assets (if applicable)
└── Check requirements annually

REPORTING REQUIREMENTS:

Annual Tax Return:
├── Report all crypto income
├── Report all capital gains/losses
├── Interest income on Schedule 1 or B
├── Support with transaction records
└── Due by April 15 (or extension)

New Broker Reporting:
├── 1099 reporting coming for crypto
├── May apply to DeFi in future
├── Increasing visibility to IRS
├── Prepare for more scrutiny
└── Stay compliant ahead of enforcement

PENALTIES:

For Non-Compliance:
├── Accuracy penalties: 20-40% of underpayment
├── Failure to file: 5%/month up to 25%
├── Fraud penalties: Up to 75%
├── Criminal penalties: Possible for egregious cases
├── Interest on underpayment
└── Take seriously
```

Brief overview:

OTHER JURISDICTIONS (General Overview):

UNITED KINGDOM:
├── Capital gains tax on dispositions
├── Income tax on interest/yields
├── £6,000 CGT allowance (reduced recently)
├── Self-assessment required
└── Consult UK tax professional

EUROPEAN UNION:
├── Varies by country
├── Some favorable jurisdictions (Portugal was, changed)
├── Generally income on interest, CGT on dispositions
├── MiCA may affect tax treatment
└── Country-specific guidance needed

CANADA:
├── 50% of capital gains taxable
├── Interest as income
├── CRA increasing crypto focus
├── Adjusted cost basis method
└── Consult Canadian tax professional

AUSTRALIA:
├── Capital gains tax applies
├── Interest as ordinary income
├── ATO active in crypto taxation
├── CGT discount for >12 month holds
└── Consult Australian tax professional

TAX HAVENS:
├── Some jurisdictions have no crypto taxes
├── Portugal (was favorable, changing)
├── UAE, Puerto Rico (complex rules)
├── Tax residency requirements
├── Don't assume simple "move and avoid"
└── Proper planning required, not just relocation

GENERAL PRINCIPLE:

├── Most developed countries tax crypto
├── Interest/yield generally income
├── Dispositions generally capital gains
├── Specifics vary significantly
├── Local professional advice essential
└── Don't assume your jurisdiction is like others


---

DeFi yields are generally taxable as income - This is consistent across most jurisdictions. Ignoring it doesn't make it go away.

Borrowing is more tax-efficient than selling - The math is clear: avoiding capital gains triggers through borrowing preserves more value.

Documentation is essential - Tax authorities expect records. Having them protects you in audits.

⚠️ Treatment of specific DeFi mechanics - aTokens, rebasing, token swaps within protocols—guidance is limited and evolving.

⚠️ Future regulatory changes - Reporting requirements are increasing. Rules may change unfavorably.

⚠️ Cross-border implications - Multi-jurisdictional situations are complex and uncertain.

🔴 Ignoring tax obligations - "It's DeFi so they can't track it" is false and risky. Enforcement is increasing.

🔴 Relying on tax software alone - Tools help but aren't perfect, especially for complex DeFi. Verify outputs.

🔴 Taking aggressive positions without professional guidance - Uncertain doesn't mean "do whatever." Get proper advice.

Taxes are a significant cost that affects real returns from DeFi lending. Most participants underestimate this impact. While borrowing can provide tax efficiency, interest income is generally taxable, and liquidations can trigger capital gains. Proper documentation isn't optional—it's essential for compliance. The complexity of DeFi taxation makes professional guidance valuable for anyone with significant activity. Don't let tax considerations stop you from participating, but don't ignore them either.


Assignment: Create a tax documentation system for your DeFi lending activities.

Requirements:

Part 1: Transaction Log Template (25%)

  • All required fields for each transaction type (deposits, withdrawals, interest, borrows, repayments, liquidations)
  • Automatic calculations where applicable
  • Example entries showing correct usage

Part 2: Position Summary Template (20%)

  • Total interest earned by asset
  • Total interest paid by loan
  • Capital gains/losses by position
  • Annual summary totals

Part 3: Tax Calendar (15%)

  • Quarterly estimate due dates (if applicable)
  • Annual filing deadline
  • Extension deadlines
  • Review and preparation timeline

Part 4: Documentation Checklist (25%)

  • All documents to save (transaction hashes, protocol records, etc.)
  • How long to keep each
  • Where to store them
  • Backup procedures

Part 5: Professional Engagement Plan (15%)

  • Criteria for seeking professional help

  • Questions to ask potential tax professionals

  • Information to prepare for engagement

  • Budget considerations

  • Completeness (30%)

  • Practical usability (30%)

  • Organization (20%)

  • Accuracy of concepts (20%)

Time investment: 2-3 hours
Value: This system becomes your ongoing tax compliance infrastructure.


Knowledge Check

Question 1 of 3

(Tests Basic Understanding):

  • IRS Notice 2014-21 (US crypto guidance)
  • IRS FAQ on Virtual Currency Transactions
  • Local tax authority guidance for your jurisdiction
  • Koinly, CoinTracker, TokenTax documentation
  • Comparison reviews for DeFi support
  • Integration guides for your platforms
  • CPA/EA finder with crypto expertise
  • Tax attorney for complex situations
  • Annual tax planning checklists

For Next Lesson:
Lesson 20 synthesizes everything into Your XRPL Lending Thesis—building your personal framework for participating in XRPL lending as the ecosystem develops.


End of Lesson 19

Total words: ~5,800
Estimated completion time: 50 minutes reading + 2-3 hours for deliverable exercise

Key Takeaways

1

Interest earned from lending is typically ordinary income

: Taxed at your marginal rate, which may be 30%+. Factor this into your yield calculations.

2

Borrowing doesn't trigger taxes; selling does

: This is the core tax efficiency argument for borrowing against crypto rather than selling it.

3

Liquidation triggers capital gains

: You owe taxes on the gain from liquidated collateral, adding insult to injury. Strong motivation to avoid liquidation.

4

Documentation is not optional

: Track every transaction, keep records for 7+ years, and be able to substantiate your positions.

5

Get professional help for significant activity

: DeFi taxation is complex and evolving. The cost of professional guidance is usually worth it. ---