WARNING: I've stopped working on this project.
Feel free to fork the code and do whatever. At last check some of APIs I was calling have changed their output, and some updates to the code will be needed to get this processing again.
If you get it working again, I'll redirect people to your version. If you decide to give it a try, look at the dev and dev2 branches, I had started on an update, but not sure how much is left.
Web3Tax.Info (ThorChain Tax Calculator)
Generate import-ready CSV file of your (ThorChain) blockchain transactions.
High Level Technical Details
ThorChain Midgard API parser written in NodeJS, with long-term plans of becoming much more.
- 24th, Jan, 2022: ThorChain Swaps, and Liquidity Pools, operations fully supported. Uses First-In-First-Out cost-basis for LP to calculate profit/loss. Supports CSV formats for CoinTracker, CoinTracking, and Koinly.
- 27th, Jan, 2022: Added support for $DOGE, and $RUNE Upgrade transactions.
- 7th, Feb, 2022: Added support for CryptoTaxCalculator CSV format.
- 16th, Feb, 2022: Open sourced the project.
- 17th, Feb, 2022: "Check LP Status" button added.
- 18th, Feb, 2022: "Check LP Status" now supports partial withdrawals.
- 1st, Mar, 2022: Added support for LIFO cost basis method.
- 4th, Mar, 2022: ThorChain to ThorChain send transactions now supported via new data source API.
- 28th, Mar, 2022: Chihuahua and Cerberus chains are now tentatively supported.
- 9th, Apr, 2022: Reported previously missed ThorChain transaction hashes.
- 9th, Apr, 2022: UI/UX updates, auto-complete related addresses.
- 19th, Apr, 2022: Added support for TaxBit CSV format.
- 6th, Jun, 2022: Stability improvements, midgard rate-limiting.
- 31st, May, 2022: Style updates as part of larger branding efforts.
- 13th, Jun, 2022: Lum Network chain is now supported.
- 17th, Jun, 2022: Added support for CoinLedger CSV format.
- 8th, Jul, 2022: Lum Network now using validator names instead of addresses.
ThorChain related improvements (in no particular order)
- fix rare edge-case bug: very large swaps with multiple output transactions, second output currently gets ignored.
- Auto-switch between Midgard servers based on availability.
- handle failed swaps better (just report cost, instead of in-trade-out)
- Add support for $RUNE to $RUNE transactions (not provided by Midgard API).
- Add support for stage-net (separate Midgard, Stage-RUNE asset, separate LPs, sthor addresses, etc).
- Add support for more cost-basis, such as LIFO, etc. (if there is any community interest).
- Other operations within ThorChain such as bonding, donating, etc. (if there is any community interest).
- report how much the user currently has in each of the LP pools along with their cost-basis (IE: the user's unrealized gain/loss).
Cosmos related expansion
- Expand into the Cosmos Universe, start with the simplest: Chihuahua Chain.
- Send, Receive, Stake, Claim-Rewards, Un-stake, IBC Send, and IBC Receive.
- Track re-delegation, voting, and such as misc. expenses.
- would like to track any slashing that occurs.
- Also, for validators, tracking commission earned.
- When expanding to multiple Cosmos chains, automatically infer addresses by bech32 conversion. (applies to most chains, known exceptions: bnb, thor, and terra)
- Chains of interest:
- Cosmos Hub $ATOM
- Osmosis $OSMO
- Chihuahua $HUAHUA
- Juno $JUNO (and JunoSwap $RAW)
- Stargaze $STARS
- Comdex $CMDX
- Desmos $DSM
- Kava $KAVA
- Sommelier $SOMM
- Ki $XKI
- Terra $LUNA/$UST (maybe)
- and others depending on community interest. The goal would be the codebase supports all the basic operations on all chains, and we just have to build out extra parts for whatever is unique to that chain.
- estimate how much time the user saved by not having to manually enter their transactions (with a polite donation suggestion).
- automatically categorize any funds sent to donation addresses accordingly in the CSV report.
You'll need NodeJS, Redis.
After cloning the repo, within the project install the dependencies with NPM:
If your redis is running on the same machine, the default config is good, otherwise adjust the settings in either
run-test.sh before calling it.
./run-test.sh # Ctrl-C to stop
Once running, visit http://localhost:3001/ to test it.
Lots of ways to help, tell me what features you want/need.
Trying it out and let me know if you run into any bugs.
If you are technically inclined, submitting code pull-requests.
If you'd like to financially support, donation addresses are below:
- qzcxt5hl30yk3w052n3x6wjvky9rwn0p6guz95qmje (BCH)
- 0x165d707704716b02c050935F8Ce6E0429C9829e6 (AVAX, BSC, ETH, FTM, etc.)
I'm building this in my spare time, started it because I needed a way of handling hundreds of ThorChain transactions, and realized I can't be the only one having this issue. This is my way of helping support the ThorChain and Cosmos communities, in hope that this will help our communities grow and reach mass adoption.