The Fungible credit debit model combines erc20 and native token transfers, allowing you to easily track the inflows and outflows of every fungible 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 (NATIVE, ERC20, ERC721 and ERC1155).

This table will include two rows for every event, with one row representing credit and one row representing debit.

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
token_typeVARCHARType of the token (‘NATIVE’ or ‘ERC20’), converted to uppercase
from_addressVARCHARThe address sending the tokens
to_addressVARCHARThe address receiving the tokens
token_addressVARCHARToken address of the token
token_nameVARCHARName of the token
token_symbolVARCHARToken symbol
raw_amount_strVARCHARAmount of tokens moved (unnormalized) in string
raw_amountFLOATAmount of tokens moved (unnormalized)
amount_strVARCHARAmount of tokens moved, normalized in string
amountFLOATAmount of tokens moved, normalized by the decimal points defined in the token contract
usd_amountFLOATThe amount of tokens moved, in $USD
usd_exchange_rateFLOATThe price of a single token, in USD
transaction_from_addressVARCHARThe address that initiated the transaction
transaction_to_addressVARCHARThe address that received the transaction
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 (null for native tokens)
call_typeVARCHARType of the call that generated this transfer (null for ERC20 tokens and Tron chain)
transfer_typeVARCHARType of the transfer (‘value_transfer’ for ERC20 tokens)
block_timestampTIMESTAMP_NTZ(9)The timestamp of the block that contains this transfer
block_numberBIGINTThe block number that contains this transfer
block_hashVARCHARThe block hash that contains this transfer
unique_idVARCHARUnique id for each transfer
_tokens_updated_atTIMESTAMP_NTZ(9)Timestamp when token metadata was last updated (null for native tokens)
_created_atTIMESTAMP_NTZ(9)Timestamp when this record was created
_updated_atTIMESTAMP_NTZ(9)Timestamp when this record was last updated
_changed_since_full_refreshBOOLEANIndicates if the record has changed since the last full refresh