The ERC20 credit debit model combines erc20 transfers, allowing you to easily track the inflows and outflows of every ERC20 token belonging to all addresses.

Credit Debit vs Transfers Credit Debit tables contain the amount and direction (credit/debit) of every transfer event of all assets (ETH, ERC20, ERC721 and ERC1155).

This table will include two rows for every event, with one row representing credit and one row representing debit. Asset-specific tables are also available for query.

Example Using an ERC20 token as an example, a token transfer will be represented as follows:

from_addressto_addressamountevent
XY1250X transfers 1250 tokens to Y

In credit debit, it will be represented two rows.

addresscounterparty_addressamountevent
XY-1250X decrease 1250 tokens to Y
YX1250Y increase 1250 tokens from X

Table Columns

Unique Key: unique_id

Column NameData TypeDescription
addressVARCHARAddress of the account that was credited or debited amount of ERC20 token
counterparty_addressVARCHARThe address of counter party of this credit or debit transfer
token_addressVARCHARToken address of the ERC20 token
token_nameVARCHARName of the ERC20 token
token_symbolVARCHARToken symbol of this token
raw_amountFLOATAmount of tokens moved (unnormalized)
raw_amount_strVARCHARAmount of tokens moved (unnormalized) in string
amountFLOATAmount of tokens moved, normalized by the decimal points defined in the ERC20 token contract. For example, USDC has 6 decimals, so this value is the raw_value divided by 10^6.
amount_strVARCHARAmount of tokens moved, normalized in string
usd_valueFLOATThe amount of tokens moved, in $USD
usd_exchange_rateFLOATThis is the price of a single token, in USD
transaction_hashVARCHARTransaction hash that this transfer belongs to
transaction_indexBIGINTThe position of this transaction in the block. The first transaction has index 0
log_indexBIGINTThe position of this log within the block. The first log has index 0
block_timestampTIMESTAMP_NTZ(9)The timestamp of the block that the corresponding transaction of this transfer belongs to. This is also the timestamp when this transfer occurred.
block_numberBIGINTThe block number that the corresponding transaction of this transfer belongs to
block_hashVARCHARThe block hash that the corresponding transaction of this transfer belongs to
unique_idVARCHARUnique id generated to each transfer. Includes transaction hash, log index and credit and debit transaction type.