Dime
Dime is a free and open-source command-line tool written in PHP to calculate your cryptoasset taxes in the UK.
Install / Use
/learn @osteel/DimeREADME
About
Dime is a free and open-source command-line tool written in PHP to calculate your cryptoasset taxes in the UK.
It takes a spreadsheet of transactions as input and returns the corresponding tax figures per tax year.
Dime is primarily intended for people already familiar with the UK's cryptoassets tax rules looking for a privacy-preserving way to complete their tax return.
Dime is a project by Yannick Chenot that is also the object of a blog series.
Disclaimer
This program is Copyright (C) 2022 by Yannick Chenot.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should seek the advice of a professional accountant before using this program.
Table of contents
Installation
Standalone application 🧪
[!NOTE] This is an experimental feature. Please open an issue if the application doesn't behave as expected.
Download the binary for your operating system:
| OS | Binary | | -- | ------ | | macOS aarch64 (M1, M2, M3...) | dime-macos-aarch64 |
You can use the application straight away:
$ chmod +x dime-<YOUR-OS>
$ ./dime-<YOUR-OS>
Or you may want to move it to a directory that is in your system's PATH:
$ chmod +x dime-<YOUR-OS>
$ mv dime-<YOUR-OS> /usr/local/bin/dime
You can now run dime from anywhere instead of ./dime-<YOUR-OS>.
Composer
[!IMPORTANT] Requires Composer as well as PHP 8.2 and the BCMath extension.
You can instal Dime via Composer:
$ composer global require osteel/dime
Once the script is done, you should be able to run dime from anywhere to use the application.
If not, make sure the ~/.composer/vendor/bin directory is in your system's PATH.
If it's not already there, add the following line to your Bash configuration file (usually ~/.bash_profile, ~/.bashrc, ~/.zshrc, etc.):
$ export PATH=~/.composer/vendor/bin:$PATH
If the file doesn't exist, create it.
Run the following command on the file you've just updated for the change to take effect:
$ source ~/.bash_profile
</details>
PHAR (Linux / Unix / macOS)
<!-- phar -->[!IMPORTANT] Requires PHP 8.2 and the BCMath extension.
Download the PHAR archive from the latest release.
<!-- /phar -->You can use the application straight away:
$ php dime
Or you may want to move it to a directory that is in your system's PATH:
$ chmod +x dime
$ mv dime /usr/local/bin/dime
You can now run dime from anywhere instead of php dime.
Docker
[!IMPORTANT] Requires Docker and sh or Bash.
Download this shell script and use it straight away:
$ sh dime.sh
It will download Dime's Docker image and pass on commands to it.
You may also want to move the script to a directory that is in your system's PATH:
$ chmod +x dime.sh
$ mv dime.sh /usr/local/bin/dime
You can now run dime from anywhere.
Usage
Display Dime's menu by calling the executable without arguments:
$ dime
Here is a brief description of the main commands.
Processing transactions
Pass your transaction spreadsheet to the process command:
$ dime process transactions.csv
It will validate and process each transaction and display the corresponding tax figures or report any errors.
[!TIP] You will need to run this command every time you update the spreadsheet.
See the Spreadsheet format section to learn how to report your transactions.
Reviewing a tax year
Once your transaction spreadsheet has been processed you can review the corresponding tax figures whenever you like without having to run the process command again.
To list the available tax years and pick one to review:
$ dime review
To review a specific tax year:
$ dime review 2015-2016
Calling the review command without specifying a tax year will also display your current fiat balance (the difference between the fiat amount you put in and the fiat amount you took out).
Spreadsheet format
Here is a sample CSV file you can use as a starting point. It is recommended to read this entire section to ensure proper reporting, however.
Your spreadsheet must contain at least the following columns:
| Date | Operation | Market value | Sent asset | Sent quantity | Sent asset is non-fungible | Received asset | Received quantity | Received asset is non-fungible | Fee currency | Fee quantity | Fee market value | Income | | ---- | --------- | ------------ | ---------- | ------------- | -------------------------- | -------------- | ----------------- | ------------------------------ | ------------ | ------------ | ---------------- | ------ |
Column names are not case-sensitive and columns can be in any order. Extra columns will be ignored by the program.
Date
The expected date format is DD/MM/YYYY (e.g. 21/10/2015).
You can also specify the time of the transaction, although Dime doesn't need it.
Operation
Accepted values: receive, send, swap, and transfer.
Each operation requires different columns to have values (see detail below). You can also use the sample CSV file as a guide.
Receive
This operation is for transactions where you receive a cryptoasset in exchange for nothing. This happens when someone gifts you some crypto, for instance, or when you get or claim an airdrop.
receive transactions require values for the Market value, Received asset, and Received quantity columns.
Send
This operation is for transactions where you send a cryptoasset and do not receive another cryptoasset or some fiat currency in exchange. This happens when you gift someone some crypto, for instance, or when you pay for a product or service using a cryptoasset.
send transactions require values for the Market value, Sent asset, and Sent quantity columns.
Swap
This operation is for transactions where you exchange a cryptoasset (or some fiat currency) for another cryptoasset (or some fiat currency). This happens when you buy some crypto off an exchange, for instance, or when you sell some crypto, or you exchange a cryptoasset for another one.
In any case, at least one side of the transaction must be a cryptoasset.
swap transactions require values for the Market value, Received asset, Received quantity, Sent asset, and Sent quantity columns.
Transfer
This operation is for transactions where you transfer a cryptoasset from and to a wallet that you control. This happens when you withdraw some crypto from an exchange and send it to your hardware wallet, for instance.
transfer transactions require values for the Sent asset and Sent quantity columns.
Market value
The market value of a transaction is its value expressed in pound sterling at the time of the transaction.
The market value is at the centre of Dime's calculation rules so it is crucial to report it correctly.
Rules
When the transaction includes a sent asset (and is not a transfer – transfers don't need a market value), you must use the sent asset's market value as the transaction's market value, based on the reported sent quantity (see Sent quantity section below to learn how to report it correctly).
[!IMPORTANT] Be particularly vigilant when selling an asset for some fiat currency. It is tempting to use the received fiat amount as the market value, but if a fee
