Use this software at your own risk. I am not a tax professional. I am not licenced to give tax advice. My software is not a substitute for tax advice from a tax professional. I do not accept any responsibility for you filling out your taxes wrong with or without the use of this software. I would also suggest seeking professional tax advice on any taxes involving crypto and NFT related assets that you own due to the complexity and lack of clarity of tax code relating to crypto and NFT assets.
You are likely reading this because you use decentralized web3 protocols and now have the need to account for gains or losses of every single transaction you made even if you didn't liquidate any assets to fiat currency due to the tax regulations of where you live. You looked high and low for a reasonable solution to both gather your transaction data for each blockchain you use and then give it back to you in some format that you can upload to a tax software or professional.
If you are anything like me you are frustrated by the fact that most solutions won't even work for DEX transactions, cost a king's ransom every year, or even worse both!
I created this software so that I can process my own crypto taxes myself, not get price gouged along the way, and keep my tax data private on my own device where it should be and not on a cloud service "protected" by a third party.
When I began the project I quickly realized it was goint to be more complex than I had anticipated and needed to push the project to Git for version control. Anyone who stumbled onto my git is free to use this software as long as they take responsibility for the taxes they fill out.
I also strictly forbid anyone from using my software for commercial use such as in a SAAS or otherwise selling it.
If you are already on Linux or Mac OS feel free to skip ahead. If you are a Windows user you are going to need to use a Linux Bash Shell substitution for your command line interface in order to run the Bash files that come along with this software. There are many articles and programs which handle just this topic so I won't go into it further. Just look up using Linux Bash Shell on Windows.
In order to use this software you will need to be comfortable with or at least not afraid of the Linux command line, have Python3 installed on your machine, and be able to run Python3 scripts.
The forms and data which are used and generated by this software are stored in your local machine in the directories which are created by this program and not on a cloud service. This means that anyone who gains access to your machine could also find, copy, and manipulate the tax records stored there. The following steps should help you secure your device, network, and records.
-
Make sure you are installing this on a machine that you feel is secure and that you don't mind holding your personal tax data. Here are some suggestions.
- Make sure you have a directory that isn't already cluttered, that you don't mind dedicating to holding the tax program and your tax records.
- Make sure your wifi network is secure by setting a password for your wifi router and never using the machine holding your sensitive documents on non secure wifi networks such as restaurants and coffee shops.
- This should be obvious but don't use this on a computer which has multi-user logins. This is especially true where you don't implicitly trust each user which could log in as far as you trust yourself. Even if you trust all those users each seperate login and user creates a new attack vector and increases the chances you get hacked or expose your data to malware.
- Get yourself a 2fa device such as a Yubikey, secure your logins, and secure your sudo commands. This isn't absolutely neccessary but will make your machine way more secure than if you had not.
- Consider switching to Linux if you are on Windows. If you are comfortable and confidant with the security of your Windows machine then have at it. That being said I would never put anything on a Windows machine that I would be worried about being hacked or manipulated.
-
Once you are confidant you have step one tackled pull the main branch of the repository into the folder where you want to hold and store your tax data.
-
Run create_directories.sh inside the CryptoTax directory, make sure that those directories were indeed created and then run create_files.sh also in CryptoTax.
- You can do this by calling the file as an executable like ./create_directories.sh or ./create_files.sh
- You can also run the bash command followed by the file name like so.
bash create_directories.sh
- If you get an error running the files as executable you may need to change the files to executable using the chmod +x command.
chmod +x create_directories.sh
-
Make sure the .csv files in CSV/OtherInformation are filled in. The ./create_files.sh should have already done this for you however it's always good to double check.
-
Go to CSV/PubWallets run
mkdir ETH
go into the newly created ETH folder and runtouch pub_wallets.csv
-
Open pub_wallets.csv and add the following header line key,value then on each subsequent line add a key descriptor followed by the public 0xAddress for that key descriptor seperated with a comma like so. meta_mask,0xAddress
-
Add all public addresses you wish to pull data for and any public addresses which you use to send funds to these addresses.
-
The purpose of adding public addresses which you send funds to your account with is to check for wallet to wallet transfers that you own so that the funds you send from one wallet to another are not treated as a taxable event.
-
As of this version 0.25 there is still no user interface and the only supported chain is DFK. The UX is coming soon but if you wish to try it now you will need to use the dfk class instance variable at the end of blockchain.py. If this sounds too difficult you can stop here and wait until I have a proper UX built. However you really need to get your DFK taxes in order I provided instructions below for you to plow ahead.
You are now at the part where you can obtain transaction .csv files from the dfk blockchain and use those to write an 8949.csv file to take to the tax service of your choice.
- Go to the Software directory inside the CryptoTax directory and create a class instance at the end of blockchain.py if one isn't already created for you.
- Make sure print(dfk.download_dfk_transactions()) is not commented out.
- run
python3 blockchain.py
- Check the CSV/BlockchainTxReports/DFK folder and open the .csv file generated there with your favorite spreadsheet program, check the accuracy, and change any fields there which are incorrect then save the .csv file.
- Go back to the Software directory then open blockchain.py again and comment out print(dfk.download_dfk_transactions) and uncomment print(dfk.create_8949_from_transactions_csv()).
- run
python3 blockchain.py
- Check your CryptoTax/CSV/8949c folder. You should now have a .csv file there filled out in an 8949 ordered fashion.
Lastly as a side note. When I originally wrote this instruction document I intended to have the code to check for wallet to wallet transfers and bridges written however due to having written this much code between git pushes and also hitting a small road block involving Lila's Ledger only showing TX hash addresses and not To and From wallet addresses I decided to stop here and make a git push.
I'm working on a solution to this however it may be unsolvable. This is not the end of the world however as those transactions should be easy to spot as they should all have a cost basis of 0.
The way to check for these is to go to the AVAX DFK subnet explorer and check the transaction hash of a transaction you suspect to be a wallet to wallet transfer there. That transaction hash should bring up the To and From address information you are looking for when entered in the explorer. If you get a match just change the value in the category column of that row to something other than 'gains' then save the .csv file. This transaction will now be ignored when generating the 8949 transaction file.