> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Credit Debit

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:

* A debit (negative) entry for the sending address
* A credit (positive) entry for the receiving address

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

### Table Details

| Property | Value |
| - | - |
| Table Name | `bsc.assets.credit_debit` |
| Table Status | Production-Ready |
| Unique Key | `transaction_hash`, `unique_id` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| address | VARCHAR(42) | The wallet address holding the tokens |
| counterparty\_address | VARCHAR(42) | Counterparty address of this credit debit row |
| token\_address | VARCHAR(42) | Contract address of the token |
| token\_name | VARCHAR(16777216) | Name of the token |
| token\_symbol | VARCHAR(16777216) | Symbol of the token |
| token\_id | VARCHAR(16777216) | Identifier for non-fungible tokens (ERC-721) or semi-fungible tokens (ERC-1155). Null for fungible tokens. Each unique token\_id within a collection represents a distinct asset. |
| raw\_amount | FLOAT | Amount of tokens moved (unnormalized) |
| raw\_amount\_str | VARCHAR(16777216) | Amount of tokens moved (unnormalized) in string |
| amount | FLOAT | Amount of tokens moved, normalized by the decimal points defined in the token contract |
| amount\_str | VARCHAR(16777216) | Amount of tokens moved, normalized in string |
| usd\_amount | FLOAT | The amount of tokens moved, in \$USD |
| usd\_exchange\_rate | FLOAT | Exchange rate used for USD conversion |
| transaction\_from\_address | VARCHAR(42) | The address that initiated the transaction |
| transaction\_to\_address | VARCHAR(42) | The address that received the transaction |
| transaction\_hash | VARCHAR(66) | Transaction hash that this transfer belongs to |
| transaction\_index | NUMBER(38,0) | The position of this transaction in the block. The first transaction has index 0 |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp of the block |
| block\_number | NUMBER(38,0) | Number of the block |
| block\_hash | VARCHAR(66) | Hash of the block |
| token\_type | VARCHAR(16777216) | Identifies whether the balance record is for a `native` or `erc20` token |
| unique\_id | VARCHAR(16777216) | Unique identifier combining block, address, token address |
| \_tokens\_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the token metadata was last updated. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database. |
| \_changed\_since\_full\_refresh | BOOLEAN | Indicates if the record has changed since the last full data refresh. |

### Related Docs

* [EVM Assets Credit Debit](/historical-data/supported-blockchains/evm/core-schemas/assets/credit-debit)
