Inspiration
Like many retail investors, I did some staking and trades on the Solana blockchain. I began exploring how to integrate these transactions with popular tax websites. What I found was ... basically nothing. So like any programmer, I wrote some code to make my life easier, generating CSVs. I figured this might prove useful to others so I wrote up a website to make it available to others with the click of a button. This is https://stake.tax.
What it does
Solana CSVs for tax season. That's pretty much it. Just go to https://stake.tax .
There's definitely work to be done to expand coverage and comprehensiveness, but it does include staking reward history, transfers, swaps, serum DEX transfers, Raydium/Saberswap contracts, NFT transfers, and NFT mintings.
Additional visual aids include balance history graphs (based on CSV) and NFT preview images. Limitations of the CSV include lack of full Serum DEX transactional history (generally only transfers in/out of DEX, but with swaps/trades deduced when possible).
How we built it
- CSV generation: python and Solana JSON RPC API.
- website: react/javascript
There are limitations/issues with using python, without the availability of native-contract-data-parsing at hand. I'm slowly expanding my knowledge of Rust/contracts, starting with this hackathon. I did find the very useful metaplex-python library during the hackathon--enabling me to add NFT images quickly to stake.tax.
Challenges we ran into
The main challenge has been to parse the relevant contract data using python and JSON RPC API. In this regard, some remaining challenges include inability to deduce Serum DEX transaction history (still unsolved), staking rewards history slowness, and general inability to easily parse future smart contracts.
A more recent issue has been running into rate-limiting with public RPC endpoints. During this hackathon, I began work on integrating with a private node provider. I tried Figment RPC endpoints, but I ran into reproducible intermittent errors (10-20% requests returned HTTP 200 null responses). Ultimately, I was unable to resolve this issue, even after engaging with support. I then tried Quicknode RPC endpoints, and it worked smoothly.
Accomplishments that we're proud of
I'm proud to be one of the first accessible Solana CSV tools out there (at least to my knowledge).
What we learned
During this hackathon, I found non-native libraries like michaelhly/solana-py and metaplex-foundation/python-api to help onboard a "normie" engineer like myself to the world of Solana development. I'm only just beginning to understand Rust/Anchor/contract nomenclature and hope to continue my learning journey.
What's next for stake.tax
I'm actively working on expanding CSV coverage to a more satisfactory level before tax season. I tentatively plan to open source the CSV code before the end of 2021, hoping it can make a valuable contribution to the Solana community and my fellow hodlers.
On a more personal note, I hope to re-enter a future Solana hackathon with a dapp and graduate past "normie" engineer.
Built With
- amazon-web-services
- figment
- javascript
- metaplex
- nextjs
- python
- quicknode
- react
- rpc
- vercel

Log in or sign up for Devpost to join the conversation.