Taxes and Profit/Loss tracking for Defi
Taxes. No one likes to talk about them, but they are a fact of life. The reality is: we live in the physical world and that physical world is usually a country where....We have to pay taxes. That includes all of our gains and losses in Defi. Polytax is a network of sites to generate a simple gains and losses form you can feed into Turbotax or give to your accountant so they can file your taxes for you.
How it's made
Vuejs, GraphQL, Querying matic using polymarket endpoints, aave's graphql endpoint for aave gains Its not new, but I enjoyed learning about the liquidity index and using it to extrapolate estimated interest rates for Aave to create the tax gains and losses sheet. I actually used a similar method for calculating decaying votes on on a site I sold to Salesforce about 10 years ago. In that case, it was to model a constantly decaying score for older votes. Additionally I enjoyed implementing a recursive algorithm for the first-in-first-out gains to match trades. That was neat because my 6 yr old is learning about recursion now in his math circle and I was able to show him how it is useful for me. Finally, i did learn that from a tax perspective, Aave's "more coins" method is tax inefficient compared to a uniswap like "coin appreciation" algorithm. Aave's system will most likely be treated like an interest distributing bond whereas uniswap's token has the potential to qualify it for long term capital gains even though they are essentially the same thing. I suppose its close to the difference between retained earnings and dividends in corporations.Technologies used