The credit-debit model provides a double-entry accounting system for tracking asset movements on the blockchain.
This model is particularly useful for analyzing token flows, calculating balances, and understanding asset distribution patterns.
Credit Debit vs Transfers Credit-debit tables transform single transfer events into two corresponding entries:
Example Using an ERC20 token as an example, a token transfer will be represented as follows:
from_address | to_address | amount | event |
---|---|---|---|
X | Y | 1250 | X transfers 1250 tokens to Y |
In credit debit, it will be represented as two rows.
address | counterparty_address | amount | event |
---|---|---|---|
X | Y | -1250 | X decrease 1250 tokens to Y |
Y | X | 1250 | Y increase 1250 tokens from X |