What you’ll need
- A mapping of the stablecoin contract addresses on the chains that you are interested in. We include popular stablecoins on major chains on a dedicated page.
- A basic understanding of SQL (optional but helpful); see the Turbo SQL reference.
- A destination sink to write your data to.
Examples
One stablecoin on one chain
The ERC-20 transfers datasets do a lot of the heavy lifting for us, indexing all token transfers for a given chain. Building stablecoin-specific streams is therefore a matter of filtering the data to only include transfers for the stablecoin contracts of interest, using a source-levelfilter.
Example pipeline for USDC transfers on Ethereum
address column, which may not be needed given there’s only one address in the filter. To remove it, add a transform that projects the columns you want:
Example pipeline for USDC transfers on Ethereum, with transform to remove address
Many stablecoins on one chain
This is similar to the example above, just using anin () filter to include multiple stablecoin contracts rather than only one.
Example pipeline for USDC, USDT, and DAI transfers on Ethereum
address column that can be used downstream to filter or aggregate on a specific stablecoin, though for ease of use you might prefer a transform that adds the stablecoin symbol as a column:
Example pipeline for USDC, USDT, and DAI transfers on Ethereum, adding symbols
One stablecoin on many chains
Streaming the same stablecoin on multiple chains uses multiple sources, one for each chain. Use a transform per chain to tag rows with a chain identifier, and write both to the same table:Example pipeline for USDC transfers on Ethereum and Base
The contract address for the same stablecoin usually differs between networks (as USDC does above); check the stablecoin addresses page. You may want to retain the
address column in the sink for better inspection.Many stablecoins on many chains
The most complex case combines all of the above in a single pipeline: anin () filter per source and CASE WHEN logic per transform to add both chain_name and symbol columns.
Example pipeline for USDC and USDT transfers on Ethereum and Base
Can’t find what you’re looking for? Reach out to us at support@goldsky.com for help.