Portfolio tracker version 2
I think I wrote about having rolled my own portfolio tracker on Jupyter. It's been running for a few years now; it's clunky but it works. It's good enough to tell me my portfolio breakdown and where every is spreaded across. It's even good enough to tell me how long away am I from fuck-you money.
But there is a serious design flaw: I need to manually punch in every transaction that happened. That was acceptable until it isn't.
I've reached the point where I have no choice but to build the next iteration of the tracker. This is not an upgrade build on top of the previous one, it's built from the ground up. Work has already started.
The previous iteration was built on the basis of capturing every atomic transaction. In doing so I can derive the state of the portfolio by summing up transactions. I can even travel to any point in time and look at the state of portfolio of that period.
That's great accept I did not automate the capturing of transactions. Doing so is non-trivial when trades happen across multiple blockchains and numerous centralized exchanges. A healthy amount of activities happens outside what Etherscan (and every other X-scan products) are able to tell me. Given that I only ever care of the current state of the portfolio, continuing on this path seems to be an overkill.
It doesn't help that Ethereum layer-two's have gotten mainstream. Assets of on wallet address are spread across different chains. This is not a concept anticipated by the initial data structure. I can think of no relational data structure that I'm happy with.
I need to attack this by thinking differently. The original source of truth was transactions I had to painstaking compile locally. But in reality these sources of truth are already accurately captured in various blockchains and exchanges.
By querying the right places, compiling assets balances and arranging them should be easier than capturing transactions locally. This is sufficient to tell where assets are in and total breakdown. The downside is not being able to time-travel.
With traditional investing the playground has gotten stale enough that off-the-shelf tools are plenty and more than adequate. In decentralized finance the game is shifting by the day. Tools work only up to the point where concepts are established.
Even with this iteration of tracker, I'm still not able to tell the holding value of any given liquidity pool token. Doing so require piping various APIs together, which I don't think is feasible in the long run. Even there's decent amount of dollar value in those assets, the tracker will report zero.
It's a problem when an analysis tool knowingly tell only part of the story; there's an inherent trust issue as a user. I can't think of a solution yet, perhaps the folks in Zapper are struggling similarly. But compared to capturing investing opportunities, building a perfect tool takes a lower priority.