Creating a swap classification
Note: Before creating an automation flow to automatically classify swap transactions, a classification for swaps should exist in your Chart of Accounts (CoA).
From the side panel, click on More Options, then select Chart of Accounts.
Click + New.
Enter the following details for your Swap classification.
Account Type: Classify Swaps as an "Other Asset" account since they involve exchanging one asset for another.
Level: Parent Level: Create Swaps as a Parent Level account because you cannot nest it properly under another suitable account.
Account Name: Enter a name like "Swaps" to clearly identify the nature of the transactions.
Non-taxable: Leave unchecked as Swaps are taxable events in most tax jurisdictions; gains or losses need to be calculated.
To Ignore: Leave unchecked Do not check "To Ignore" because you want swaps to be included in capital gain/loss calculations.
Click Add Account.
Creating an automation
From the side panel, click on More Options, then select Automations.
Click on the + Classification Automation button.
Select Entity or Connection depending on which level you wish to apply this automation.
Click Next.
Complete the following fields.
Automation Name: Enter a name for the automation like "Swaps".
Automation Description: Optionally, enter a description.
Wallets or Accounts: Select whether the Swap automation will apply to a wallet or an account.
Automation Sources: Click on Select, then select the wallets or accounts applicable and click Choose to confirm.
Click Next.
Criteria 1: set the conditions for automatically classifying the Swap transactions.
Add a condition based on Contract Address where the Swap transactions occur.
Criteria 2: Configure the action that occurs when the trigger conditions are met.
Assign the classification rule to the appropriate classification: select the classification created for "Swaps".
Click Next.
Review the trigger and the action and click Confirm to activate the classification rule. Your automation will be run when the conditions are met.
Navigate to the Accounts page and click on Sync next to the relevant wallet to initiate a sync operation for the wallet you created the swap automation for (i.e., Contract Address).
Once the wallet is synced, swap transactions will be automatically classified as "Swaps".