DeFi allows users to take part in traditional finance activities like lending, liquidity deposits, mining, swapping, work income, interest or rewards. DeFi covers a broad range of activity and can be captured in several ways in Ledgible using the **Tax Category** attribute for transactions.

- For API connected exchanges, Ledgible will automatically classify **DeFi** transactions accordingly if this information is provided by the API.

- Ledgible will automatically categorize **DeFi** transactions on the Ethereum and Algorand blockchains added as a blockchain crypto source.

- You can include DeFi and other categories when adding a data source using the **File Import** option. The **File Import** template will be available to download when [adding a file as a data source.](https://support.ledgible.io/hc/en-us/articles/10274192037005-Adding-a-Data-Source) There are different types of file import template: the DeFi activity template will display options for different types of DeFi activity.

- Any **DeFi** transactions can be added manually. Please see [this](https://support.ledgible.io/hc/en-us/articles/4421729863437-Staking-Rewards) article from our [Knowledge Base](https://support.ledgible.io/hc/en-us) for an example of how to add a manual entry for staking rewards.

- Finally, if the relevant transactions have already been added to Ledgible, [from the **Transactions** tab you can set a category for a transaction from the **Actions** column or use the **Categorize** button to create rules that can **add**(or **remove**) the category for matching transactions in bulk.](https://support.ledgible.io/hc/en-us/articles/12702282062605-Categorizing-transactions)

Mining income and other transactions that would be considered income per IRS guidelines can be reported on for tax purposes by running the **Income Transaction Export** report. Similar reports are available for donations and gifts as well.
