DeFi Boekhouding Eenvoudig Gemaakt: Het bijhouden van Yield Farming, Liquiditeitspools en Staking Beloningen met Plain-Text Boekhouding
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:
; Portefeuille Rekeningen
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 Liquiditeitspools
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 Protocollen
1970-01-01 open Assets:Staking:Ethereum:ETH
1970-01-01 open Assets:Staking:Lido:stETH
1970-01-01 open Assets:Staking:RocketPool:rETH
; Inkomstenrekeningen
1970-01-01 open Income:DeFi:Rendement:Uniswap
1970-01-01 open Income:DeFi:Rendement:Compound
1970-01-01 open Income:DeFi:Rendement:Aave
1970-01-01 open Income:DeFi:Staking:Ethereum
1970-01-01 open Income:DeFi:Governance:Tokens
1970-01-01 open Income:DeFi:Airdrops
; Kostenrekeningen
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:ImpermanentVerlies
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 * "Liquiditeit toevoegen aan ETH-USDC Uniswap V3 pool"
Assets:Crypto:Wallet:MetaMask:ETH -5.0 ETH {2500.00 USD}
Assets:Crypto:Wallet:MetaMask:USDC -12500 USDC
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 * "Uniswap LP-vergoedingen claimen"
Assets:Crypto:Wallet:MetaMask:ETH 0.2 ETH {2600.00 USD}
Assets:Crypto:Wallet:MetaMask:USDC 300 USDC
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
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 * "Opbouw van samengestelde rente"
Assets:DeFi:Compound:cUSDC 5.2 cUSDC {20.50 USD}
Income:DeFi:Yield:Compound 106.60 USD
COMP-beloningen claimen
2024-02-20 * "COMP governance-tokens claimen"
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
; ETH storten als onderpand
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}
; USDC lenen met ETH als onderpand
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 beloningen"
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
; Stap 1: Stort USDC op Compound
2024-01-30 * "Stort USDC op Compound voor yield farming"
Activa:Crypto:Portemonnee:MetaMask:USDC -20000 USDC
Activa:DeFi:Compound:cUSDC 1000 cUSDC {20.00 USD}
; Stap 2: Leen DAI met cUSDC als onderpand
2024-01-30 * "Leen DAI van Compound"
Activa:Crypto:Portemonnee:MetaMask:DAI 15000 DAI
Passiva:DeFi:Compound:SchuldDAI -15000 DAI
; Stap 3: Voorzie DAI-USDC liquiditeit aan Uniswap
2024-01-30 * "Voeg DAI-USDC liquiditeit toe voor farming"
Activa:Crypto:Portemonnee:MetaMask:DAI -15000 DAI
Activa:Crypto:Portemonnee:MetaMask:USDC -5000 USDC ; Extra USDC
Activa: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}