Naar hoofdinhoud springen

DeFi Boekhouding Eenvoudig Gemaakt: Het bijhouden van Yield Farming, Liquiditeitspools en Staking Beloningen met Plain-Text Boekhouding

Gepubliceerd Laatst bijgewerkt 8 min leestijdMike ThriftMike Thrift
DeFi Boekhouding Eenvoudig Gemaakt: Het bijhouden van Yield Farming, Liquiditeitspools en Staking Beloningen met Plain-Text Boekhouding
Op deze pagina

Gedecentraliseerde Financiën (DeFi) heeft een revolutie teweeggebracht in de manier waarop we omgaan met financiële diensten, en biedt ongekende mogelijkheden voor het genereren van rendement, het verschaffen van liquiditeit en gedecentraliseerde handel. Echter, met deze mogelijkheden komt de uitdaging om complexe transacties nauwkeurig bij te houden voor belastingnaleving en portfoliomanagement.

Traditionele boekhoudmethoden worstelen met de unieke kenmerken van DeFi: geautomatiseerde market makers, liquiditeitsmining, impermanent verlies en multi-token beloningen. Deze uitgebreide gids laat zien hoe u DeFi-boekhouding onder de knie krijgt met behulp van Beancount.io's krachtige plain-text boekhoudsysteem.

Inzicht in DeFi Boekhoudkundige Uitdagingen

De Complexiteit van DeFi-Transacties

DeFi-protocollen creëren boekhoudkundige uitdagingen die niet bestaan in traditionele financiën:

  • Multi-token transacties: Enkele operaties waarbij meerdere cryptocurrencies betrokken zijn
  • Geautomatiseerde compounding: Beloningen die automatisch worden herbelegd
  • Impermanente verlies: Waardeveranderingen als gevolg van prijsverschillen in liquiditeitspools
  • Optimalisatie van gasvergoedingen: Complexe kostenstructuren over verschillende netwerken
  • Protocolbestuur: Stemrechten en distributies van governance-tokens
  • Cross-protocol interacties: Transacties die meerdere DeFi-platforms omvatten

Fiscale Gevolgen van DeFi-activiteiten

De IRS behandelt DeFi-activiteiten als belastbare gebeurtenissen:

  • Liquiditeitsverschaffing: Kan belastbare gebeurtenissen teweegbrengen bij het storten van activa
  • Yield farming beloningen: Belastbaar als gewoon inkomen tegen reële marktwaarde
  • Impermanent verlies: Potentiële fiscale gevolgen bij het opnemen uit pools
  • Governance-tokens: Airdrops en beloningen belastbaar als inkomen
  • Staking beloningen: Belastbaar als inkomen bij ontvangst

Instellen van DeFi-rekeningen in Beancount.io

Uitgebreide Rekeningstructuur

Creëer een gedetailleerde rekeninghiërarchie die alle DeFi-activiteiten vastlegt:

; Wallet Accounts
1970-01-01 open Assets:Crypto:Wallet:MetaMask:ETH
1970-01-01 open Assets:Crypto:Wallet:MetaMask:USDC
1970-01-01 open Assets:Crypto:Wallet:MetaMask:DAI
1970-01-01 open Assets:Crypto:Wallet:MetaMask:WBTC
 
; Uniswap V3 Liquidity Pools
1970-01-01 open Assets:DeFi:Uniswap:ETH-USDC-LP
1970-01-01 open Assets:DeFi:Uniswap:DAI-USDC-LP
1970-01-01 open Assets:DeFi:Uniswap:WBTC-ETH-LP
 
; Compound Protocol
1970-01-01 open Assets:DeFi:Compound:CUSDC
1970-01-01 open Assets:DeFi:Compound:CETH
1970-01-01 open Assets:DeFi:Compound:CDAI
 
; Aave Protocol
1970-01-01 open Assets:DeFi:Aave:AUSDC
1970-01-01 open Assets:DeFi:Aave:AETH
1970-01-01 open Assets:DeFi:Aave:DebtETH
 
; Staking Protocols
1970-01-01 open Assets:Staking:Ethereum:ETH
1970-01-01 open Assets:Staking:Lido:STETH
1970-01-01 open Assets:Staking:RocketPool:RETH
 
; Income Accounts
1970-01-01 open Income:DeFi:Yield:Uniswap
1970-01-01 open Income:DeFi:Yield:Compound
1970-01-01 open Income:DeFi:Yield:Aave
1970-01-01 open Income:DeFi:Staking:Ethereum
1970-01-01 open Income:DeFi:Governance:Tokens
1970-01-01 open Income:DeFi:Airdrops
 
