> ## 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.

# Trades With Wash Trading Flags

> Our Wash Trading Flags are designed to detect wash trading activities on NFT marketplaces.

Our Wash Trading Flag is designed to detect wash trading activities on NFT marketplaces. It identifies multiple factors related to wash trading behaviour, assigns a score to each factor, and then computes a Wash Trading Score. Refer to our [NFT Wash Trading Documentation](https://docs.allium.so/historical-data/supported-blockchains/evm/ethereum/nfts/nft-trades/nft-wash-trading-flag) for more information. Contains additional tables on top of the NFT trades table. Refreshed daily.

### Table Details

| Property | Value |
| - | - |
| Table Name | `crosschain.nfts.trades_with_wash_trading_flags` |
| Table Status | Production-Ready |
| Unique Key | `transaction_hash`, `unique_id` |

> [!NOTE]
>
> Tables are refreshed daily across supported chains. `crosschain.nfts.trades_with_wash_trading_flags` reflects the latest per-chain build.

### Chain Coverage

| Table | Chains |
| - | - |
| `crosschain.nfts.trades_with_wash_trading_flags` | <details><summary>12 chains</summary>[Solana](https://docs.allium.so/historical-data/supported-blockchains/solana/solana/nfts/trades-with-wash-trading-flags.md), [Bitcoin](https://docs.allium.so/historical-data/supported-blockchains/bitcoin-ecosystem/bitcoin/nfts/trades-with-wash-trading-flags.md), [Abstract](https://docs.allium.so/historical-data/supported-blockchains/evm/abstract/nfts/trades-with-wash-trading-flags.md), [ApeChain](https://docs.allium.so/historical-data/supported-blockchains/evm/apechain/nfts/trades-with-wash-trading-flags.md), [Arbitrum](https://docs.allium.so/historical-data/supported-blockchains/evm/arbitrum/nfts/trades-with-wash-trading-flags.md), [B3 ◽](https://docs.allium.so/historical-data/supported-blockchains/evm/b3/nfts/trades-with-wash-trading-flags.md), [Base](https://docs.allium.so/historical-data/supported-blockchains/evm/base/nfts/trades-with-wash-trading-flags.md), [Berachain](https://docs.allium.so/historical-data/supported-blockchains/evm/berachain/nfts/trades-with-wash-trading-flags.md), [Ethereum](https://docs.allium.so/historical-data/supported-blockchains/evm/ethereum.md), [Polygon](https://docs.allium.so/historical-data/supported-blockchains/evm/polygon/nfts/trades-with-wash-trading-flags.md), [Ronin](https://docs.allium.so/historical-data/supported-blockchains/evm/ronin/nfts/trades-with-wash-trading-flags.md), [Zora](https://docs.allium.so/historical-data/supported-blockchains/evm/zora/nfts/trades-with-wash-trading-flags.md)</details> |
| `<chain>.nfts.trades_with_wash_trading_flags` | <details><summary>11 chains</summary>[Solana](https://docs.allium.so/historical-data/supported-blockchains/solana/solana/nfts/trades-with-wash-trading-flags.md), [Bitcoin](https://docs.allium.so/historical-data/supported-blockchains/bitcoin-ecosystem/bitcoin/nfts/trades-with-wash-trading-flags.md), [Abstract](https://docs.allium.so/historical-data/supported-blockchains/evm/abstract/nfts/trades-with-wash-trading-flags.md), [ApeChain](https://docs.allium.so/historical-data/supported-blockchains/evm/apechain/nfts/trades-with-wash-trading-flags.md), [Arbitrum](https://docs.allium.so/historical-data/supported-blockchains/evm/arbitrum/nfts/trades-with-wash-trading-flags.md), [B3 ◽](https://docs.allium.so/historical-data/supported-blockchains/evm/b3/nfts/trades-with-wash-trading-flags.md), [Base](https://docs.allium.so/historical-data/supported-blockchains/evm/base/nfts/trades-with-wash-trading-flags.md), [Berachain](https://docs.allium.so/historical-data/supported-blockchains/evm/berachain/nfts/trades-with-wash-trading-flags.md), [Polygon](https://docs.allium.so/historical-data/supported-blockchains/evm/polygon/nfts/trades-with-wash-trading-flags.md), [Ronin](https://docs.allium.so/historical-data/supported-blockchains/evm/ronin/nfts/trades-with-wash-trading-flags.md), [Zora](https://docs.allium.so/historical-data/supported-blockchains/evm/zora/nfts/trades-with-wash-trading-flags.md)</details> |

### Approach

Wash trading can be inferred through onchain movement of NFTs and funding patterns across different buyers and sellers.

We use various heuristics to flag potential wash trades, assign a score to each heuristic, and then compute a wash trading score based on the sum of these factors.

The output is then classified into different levels of wash trading ranging from `very low` to `very high`.

### Sample Query

Get a breakdown of NFT wash trading levels across all chains

```sql theme={null}
select
    date(block_timestamp) as date,
    chain,
    wash_trading_level,
    sum(usd_amount) as usd_volume
from crosschain.nfts.trades_with_wash_trading_flags
where block_timestamp >= current_timestamp - interval '30 days'
group by all
```

Get a granular, transaction-level breakdown of wash trading details incl. the funding wallets of traders, and the pattern of wash trading detected. These details can also be used to compute custom wash trading metrics.

```sql theme={null}
select
    chain,
    block_timestamp,
    transaction_hash,
    wash_trading_score,
    wash_trading_level,
    extra_fields:wash_trading_details as wash_trading_details,
    extra_fields:wash_trading_details:wash_trading_flags as wash_trading_flags,
    extra_fields:wash_trading_details:buyer_birth_funding_wallets as buyer_birth_funding_wallets,
    extra_fields:wash_trading_details:seller_birth_funding_wallets as seller_birth_funding_wallets
from crosschain.nfts.trades_with_wash_trading_flags
where block_timestamp >= current_timestamp - interval '1 days'
```

### Wash Trading Flags

| Flag Name | Weight | Description | Scope |
| - | - | - | - |
| buyer\_is\_seller | 4 | the buyer address is the same as the seller address | `EVM` `Bitcoin` `Solana` |
| instant\_refund | 4 | the majority of the purchase price of an NFT is returned by the seller, in the same transaction, to the buyer, or to the wallet that funded the buyer in the same transaction. Commonly occurs with flash loans. | `EVM` |
| traders\_first\_funded\_each\_other | 3 | one of the buyer’s first funders is the seller, and one of the seller’s first funders is the buyer | `EVM` `Bitcoin` `Solana` |
| back\_and\_forth\_token | 2 | the same NFT is traded between the same seller and buyer, within a specified time window | `EVM` `Bitcoin` `Solana` |
| back\_and\_forth\_collection | 1 | NFTs from the same collection are sold back and forth between the same seller and buyer, within a specified time window | `EVM` `Bitcoin` `Solana` |
| buyer\_funded\_seller\_recently | 1 | buyer funded seller within a specified time window from the point of a transaction | `EVM` `Bitcoin` `Solana` |
| seller\_funded\_buyer\_recently | 1 | seller funded buyer within a specified time window from the point of a transaction | `EVM` `Bitcoin` `Solana` |
| same\_nft\_traded | 1 | an address buys or sells the same NFT within a specified time window, an excessive number of times | `EVM (ERC-721 only)` `Bitcoin` `Solana` |
| same\_first\_native\_funder | 0.5 | buyer and seller share at least one overlapping first funder address | `EVM` `Bitcoin` `Solana` |
| same\_most\_frequent\_native\_funder | 0.25 | buyer and seller share at least one overlapping most frequent funder (based on funding transaction counts) | `EVM` `Solana` |
| trade\_transfer\_trade\_again | 0.25 | NFTs are traded, transferred and traded again between the same seller and buyer, within a specified time window | `EVM (ERC-721 only)` `Bitcoin` `Solana` |

### Wash Trading Level

`wash_trading_level` - The Wash Trading Level is derived from the Wash Trading Score, and is classified into different levels as follows:

* `very low` if wash\_trading\_score = 0

* `low` if wash\_trading\_score \<= 2

* `medium` if wash\_trading\_score \< 3

* `high` if wash\_trading\_score \<= 4

* `very high` if wash\_trading\_score > 4

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| chain | VARCHAR(9) | Slug identifying the blockchain this record belongs to (e.g. `ethereum`, `base`, `avalanche`, `solana`). In per-chain tables this is always the same value; in cross-chain tables it identifies which chain the row came from. |
| marketplace | VARCHAR(16777216) | Name of the NFT marketplace where this trade occurred (e.g. `opensea`, `blur`, `x2y2`, `looksrare`, `rarible`). |
| protocol | VARCHAR(16777216) | NFT marketplace contract or protocol used to settle this trade (e.g. `seaport`, `x2y2`, `blur`, `opensea`). Identifies the settlement mechanism, not the collection. |
| order\_match\_type | VARCHAR(16777216) | How the order was fulfilled. `BUY` for a direct purchase at list price; `ACCEPT_BID` for a seller accepting an existing bid. |
| trade\_type | VARCHAR(16777216) | Scope of the trade. `SINGLE_TRADE` for a single NFT, `BUNDLE_TRADE` when multiple NFTs are sold together in one transaction. |
| buyer\_address | VARCHAR(130) | Address of the buyer in this NFT trade. |
| seller\_address | VARCHAR(130) | Address of the seller in this NFT trade. |
| token\_standard | VARCHAR(16777216) | Token standard of the NFT. `erc721` for non-fungible tokens (unique IDs, balance 0 or 1), `erc1155` for semi-fungible tokens (multiple copies per ID). |
| token\_address | VARCHAR(44) | Contract address of the token. For EVM chains, native currency (e.g. ETH, MATIC) is represented as the zero address (0x0000000000000000000000000000000000000000). For Solana, this is the mint address. |
| token\_name | VARCHAR(16777216) | Full name of the token (e.g. "USD Coin", "Wrapped Ether"). |
| token\_symbol | VARCHAR(16777216) | Ticker symbol of the token (e.g. "USDC", "WETH"). |
| token\_id | VARCHAR(16777216) | Identifier for non-fungible tokens (ERC-721) or semi-fungible tokens (ERC-1155). Each unique token\_id within a collection represents a distinct asset. |
| item\_quantity | NUMBER(38,5) | Number of NFT items transferred in this trade. Always 1 for ERC-721; may be greater than 1 for ERC-1155 bundle trades. |
| currency\_address | VARCHAR(44) | Contract address of the currency used to pay for the NFT. Native currency (e.g. ETH) is represented as the zero address. |
| currency\_symbol | VARCHAR(16777216) | Symbol of the currency used to pay for the NFT (e.g. `ETH`, `WETH`, `USDC`). |
| raw\_price | VARCHAR(16777216) | Price paid for the NFT in the currency's smallest unit (not decimal-adjusted). |
| price | FLOAT | Price per unit of the asset at the time of this event, in USD or in the quote token's units depending on context. |
| usd\_price | FLOAT | USD value of the NFT trade at the time of the transaction. |
| agg\_fees | VARIANT | The aggregate fees of the trade. |
| buyer\_fees | VARIANT | The fees paid by the buyer. |
| seller\_fees | VARIANT | The fees paid by the seller. |
| aggregator\_name | VARCHAR(16777216) | Name of the aggregator used to route the trade (e.g. `gem`, `blur_aggregator`, `reservoir`). Null or empty if the trade was placed directly on the marketplace. |
| aggregator\_address | VARCHAR(16777216) | Contract address of the aggregator used for the trade. Null if no aggregator was involved. |
| transaction\_hash | VARCHAR(88) | Hash of the transaction that produced this record. Uniquely identifies a transaction within the blockchain. Can be null for rows that no transaction creates, such as beacon chain withdrawals or block rewards. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the block in which this event was confirmed. |
| block\_number | NUMBER(38,0) | Sequential number of the block that contains this record. Starts at 0 (genesis block) and increments by 1 for each new block. |
| block\_hash | VARCHAR(66) | Cryptographic hash of the block header that contains this record. Uniquely identifies a block. |
| unique\_id | VARCHAR(16777216) | Allium's deterministic unique identifier for this row. Generated from the fields that uniquely identify the record (e.g. transaction hash + log index). Stable across full refreshes. |
| wash\_trading\_score | NUMBER(15,2) | Wash trading score calculated with behaviours-related to wash trading. |
| wash\_trading\_level | VARCHAR(16777216) | Wash trading level, bucketed from `wash_trading_score`: `very_low` (score 0), `low` (above 0, up to 2), `medium` (above 2, below 3), `high` (3 to 4) and `very_high` (above 4). |
| extra\_fields | VARIANT | JSON object containing additional fields from the onchain event that are not part of the standard schema (e.g. nonce, fee metadata, protocol-specific parameters). |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp (UTC) when this row was first written to the Allium platform. Set once on insert and never changed. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the most recent update to this row in the Allium platform. Advances when the row is reprocessed or enriched (e.g. USD price hydration). |
| \_upstream\_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the most recent update to the upstream model that feeds this record. |
| \_changed\_since\_full\_refresh | BOOLEAN | Flag indicating whether this row was created or modified after the last full refresh of the model. Useful for identifying recently added or updated records in incremental processing. Same concept as `_change_since_full_refresh` — the column name varies by model generation. |
| collection\_id | VARCHAR(16777216) | ID of the NFT collection. |
| token\_metadata | VARCHAR(44) | Address of the token metadata account. |
| is\_cnft | BOOLEAN | Where the trade is for a compressed NFT(cNFT) |
| merkle\_tree | VARCHAR(44) | Address of the merkle tree for a cNFT |
| leaf\_index | NUMBER(38,0) | Leaf index of the asset for a cNFT |
| asset\_id | VARCHAR(44) | Identifier for an asset. On Stellar, this is the `issuer:code` composite identifier for non-native assets. On other chains, may be a contract address or other unique key. |
| signer | VARCHAR(44) | Primary signing account (fee payer) of the transaction. This is the account that authorized the transaction and paid transaction fees. |
| block\_height | NUMBER(38,0) | Number of confirmed blocks between this block and the genesis block (inclusive). Unlike `block_slot`, this only increments for slots that produced a block. |
| txn\_index | NUMBER(38,0) | Zero-based position of this transaction within its slot. |
| instruction\_index | NUMBER(38,0) | Zero-based position of this instruction within the transaction's top-level instructions array. |
| inner\_instruction\_index | NUMBER(38,0) | Zero-based position of this inner instruction within its parent instruction's inner instructions array. -1 for top-level instructions that are not inner instructions. |
| outer\_program\_id | VARCHAR(44) | Program ID of the outermost instruction that invoked this inner instruction on Solana |
| \_nft\_recipient | VARCHAR(130) | Internal column tracking the final NFT recipient address after all transfer hops in a trade settlement. |
| \_sales\_proceeds\_recipient | VARCHAR(130) | Internal column tracking the address that ultimately received the sales proceeds (may differ from seller if royalties or splits apply). |
| raw\_sales\_proceeds | VARCHAR(16777216) | Sales proceeds in the payment token's smallest unit (not decimal-adjusted). |
| sales\_proceeds | FLOAT | Sales proceeds decimal-adjusted to the payment token's human-readable unit. |
| usd\_sales\_proceeds | FLOAT | USD value of the sales proceeds at the time of the trade. |
| inscription\_id | VARCHAR(73) | ID of the inscription. |
| inscription\_name | VARCHAR(16777216) | Human-readable name of the inscription (e.g. for Ordinals or similar protocols). |
| inscription\_number | VARCHAR(16777216) | Ordinal inscription number assigned at time of inscription. Lower numbers are earlier inscriptions. |
| content\_type | VARCHAR(16777216) | MIME type of the inscription content (e.g. `text/plain`, `image/png`, `application/json`). |
| content\_tag | VARCHAR(16777216) | High-level content category tag for the inscription (e.g. `image`, `text`, `brc20`, `domain`). |
| content\_length | NUMBER(38,0) | Byte length of the inscription content. |
| content\_protocol | VARCHAR(16777216) | Protocol under which this inscription was created (e.g. `ordinals`, `brc20`, `runes`). |
| content\_parsed | VARIANT | Parsed content of the inscription as a JSON object, for structured protocols like BRC-20 or domain registrations. |
| is\_brc20 | BOOLEAN | True if this inscription follows the BRC-20 fungible token standard. |
| is\_token | BOOLEAN | True if this inscription represents a fungible token (BRC-20 or similar). |
| token\_tick | VARCHAR(16777216) | Ticker symbol of the BRC-20 token inscribed (e.g. `ordi`, `sats`). |
| token\_amt | VARCHAR(16777216) | Amount of BRC-20 tokens transferred or minted in this inscription operation. |
| sats\_per\_token\_tick | VARCHAR(16777216) | Price in satoshis per unit of this BRC-20 token at the time of the trade. |
| usd\_per\_token\_tick | FLOAT | USD price per unit of this BRC-20 token at the time of the trade. |
| domain\_protocol | VARCHAR(16777216) | Protocol under which this domain name was registered (e.g. `ens`, `.sats`, `.bitmap`). |
| domain\_name | VARCHAR(16777216) | The domain name string registered in this inscription. |
| domain\_namespace | VARCHAR(16777216) | Top-level namespace of the domain (e.g. `.eth`, `.sats`, `.bitmap`). |
| domain\_valid | BOOLEAN | True if this domain registration is valid per the protocol's rules. |
| domain\_meta | VARCHAR(16777216) | JSON metadata attached to this domain registration (resolver, TTL, records). |
| is\_domain | BOOLEAN | True if this inscription is a domain name registration. |
| sat\_types | VARIANT | Array of satoshi type classifications for the sats in this UTXO (e.g. `uncommon`, `rare`, `epic`). |
| sat\_types\_amounts | VARIANT | Array of amounts corresponding to each sat type in `sat_types`. |
| is\_rune | BOOLEAN | True if this transaction involves a Runes protocol transfer or etching. |
| rune\_id | VARCHAR(16777216) | Canonical identifier for a Rune, formatted as \<block\_height>:\<tx\_index> (e.g. 840000:3). |
| rune\_symbol | VARCHAR(16777216) | Unicode symbol character assigned to this Rune at etching time. |
| spaced\_rune | VARCHAR(16777216) | Human-readable Rune name with spacers inserted at configured positions (e.g. UNCOMMON•GOODS). |
| raw\_rune\_amount | VARCHAR(16777216) | Amount of Runes transferred, in the Rune's smallest divisible unit. |
| rune\_amount | FLOAT | Rune amount decimal-adjusted by the Rune's divisibility. |
| sats\_per\_rune | VARCHAR(16777216) | Price in satoshis per unit of this Rune at the time of trade. |
| usd\_per\_rune | FLOAT | USD price per unit of this Rune at the time of trade. |
| rune\_number | VARCHAR(16777216) | Sequential integer assigned to this Rune in the order it was etched, starting from 0. |
| etching\_block\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp of the block in which this Rune was etched (created). |
| genesis\_fee | NUMBER(38,0) | Fee paid in satoshis to etch (create) this Rune or inscription. |
| satoshi\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp encoded in the satoshi's ordinal number, representing when this sat was mined. |
