Ga naar hoofdinhoud

Eén bericht getagd met "automated market makers"

Bekijk alle tags

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

· 7 minuten leestijd
Mike Thrift
Mike Thrift
Marketing Manager

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.

DeFi Boekhouding Eenvoudig Gemaakt

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}

Flitsleningen en Arbitrage

2024-02-10 * "Arbitragemogelijkheid met flitslening"
; Flitslening
Assets:Crypto:Temp:FlashLoan 100000 USDC
Liabilities:DeFi:Aave:FlashLoan -100000 USDC

; Arbitragehandel
Assets:Crypto:Temp:FlashLoan -100000 USDC
Assets:Crypto:Temp:Arbitrage 101500 USDC

; Terugbetaling flitslening
Liabilities:DeFi:Aave:FlashLoan 100000 USDC
Assets:Crypto:Temp:Arbitrage -100090 USDC ; Inclusief kosten

; Winst
Assets:Crypto:Wallet:MetaMask:USDC 1410 USDC
Income:DeFi:Arbitrage:Profit 1410.00 USD

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.