; Expense Accounts
1970-01-01 open Expenses:DeFi:Gas:Ethereum
1970-01-01 open Expenses:DeFi:Gas:Polygon
1970-01-01 open Expenses:DeFi:Gas:Arbitrum
1970-01-01 open Expenses:DeFi:ImpermanentLoss

DeFi-specifieke Activa

Definieer tokens en LP-tokens met de juiste metadata:

1970-01-01 commodity UNI-V3-ETH-USDC
  name: "Uniswap V3 ETH-USDC LP Token"
  asset-class: "liquidity-pool"
  protocol: "uniswap-v3"
 
1970-01-01 commodity cUSDC
  name: "Compound USDC"
  asset-class: "lending-token"
  protocol: "compound"
 
1970-01-01 commodity stETH
  name: "Lido Staked Ethereum"
  asset-class: "staking-derivative"
  protocol: "lido"

Gangbare DeFi-activiteiten Bijhouden

1. Uniswap Liquiditeitsverschaffing

Liquiditeit Toevoegen aan een Pool

2024-01-15 * "Add liquidity to ETH-USDC Uniswap V3 pool"
  Assets:Crypto:Wallet:MetaMask:ETH     -5.0 ETH {2500.00 USD}
  Assets:Crypto:Wallet:MetaMask:USDC  -12500 USDC {1.00 USD}
  Assets:DeFi:Uniswap:ETH-USDC-LP        100 UNI-V3-ETH-USDC {250.00 USD}
  Expenses:DeFi:Gas:Ethereum            0.01 ETH {2500.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH    -0.01 ETH {2500.00 USD}

Claimen van LP-vergoedingen

2024-02-15 * "Claim Uniswap LP fees"
  Assets:Crypto:Wallet:MetaMask:ETH     0.2 ETH {2600.00 USD}
  Assets:Crypto:Wallet:MetaMask:USDC    300 USDC {1.00 USD}
  Income:DeFi:Yield:Uniswap           -820.00 USD
  Expenses:DeFi:Gas:Ethereum           0.005 ETH {2600.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH   -0.005 ETH {2600.00 USD}

Liquiditeit verwijderen met Impermanent Verlies

2024-03-15 * "Remove liquidity from ETH-USDC pool"
  Assets:DeFi:Uniswap:ETH-USDC-LP       -100 UNI-V3-ETH-USDC {250.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH      4.8 ETH {2800.00 USD}
  Assets:Crypto:Wallet:MetaMask:USDC   12800 USDC
  Expenses:DeFi:ImpermanentLoss         240.00 USD  ; IL berekening
  Expenses:DeFi:Gas:Ethereum           0.008 ETH {2800.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH   -0.008 ETH {2800.00 USD}

2. Compound Protocol Uitleen

Activa Leveren aan Compound

2024-01-20 * "Supply USDC to Compound"
  Assets:Crypto:Wallet:MetaMask:USDC  -10000 USDC {1.00 USD}
  Assets:DeFi:Compound:CUSDC            500 CUSDC {20.00 USD}
  Expenses:DeFi:Gas:Ethereum           0.008 ETH {2500.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH   -0.008 ETH {2500.00 USD}

Samengestelde rente verdienen

2024-02-20 * "Compound interest accrual"
  Assets:DeFi:Compound:CUSDC             5.2 CUSDC {20.50 USD}
  Income:DeFi:Yield:Compound          -106.60 USD

COMP-beloningen claimen

2024-02-20 * "Claim COMP governance tokens"
  Assets:Crypto:Wallet:MetaMask:COMP     12 COMP {85.00 USD}
  Income:DeFi:Governance:Tokens       -1020.00 USD
  Expenses:DeFi:Gas:Ethereum           0.006 ETH {2600.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH   -0.006 ETH {2600.00 USD}

3. Aave Protocol Operaties

Storten en Lenen

; Deposit ETH as collateral
2024-01-25 * "Deposit ETH to Aave"
  Assets:Crypto:Wallet:MetaMask:ETH    -10 ETH {2500.00 USD}
  Assets:DeFi:Aave:AETH                 10 AETH {2500.00 USD}
  Expenses:DeFi:Gas:Ethereum          0.01 ETH {2500.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH  -0.01 ETH {2500.00 USD}
 
; Borrow USDC against ETH collateral
2024-01-25 * "Borrow USDC from Aave"
  Assets:Crypto:Wallet:MetaMask:USDC  15000 USDC
  Liabilities:DeFi:Aave:DebtUSDC     -15000 USDC
  Expenses:DeFi:Gas:Ethereum          0.008 ETH {2500.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH  -0.008 ETH {2500.00 USD}

Leningen terugbetalen met rente

2024-03-25 * "USDC-lening terugbetalen aan Aave"
  Liabilities:DeFi:Aave:DebtUSDC      15000 USDC
  Expenses:DeFi:Interest:Aave           450 USDC  ; Opgebouwde rente
  Assets:Crypto:Wallet:MetaMask:USDC -15450 USDC
  Expenses:DeFi:Gas:Ethereum          0.008 ETH {2700.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH  -0.008 ETH {2700.00 USD}

4. Ethereum Staking

Directe Ethereum Staking

2024-01-10 * "ETH staken op Ethereum 2.0"
  Assets:Crypto:Wallet:MetaMask:ETH    -32 ETH {2500.00 USD}
  Assets:Staking:Ethereum:ETH           32 ETH {2500.00 USD}
  Expenses:DeFi:Gas:Ethereum          0.01 ETH {2500.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH  -0.01 ETH {2500.00 USD}

Staking Beloningen

2024-02-10 * "ETH staking rewards"
  Assets:Staking:Ethereum:ETH          0.15 ETH {2600.00 USD}
  Income:DeFi:Staking:Ethereum       -390.00 USD

Liquid Staking met Lido

2024-01-12 * "Stake ETH with Lido"
  Assets:Crypto:Wallet:MetaMask:ETH    -10 ETH {2500.00 USD}
  Assets:Staking:Lido:STETH             10 STETH {2500.00 USD}
  Expenses:DeFi:Gas:Ethereum          0.008 ETH {2500.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH  -0.008 ETH {2500.00 USD}

Geavanceerde DeFi Scenario's

Yield Farming Strategieën

Multi-protocol Yield Farming

; Step 1: Deposit USDC to Compound
2024-01-30 * "Deposit USDC to Compound for yield farming"
  Assets:Crypto:Wallet:MetaMask:USDC  -20000 USDC {1.00 USD}
  Assets:DeFi:Compound:CUSDC            1000 CUSDC {20.00 USD}
 
; Step 2: Borrow DAI against cUSDC
2024-01-30 * "Borrow DAI from Compound"
  Assets:Crypto:Wallet:MetaMask:DAI    15000 DAI {1.00 USD}
  Liabilities:DeFi:Compound:DebtDAI   -15000 DAI {1.00 USD}
 
; Step 3: Provide DAI-USDC liquidity to Uniswap
2024-01-30 * "Add DAI-USDC liquidity for farming"
  Assets:Crypto:Wallet:MetaMask:DAI   -15000 DAI {1.00 USD}
  Assets:Crypto:Wallet:MetaMask:USDC   -5000 USDC {1.00 USD}  ; Additional USDC
  Assets:DeFi:Uniswap:DAI-USDC-LP        200 UNI-V3-DAI-USDC {100.00 USD}

Cross-chain DeFi Operaties

Activa Overbruggen

2024-02-05 * "ETH overbruggen naar Polygon"
  Assets:Crypto:Wallet:MetaMask:ETH    -5 ETH {2600.00 USD}
  Assets:Crypto:Wallet:Polygon:ETH      5 ETH {2600.00 USD}
  Expenses:DeFi:Bridge:Fees           0.01 ETH {2600.00 USD}
  Assets:Crypto:Wallet:MetaMask:ETH  -0.01 ETH {2600.00 USD}

Flitsleningen en Arbitrage

2024-02-10 * "Flash loan arbitrage opportunity"
  ; Flash loan
  Assets:Crypto:Temp:FlashLoan       100000 USDC
  Liabilities:DeFi:Aave:FlashLoan   -100000 USDC
  ; Arbitrage trade
  Assets:Crypto:Temp:FlashLoan      -100000 USDC
  Assets:Crypto:Temp:Arbitrage       101500 USDC
  ; Repay flash loan
  Liabilities:DeFi:Aave:FlashLoan    100000 USDC
  Assets:Crypto:Temp:Arbitrage      -100090 USDC  ; Including fees
  ; Profit
  Assets:Crypto:Temp:Arbitrage       -1410 USDC  ; Move profit to wallet
  Assets:Crypto:Wallet:MetaMask:USDC   1410 USDC
  Income:DeFi:Arbitrage:Profit        -1410 USDC

DeFi Belastingrapportage Overwegingen

Inkomstenherkenning

Alle DeFi beloningen zijn belastbaar als gewoon inkomen:

; Houd alle inkomstenbronnen afzonderlijk bij
Income:DeFi:Yield:Uniswap           ; LP-kosten
Income:DeFi:Yield:Compound          ; Verdiende rente
Income:DeFi:Staking:Ethereum        ; Staking beloningen
Income:DeFi:Governance:Tokens       ; Airdrops van governance-tokens
Income:DeFi:Airdrops               ; Airdrops van protocollen

Aftrekbare Uitgaven

Volg aftrekbare uitgaven:

Expenses:DeFi:Gas:Ethereum          ; Gaskosten
Expenses:DeFi:Gas:Polygon           ; Layer 2 kosten
Expenses:DeFi:Interest:Aave         ; Leenkosten
Expenses:DeFi:ImpermanentLoss       ; IL van LP-posities

Bijhouden van Vermogenswinsten

Gebruik lot-gebaseerde boekhouding voor nauwkeurige vermogenswinsten:

; Verschillende kostprijs voor hetzelfde token
Assets:DeFi:Compound:cUSDC   100 cUSDC {20.00 USD}  ; Partij 1
Assets:DeFi:Compound:cUSDC   100 cUSDC {21.00 USD}  ; Partij 2

Beste Praktijken voor DeFi Boekhouding

1. Realtime Transactieregistratie

  • Registreer transacties onmiddellijk na uitvoering
  • Gebruik transactiehashes voor verificatie
  • Monitor mempool voor lopende transacties

2. Gaskostenoptimalisatie Bijhouden

; Strategieën voor gaskostenoptimalisatie bijhouden
Expenses:DeFi:Gas:Ethereum:Standard    ; Standaard gasprijs
Expenses:DeFi:Gas:Ethereum:Fast        ; Snelle gasprijs
Expenses:DeFi:Gas:Ethereum:Instant     ; Directe gasprijs

3. Protocol Risicobeheer

; Volg protocol-specifieke risico's
Expenses:DeFi:Risk:SmartContract      ; Smart contract storingen
Expenses:DeFi:Risk:Liquidation        ; Liquidatiegebeurtenissen
Expenses:DeFi:Risk:Slippage          ; Slippage kosten

4. Geautomatiseerde Afstemming

  • Stel geautomatiseerde prijzenfeeds in
  • Gebruik protocol-API's voor saldoverificatie
  • Implementeer geautomatiseerde transactie-imports

5. Documentatienormen

  • Gedetailleerde transactienotities bijhouden
  • De rationale achter de strategie documenteren
  • Vastleggingen van protocolinteracties bijhouden

Integratie met DeFi Tools

Portfoliotracking

  • DeBank: DeFi-portfolio overzicht
  • Zapper: Multi-protocol dashboard
  • Zerion: DeFi-wallet en -tracker

Belastingrapportage

  • Koinly: DeFi belastingberekeningen
  • CoinTracker: Ondersteuning voor meerdere protocollen
  • TokenTax: Gespecialiseerde DeFi rapportage

Analyseplatformen

  • DeFi Pulse: Protocolanalyse
  • DeFiLlama: TVL en rendementsregistratie
  • APY.vision: Registratie van impermanent verlies

Conclusie

De complexiteit van DeFi-boekhouding mag u er niet van weerhouden deel te nemen aan de gedecentraliseerde financiële revolutie. Met het krachtige plain-text boekhoudsysteem van Beancount.io kunt u:

  • Complexe Transacties Volgen: Naadloos omgaan met interacties tussen meerdere protocollen
  • Fiscale Naleving Garanderen: Correcte inkomstenherkenning en uitgavenregistratie
  • Portefeuilleprestaties Monitoren: Realtime inzichten in DeFi-posities
  • Risico Beheren: Impermanent verlies en protocolrisico's volgen
  • Activiteiten Schalen: Van eenvoudig staken tot complexe yield farming-strategieën

De sleutel tot succesvolle DeFi-boekhouding is consistentie, nauwkeurigheid en correcte categorisatie. Begin met basisprotocollen en breid geleidelijk uit naar complexere strategieën naarmate u vertrouwd raakt met de boekhoudpatronen.

Klaar om de DeFi-boekhouding te beheersen? Begin uw Beancount.io-reis en neem vandaag nog de controle over uw gedecentraliseerde financiële portefeuille.

Verken een live voorbeeld van een cryptocurrency-grootboek:

Cryptocurrency Example Ledger in een nieuw tabblad openen

Dit artikel delen

Volg dit onderwerp

Bron: https://beancount.io/nl/blog/2025/06/18/defi-accounting-made-simple-beancount

Gepubliceerd: 18 juni 2025

Laatst bijgewerkt: 15 september 2026