DeltaBalances.github.io icon indicating copy to clipboard operation
DeltaBalances.github.io copied to clipboard

Request: add balances at exchange history page

Open rory4ever opened this issue 5 years ago • 2 comments

The Exchange History page is working great and fast as well, kudos to that :) However, for option " funds" it only shows me all incoming and outgoing funds and deposits/withdrawals. Although this is great I really miss the possibility to show all historical balances as well (for both the wallet as on the smartcontract) I was wondering if this can be added in the future, it is also a much needed option for tax purposes. Thanks in advance.

rory4ever avatar Apr 13 '20 18:04 rory4ever

This is a good idea for a future addition, but requires a little too much work for now. You can't simply query Ethereum for a balance at a past date, you need to calculate it using other available info.

For you wallet balance for example, you get the current wallet balance and then walk back through all transactions (transfers) that happend since that date. This should sum up to the right total, but some tokens use minting/burning/wrapping features that might not show up as a transfer.
To also get deposited balances you would need to do a second pass, but check all deposit/withdraw/trade events on the exchange.

With the current setup this would be incredibly slow, to make it of any use it would probably require and additional database on a server somewhere. Again, a good idea to speed this site up, but requires quite a bit of extra work.

Luckily etherscan has already done some of this work for you, just not for deposited balances. They are just a little hard to find on their homepage.

Etherscan historical wallet balances:

  • ETH balance https://etherscan.io/balancecheck-tool
  • Token balance https://etherscan.io/tokencheck-tool

Note that etherscan's trackers will often report a bad balance for WETH after you unwrap it, and will only correct your balance once you get some new WETH. (a good example of the little issues with checking old token balances)

DeltaBalances avatar Apr 14 '20 19:04 DeltaBalances

Thanks for your reply. The main purpose for me is the deposited balances (on the etherdelta2 smartcontract) so the Etherscan solution is of little use to me.

I understand that this is a bridge too far for now, hopefully somewhere in he future, you have my full support ;)

rory4ever avatar Apr 27 '20 19:04 rory4ever