"DeFi Deep Dive: Pipeline, Positions & Derivatives"
Last updated March 28, 2026 · Super Admin
DeFi Deep Dive: Pipeline, Positions & Derivatives
This page covers the full DeFi and derivatives suite in detail — from the accounting pipeline that classifies on-chain events, through position tracking and bridge resolution, to advanced instruments like margin trading, futures, options, restaking, and MEV analysis.
Availability
DeFi features are available on qualifying plans. Additional advanced features (restaking, governance, insurance, MEV) may require higher-tier plans.
Accounting Pipeline
The DeFi accounting pipeline under DeFi → Pipeline processes raw blockchain events into classified, posted journal entries.

Event Lifecycle
``
PENDING → CLASSIFIED → POSTED
→ FAILED
→ MANUAL_REVIEW
→ SKIPPED
``
- PENDING — Raw event ingested from chain, awaiting classification
- CLASSIFIED — Engine has determined the transaction type and accounting treatment
- POSTED — Journal entries created and posted to the ledger
- FAILED — Classification or posting failed (check error details)
- MANUAL_REVIEW — Engine flagged the event for human review (ambiguous classification)
- SKIPPED — Explicitly skipped (e.g., spam, dust, or irrelevant contract interactions)
Pipeline Dashboard
The pipeline view shows:
- Status counts — Number of events in each stage
- Pending queue — Events awaiting classification with protocol and type details
- Review queue — Events requiring manual classification
- Multi-leg groups — Complex transactions spanning multiple accounting legs
- Hash chain status — Integrity of the journal hash chain
Processing Events
Events can be processed individually or in batch:
1. Auto-classification — The engine applies accounting rules and transaction analysis 2. Manual classification — For events in MANUAL_REVIEW, select the correct transaction type and GL accounts 3. Batch processing — Select multiple pending events and process them together 4. Expression validation — Test accounting expressions before posting
Accounting Rules
Rules under Settings → Rules automate classification:
- Define conditions based on protocol, function signature, asset, or amount thresholds
- Set the resulting transaction type, GL accounts, and economic intent
- Test rules against sample events before activating
- Rules are versioned — changes create new versions for audit trail
DeFi Position Tracking
Track all open DeFi positions under DeFi → Positions.

Position Types
| Type | Description | Key Metrics | |---|---|---| | LP Positions | Liquidity pool stakes (Uniswap, Curve, Balancer) | Deposited value, current value, impermanent loss, fees earned | | Lending Deposits | Assets deposited in lending protocols (Aave, Compound) | Principal, accrued interest, health factor | | Lending Borrows | Outstanding borrows | Principal, accrued interest, liquidation threshold | | Staking | Staked assets in validators or protocols | Staked amount, rewards earned, unbonding status |
Position Details
Each position displays:
- Protocol — The DeFi protocol (e.g., Aave v3, Uniswap v3, Lido)
- Pool/Vault — Specific pool or vault identifier
- Deposited assets — What was deposited and quantities
- Current value — Mark-to-market value
- P&L — Unrealized gain/loss vs. deposited value
- Rewards — Accumulated but unclaimed rewards
- Status — Active, pending withdrawal, or closed
Rebase Token Tracking
For rebasing assets (stETH, aTokens), CryptaCount tracks:
- The underlying balance changes due to rebasing
- Rebasing income recognized at each rebase event
- Accurate cost basis maintained through balance changes
Bridge Resolution
Cross-chain bridges under DeFi → Bridges manage asset movements between chains.

How Bridge Tracking Works
When assets are bridged:
1. A BRIDGE_OUT transaction is recorded on the source chain 2. A BRIDGE_IN transaction is recorded on the destination chain 3. CryptaCount attempts to auto-match the pair based on amount, asset, and timing
Stale Bridge Detection
The bridge view highlights stale bridges — BRIDGE_OUT transactions without a matching BRIDGE_IN within the expected timeframe. Common causes:
- Destination chain wallet not connected to CryptaCount
- Bridge transaction still pending (slow finality)
- Failed bridge that needs manual resolution
Manual Resolution
For unmatched bridges:
1. Navigate to the stale bridge entry 2. Click Resolve 3. Select the matching BRIDGE_IN transaction from the destination chain 4. CryptaCount links the pair and carries the cost basis across
:::caution Ensure both the source and destination chain wallets are connected to your workspace. Without the destination wallet, CryptaCount cannot detect the BRIDGE_IN transaction. :::
Gas Fee Analysis
Gas fee reporting under DeFi → Gas Fees provides detailed breakdown of transaction costs.

