Tax and accounting

In the rapidly-evolving world of Web3, it's crucial to accurately track and categorize financial transactions for proper profit and tax liability calculations.

Our APIs are designed to serve an extensive range of historical user financial data, enabling tax tools to identify and categorize web3 transactions more accurately. This, in turn, allows for the proper historical valuation of underlying assets and tokens received as income in any given position.

This page highlights some of the APIs' capabilities and use cases that can potentially help tax companies.

Detailed historical user position data

Providing financial metrics for each position of a specific wallet in a given protocol.

Available historical data:

  • Position income (farming rewards, claimed fees)
  • Capital performance (market gains and losses)
  • Cost basis calculation (currently average cost)
  • Unrealized gains and losses on open positions
  • Realized gains and losses on closed positions
  • Holdings, balances (underlying token data balances stored daily)
  • Position ROI
  • Position APY (income APY, based on average open interest
  • Impermanent loss
  • User transactions

Token pricing and valuation data

Making the user transactions more accurate by providing current and historical pricing information for DeFi assets, including but not limited to receipt token prices such as LP (liquidity pool) tokens.

We capture user positions' daily holdings and valuations and make them available through our APIs.

Profit and loss calculation

Cost-basis: we calculate the cost-basis of each pool position, taking additional deposits, withdrawals, and transfers into account. We use the average cost method for the cost basis.

  • Each addition to the position is added to the cost basis using the addition’s USD value at the time of deposit
  • Any partial withdraws reduce the cost basis proportionally by how much of the asset was withdrawn

Current asset value: the current value of the position or, for an exited position, the value at the time of exit

Asset gains and losses:

  • For an active position: The asset gains or losses are the difference between the current asset value and the cost basis.
  • For exited positions, we take the USD value at the time of exit and subtract the cost basis

Income: we track each position's collected and pending earned fees. Collected fees are available with the date of claim, token amount, USD value at the time of collection, transaction hash, and more.

Handling complex web3 transactions

It requires a lot of manual work from users to properly label and edit web3 transactions for tax purposes.

Our integrations can capture a wide range of on-chain financial transactions, identify protocol(s) involved, label the transactions (deposit, withdraw, income, transfer) and the tokens involved, calculate financial metrics, and make them available through our APIs to automate these fixes for the users.

Our integration can cover the following activities:

  • Trading
  • Liquidity providing
  • Farming
  • Staking and delegations
  • Lending and borrowing
  • Rebasing protocol transactions
  • Options
  • Vaults

Collected fees tracking

Detailed historical data on collected fees shows each user's fee collection within a particular position or protocol. This data could be used to find the tax liability for this income.

Data:

  • Token claimed
  • Amount of reward tokens claimed
  • Date and time of claim
  • Token price at the time of collection
  • Current token price
  • Transaction hash of the claim

User transactions history

Our APIs return the user transactions of a user in a given protocol with dates and even USD values of the transactions and gas costs.

PnL and collected fees report

The output of our APIs can be used to generate export files (CSV) of a given user’s positions, providing financial data for tax purposes. The format of the reports and the data displayed in them can be customized and adheres to the selections made by the user to either include open or closed positions and select a specific chain and year.

Some CSV report examples:

  • Profit and loss report, see a sample here
  • Collected fees report, see a sample here

Scalable API coverage

Our integration standards allow faster integration with web3 protocols, leading to better coverage in the long run.

In the future, our platform will be open-source, allowing anyone to build integrations and, after proper QA, provide historical financial data for any protocol through APIs.

API associations

It is a built-in feature of our APIs that allows combining APIs with each other to provide a comprehensive performance overview of a Defi user’s positions.

Example use case:
The user provides liquidity on a given AMM and uses the receipt tokens to farm in another protocol. To get accurate historical financial data for this user’s position, two APIs are needed:

  • For the AMM to get the liquidity-providing data
  • For the other protocol, where the user farms with the receipt tokens

Instead of looking at the financial performance of the user in these protocols separately, API association constructs a combined, more accurate historical performance.

Multi-wallet support

Our protocol-level APIs can take multiple wallet addresses and return the historical financial data for these in a given protocol. This feature makes tracking financial performance across multiple wallets much easier for DeFi users.