Collect, classify, and collate your Tezos transactions

Related tags

React tezos
Overview

tests

Taz

Taz is a tool for analyzing and reporting on your Tezos transactions.

Taz does three things to help analyze your Tezos transactions.

  1. Collect: It downloads transactions and other data needed for processing.
  2. Classify: It analyzes and classifies your transactions within and across accounts.
  3. Collate: It gathers, sorts, and further classifies all transactions.

From these three things, Taz is also able to help automate creating CSV reports like income statements and gains and losses reports.

Caveat Utilitor

Disclaimer: Taz is not a replacement for professional financial or tax advice. Code and documentation are provided for informational purposes; use at your own risk.

Status

Taz is a work in progress. I created this based on my own usage, but Tezos is a big place, with lots of different interaction patterns. If something doesn't look right (or you get errors when running it), feel free to open an issue or suggest code changes via PR. It is my goal to support as much of the Tezos blockchain as I can.

Current areas of known limitation:

  1. DeFi. Outsize of simple XTZ-token swaps, Taz most likely does not properly classify/analyze DeFi transactions like liquidity, staking, etc. This is my highest priority area to improve.
  2. NFT platforms I haven't used. Some should work but I haven't directly tested all.
  3. Custom constracts. Taz has a rudimentary plugin system for special case handling of contracts, but with almost 100k contracts on Tezos, there is lots of room for improvement.
  4. Unknown unknowns. ๐Ÿ‘ฝ

Using Taz

Technical Setup

  1. Make sure you have Node.js installed (tested on v16.14.0). Installation Instructions
  2. Clone/download repository. GitHub Help
  3. Install node dependencies by opening a terminal application, navigating to the directory where you cloned the repository, and running npm install.

Configuration

To configure Taz for your data:

  1. Copy the .env.sample file to a file named .env. This is where Taz reads configuration information.
  2. Set the variables in .env

Once you have done this, you can run Taz to see its output, but the analysis will be wrong unless you create your exchange CSV files.

Currency Support

Taz currently supports the currencies that TzKT does.

  • Btc
  • Cny
  • Eth
  • Eur
  • Gbp
  • Jpy
  • Krw
  • Usd

Centralized Exchange Data

Taz does not automatically download centralized exchange data (yet), so you will have to create this manually for accurate analysis.

You can find an sample CSV in the examples folder that contains each type of transaction currently supported. For accurate analysis, you must include all transactions that involve XTZ. For instance if you receive BTC and then trade it for XTZ, you must include the transaction where you receive BTC. You can include transactions for other cryptocurrencies but Taz will ignore them.

The easiest way to create this CSV is to copy the sample CSV and replace the example transactions with your own. Once you have finished your CSV put it in the appropriate year's user folder (creating if needed).

Example folder structure:

  • data
    • 2021
      • user
        • exchange-transactions.csv

Headers

These headers must be in your CSV.

  • timestamp: ISO 8601 timestamp of transaction
  • type: type of transaction
  • fiat: price in fiat per coin. This must be present for receive, trade, interest, trade:fiat-in, and trade:fiat-out types.
  • in_amt: amount for incoming transcation
  • in_token: token symbol for incoming transaction (eg, XTZ)
  • in_token_id: token id for incoming transaction (not used currently)
  • in_token_from: source of incoming transaction (use your address when transferring to a centralized exchange)
  • out_amt: amount for outgoing transaction
  • out_token: token symbol for outgoing transaction (eg, XTZ)
  • out_token_id: token id for outgoing transaction (not used currently)
  • out_token_to: destination of outgoing transaction (use your own address when transferring to yourself)
  • fees: fee for transaction. Include for outgoing transfer types.
  • account: account for transaction. You can use the name of your exchange if you like.
  • op: operation hash for transaction. You must include this for transfer types. Most exchanges will give you this information, but you might need to find it on a blockchain explorer like TzKT if not.

Types

Taz supports the following transaction types in the exchange CSV.

  • transfer: for sending or receiving tez to or from one of your addresses. fiat is not needed.
  • receive: for receiving any cryptocurrency from an address that is not yours. fiat is price per coin of incoming token.
  • trade: trading cryptocurrency for cryptocurrency. fiat is price per coin of outgoing token.
  • trade:fiat-out: trading fiat for cryptocurrency. fiat is price per coin of incoming token.
  • trade:fiat-in: trading cryptocurrency for fiat. fiat is price per coin of outgoing token.
  • interest: cryptocurrency received from exchange for holding (usually this is a staking reward of some kind). fiat is price per coin of incoming token.

Operation Hashes

For incoming and outgoing transfer types, make sure to include the operation hash in the op column so that Taz can match it correctly with the corresponding blockchain transaction.

Fiat

Taz uses the fiat column to calculate cost basis and income. Here is how to set it, based on type:

  • receive: price per coin for in_token
  • interest: price per coin for in_token
  • trade: price per coin for out_token
  • trade:fiat-out: price per coin of in_token
  • trade:fiat-in: price per coin of out_token
  • transfer: not needed

Running Taz

Now that you have configured Taz and created your exchange CSV, you are now ready to download your blockchain data and look at how Taz analyzes it! ๐ŸŽ‰

Simple run node index.js in Taz's directory. Depending on how many transactions you have it can take some time to download, but once Taz finishes, you should see data in your year folders (under data).

If you run into problems, feel free to let me know by opening an issue.

Reports

Currently, Taz creates the following reports (found in the reports folder for a given year, eg data/2021/reports/):

  • gains-FIFO.csv: a FIFO report of gains and losses
  • gains-HIFO.csv: a HIFO report of gains and losses
  • income.csv: an income statement
  • all-classified-transactions.csv: a collated report of how Taz classified all of your transactions
  • individual classification reports for each address you configure

