Calculating Transaction Records
We obtain the inflow and outflow amounts of each Token Holder using transaction records starting from the time of token issuance.
For example: Suppose we have a Y Token in our database. We want to know the inflow and outflow amount of X tokens in addresses A and B in the past period of time. We can infer from the Transfer Event that Address A is outflowing at block height 20,002 100 Y tokens flow into 300 Y tokens at block height 20,000, address B flows into 200 Y tokens at block height 20,001, and 200 Y tokens flow out at block height 20,003, which will be recorded by us as follows picture:
For example: suppose there is a token called ALPHA and we want to know the inflow and outflow amount associated with addresses 0xA and 0xB.
Token_Address | Block_Height | Holder_Address | Value |
---|---|---|---|
Y | 20,000 | 0xA | +300 |
Y | 20,001 | 0xB | +200 |
Other Tokens | ....... | ........ | ..... |
Token Address | Block_Height | Holder_Address | Value |
---|---|---|---|
Y | 20,002 | 0xA | -100 |
Y | 20,003 | 0xB | -200 |
Other Tokens | ........ | ......... | ....... |