solana.assets.balance_changes is a view that consolidates balances changes per transaction, and tries to attribute it to the counterparties contributing to each balance change, by joining with the solana.assets.transfers. Each row represents a change in balance of a party in the transaction.
This view has been deprecated due to suboptimal performance. Please use
solana.udfs.sql_table_solana_get_balance_change_attribution from convenience functions, which produces an equivalent table.solana.assets.transfers table. This results in balance changes not/partially attributed to counterparties.
We will attempt to surface more invisible sol transfers and improve the attribution of counterparties, this is work in progress.
Table Columns
| Column | Description | Type | Example |
|---|---|---|---|
| type | The type of balance change. Current available types:sol_transfer - a sol transferspl_transfer - a spl transfer between 2 existing token accountsnew_spl_account - creation of a new a spl token account with non-zero balancespl_changed_owner - transfer of ownership of a token account, and thus its balance | varchar | sol_transfer |
| address | Address of the balance change | varchar | DxbwEA8LNprJpsoArgE9gLx5cbrY64pvaiaQLJC4Ng1w |
| token_account | Token account of the balance change, only available for an spl token account | varchar | 5bWabVkoTkv617PFRX2VwLEmJREGxnP5GLUbPGvWu49g |
| mint | Mint of the balance change | varchar | So11111111111111111111111111111111111111112 |
| symbol | Symbol of the token | varchar | SOL |
| decimals | Decimals of the token | number | 6 |
| pre_tx_balance | Balance at the start of the transaction | varchar | 624361102 |
| post_tx_balance | Balance at the end of the transaction | varchar | 8069719271 |
| tx_balance_change | Change in balance for the transaction, calculated by post_tx_balance - pre_tx_balance | varchar | 7445358169 |
| transfers_raw_amount_sum | The sum of the transfers in/out of the address/account, extracted from the solana.assets.transfers table | varchar | 12500 |
| transfers_counterparties | The list of counterparties of all transfers of the address/account | variant | [ "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"] |
| agg_transfers_details | Details about the transfers to/from the address/account | variant | [ {"counterparty_address": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue","raw_amount": 1.000000000000000e+00 }] |
| is_attribution_complete | Reflects if the total balance change can be attributed to known transfers extracted from solana.assets.transfers | boolean | true |
| block_slot | Block slot of the transfer | varchar | 190,430,409 |
| block_height | Block height of the transfer | number | 173,371,181 |
| block_timestamp | Block timestamp of the transfer | timestamp_ntz | 2023-04-25 15:55:07 |
| block_hash | Block hash of the transfer | varchar | 8cAnWkjiy7VENBH3h1pN2rFQJLJsujB87bTcfYJNnvtD |
| txn_id | Transaction ID of the transfer | varchar | 4iMB9gP6nf5atgDpofK9hUkBiqiLBxqtocMc64vHBwZvR8iJiuyBdcvaHBwCxk5W1szK9jFFo3XwsSZ2APdPo6Um |
| txn_index | Transaction Index of the transfer | number | 1,011 |
| unique_id | Unique id of the transfer | varchar | txn_id-4iMB9gP6nf5atgDpofK9hUkBiqiLBxqtocMc64vHBwZvR8iJiuyBdcvaHBwCxk5W1szK9jFFo3XwsSZ2APdPo6Um_i_index-2_ii_index-0 |