Report Contents
| Metric | Description | |---|---| | Total gas spent | Aggregate gas fees across all wallets and chains | | By chain | Gas fees broken down per blockchain | | By wallet | Gas fees per wallet address | | By transaction type | Gas fees by classification (swaps, transfers, staking, etc.) | | Trends | Gas fee spending over time (daily/weekly/monthly) | | As % of transaction value | Gas efficiency metric |
Accounting Treatment
Gas fees are recorded as expenses in the general ledger. The gas fee report feeds into:
- Income statement under operating expenses
- Transaction-level cost tracking (gas is added to the transaction cost where applicable)
- Tax calculations where gas fees are deductible
Derivatives Dashboard
The derivatives overview under Derivatives in the sidebar shows a summary of all derivative positions.

Summary View
- Total open positions — Count and notional value
- P&L summary — Realized and unrealized P&L across all derivatives
- Funding rate exposure — Net funding payments/receipts
- Margin utilization — Collateral deployed vs. available
Margin Trading
Manage margin positions under Derivatives → Margin.

Position Lifecycle
| Event | Accounting Treatment | |---|---| | Open position | Record position at notional value, lock collateral | | Add collateral | Transfer from available to margin account | | Remove collateral | Transfer from margin to available | | Interest accrual | Recognize as finance cost | | Close position | Realize P&L, release collateral | | Liquidation | Force-close, realize loss, forfeit collateral |
Margin Tracking
For each open position, CryptaCount tracks:
- Entry price and current mark-to-market price
- Collateral amount and margin ratio
- Accrued interest (funding costs)
- Unrealized P&L
- Liquidation price threshold
Futures & Options
Track futures and options positions under Derivatives → Futures & Options.

Futures
| Event | Accounting Treatment | |---|---| | Open futures | Record at contract price | | Funding payment | Recognize as income or expense | | Close futures | Realize P&L | | Settlement | Final settlement of expired contracts |
CryptaCount marks futures positions to market each period, recognizing unrealized gains and losses. Funding rate payments are tracked separately.
Options
| Event | Accounting Treatment | |---|---| | Buy option | Record premium paid as asset | | Sell (write) option | Record premium received as liability | | Exercise | Settle at strike price, realize P&L | | Expire | Write off premium (buyer) or recognize income (writer) | | Assignment | Obligation fulfilled, settle at strike |
Derivatives Reports
Three dedicated reports available from the derivatives dashboard:
| Report | Description | |---|---| | P&L Report | Realized and unrealized P&L by instrument and period | | Funding Report | Futures funding rate payments and receipts over time | | Open Positions | Current derivative exposure with mark-to-market values |
Restaking
Track restaking positions under Restaking in the sidebar.

What Restaking Covers
| Feature | Description | |---|---| | Positions | Track restaked ETH across operators and services | | Rewards | Rewards earned from securing additional services | | Withdrawal queue | Monitor pending unstaking and withdrawal requests | | Slashing | Record slashing events if an operator is penalized |
Governance
Track governance locks and voting under Governance in the sidebar.

Governance Tracking
| Feature | Description | |---|---| | Lock positions | Tokens locked for voting power (veCRV, veBAL, etc.) | | Lock duration | Time-weighted voting power based on lock period | | Rewards | Governance rewards and bribes received | | Delegation | Voting power delegated to other addresses |
Insurance Policies
Track DeFi insurance under Insurance in the sidebar.

Insurance Tracking
| Feature | Description | |---|---| | Active policies | Current coverage with protocols, amounts, and expiry | | Premiums | Premium payments and accrual schedule | | Claims | Filed claims and their resolution status | | Coverage tokens | Tokens received representing coverage |
MEV Analysis
Analyze MEV events under MEV in the sidebar.

What MEV Analysis Covers
Maximal Extractable Value (MEV) affects transaction outcomes. CryptaCount identifies and classifies MEV events:
| Event | Description | |---|---| | Flash loans | Atomic borrow-and-repay within a single block | | Arbitrage | Profit from price discrepancies across venues | | Sandwich attacks | Front-running and back-running transactions | | Victim losses | Loss incurred from being sandwiched |
MEV Summary
The MEV dashboard shows:
- Total MEV profit/loss for the workspace
- Events by category (flash loan, arbitrage, sandwich)
- Transactions affected by MEV attacks
- MEV as a percentage of total transaction value
Accounting Treatment
- Flash loan borrow/repay — No net balance change (atomic). Fee recorded as expense.
- Arbitrage profit — Recognized as trading income
- Sandwich front/back — Profit recognized as trading income for the MEV actor
- Victim loss — Recorded as additional cost (slippage) on the affected transaction
Was this article helpful?
Let us know if this answered your question
