Trader P&L FAQ
Additional documentation on the Dex Trader P&L Table
- All profit fields are based on realized P&L. For example, fields such as:
- Only tokens bought and sold on dexes count toward the P&L
- The profit for each trade is based on the counterpart token value and price
- E.g., swapping token A for token B, the value of this trade is based on Token B
- For now, we only consider the major DEX to avoid data quality issues
- Multi-path trades are consolidated whenever possible
- USDC -> ETH, ETH -> UNI is converted into USDC -> UNI
- Trades for tokens that that have a mint or burn function, combined add/remove LP + swap calls, extra fee logic, or have different or multiple sender / receiver (MEV bots bribing validators) are excluded from the analysis
For each valid buy, we create an open balance for that token.
For each valid sale, we deduct from the open balance and calculate the profit and loss for that transaction.
Examples of open balances for some transactions
For each token balance change, we multiply -DELTA by the USD$ price.
Partial P&L for each transaction
The P&L at any given time is the total value of the book, minus the initial value of the unsold inventory. Mechanically, we issue a "refund" to deduct from the P&L amount. This results in a $1k profit for ETH and no profit for USDC.
Profit and Loss Example
We also deduct transactions fees incurred during these transactions from the final profit and loss amount.