Contributing

The most helpful way to contribute at the moment is to setup Taz, run it, and let me know if you experience errors or data that looks/is wrong. I also welcome code contributions, if you're willing to jump into a young code base. All code is MIT licensed.

You might also like...

Concircle scanner mobile app is application That helps you scan your order and position and to know if there are exact or not. it's cross-platform app.

Concircle scanner mobile app is application That helps you scan your order and position and to know if there are exact or not. it's cross-platform app.

Concircle scanner mobile app โญ Star on GitHub โ€” it motivates Me a lot! Concircle scanner mobile app is application That helps you scan your order and

May 7, 2022

A small application to categorize and track your income and expenses.

Expense Tracker App with Typescript A small application to categorize and track your income and expenses. Expense Tracker App Demo Link You can check

Jul 1, 2022

A Facebook Clone which built with reactJS. You can sign in with your Google Account and send realtime posts.

Facebook Clone with ReactJS A Facebook Clone application that you can sign in with your Google Account and send realtime posts. Facebook Clone Demo Li

Nov 25, 2022

A simple PWA to scan your EU digital COVID Certificate and generate a passbook from it

COVID-19 passbook Generator The aim of this project is to let a user scan a EU Digital COVID Certificate with their smartphone, and generate a passboo

Nov 11, 2022

TryShape is an open-source platform to create shapes of your choice using a simple, easy-to-use interface. You can create banners, circles, polygonal shapes, export them as SVG, PNG, and even as CSS.

TryShape is an open-source platform to create shapes of your choice using a simple, easy-to-use interface. You can create banners, circles, polygonal shapes, export them as SVG, PNG, and even as CSS.

Create, Export, Share, and Use any Shapes of your choice. View Demo ยท Report Bug ยท Request Feature ๐Ÿ‘‹ Introducing TryShape TryShape is an opensource p

Dec 26, 2022

This command line helps you create components, pages and even redux implementation for your react project

This command line helps you create components, pages and even redux implementation for your react project

react-help-create This command line helps you create components, pages and even redux implementation for your react project. How to install it? To ins

Dec 10, 2022

Capture a famous phrase, download it without hassle and share it with your friends. ๐ŸŽ‰

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Mar 8, 2022

React tooltip is a React.JS Component that brings usefull UX and UI information in selected elements of your website.

React Tooltip โœ… React tooltip is a React.JS Component that brings usefull UX and UI information in elements of your website. Installation โŒจ๏ธ React Too

Dec 22, 2021

This app helps you keep track of your expenses in months and years. Also, it shows a graph representing those expenses.

This app helps you keep track of your expenses in months and years. Also, it shows a graph representing those expenses.

Expenses Tracker This app helps you keep track of your expenses in months and years. Also, it shows a graph representing those expenses. Built With Ma

Aug 8, 2022
Comments
  • Refactor and introduce classifiers

    Refactor and introduce classifiers

    This PR evolves the classification code a bit to extract contract-specific classification into their own files. This sort of plugin classification will be needed for expanding the scope of what Taz can do, in addition to improving the overall arrangement of the code.

    opened by metanivek 0
Owner
metanivek
general purpose programmer
metanivek
Classify Store in React JS ๐Ÿ˜ƒ

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

matin turkaman 6 Nov 22, 2021
A React-Fullstack platform helps to track & compare your Incomes & Expenses transactions in one place via detailed Graphical information to manage your Budget.

Budget Master Track your income and expenses in one place via detailed graphical information to manage your budget. Manage your budget and transaction

Siddharth Singh Bhadoriya 9 Nov 27, 2022
A Vault Treasure application where you can store your Pending, Paid and Draft Transactions

A Vault Treasure application where you can store your Pending, Paid and Draft Transactions. Easy to Manage and Track your valuable treasures with user-friendly UI and simplicity

Hariket Sukeshkumar Sheth 1 Jan 22, 2022
Open Source Website where you can manage your information and artworks of your fursona(s)

MyFursona About this project MyFursona is an open source project where users can manage their artworks, info (such as biography and interests), and lo

MyFursona 23 Jan 7, 2023
Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

Material-UI Quickly build beautiful React apps. Material-UI is a simple and customizable component library to build faster, beautiful, and more access

Material-UI 83.6k Dec 30, 2022
You can use this CLI Tool to clean your iOS and Android projects and keep them updated.

Mobile App Cleaner You can use this CLI Tool to clean your iOS and Android projects and keep them updated. This tool automatizes these items below; Cl

automizer 21 Mar 19, 2022
Check Your Nearest Vaccination Center And Slots Availability using pincode and district name.

Vaccine Tracker Application - Pan India ?? Website โ€ข Playstore made with โ™ฅ for the people of India DevIncept is an 30 day open source program helping

sameer srivastava 67 Nov 3, 2022
Bookstore CMS React Front-End to display a list of books, categorize it, add and remove books and update your reading progress

Bookstore REACT app to manage your books Build an app to display a list of books, categorize it, add and remove books and update your reading progress

Eapen Zacharias 3 Aug 19, 2022
This simple and small react component can check your repository stars and change theme on light/dark

Repository metrics for react This beauty and easy (4KB) react component can help you add metrics to your repositories also you can change component th

Koma Human 2 Jun 25, 2022
A react component available on npm to easily link to your project on github and is made using React, TypeScript and styled-components.

fork-me-corner fork-me-corner is a react component available on npm to easily link to your project on github and is made using React, TypeScript and s

Victor Dantas 9 Jun 30, 2022