<aside> 💡 Welcome aboard! You’ve landed on one of our evergreen education bounties - open for everyone at anytime.
</aside>
This particular SQL guide focuses on the solana.core.fact_swaps table. We take you on a step by step journey to look at the volume of SOL swapped to token X (USDC in this guide) and the net token flow of SOL-TokenX.
During this guide, we will be focusing on Orca Protocol - a “human-centered” DEX on Solana that is “designed for people, not programs.” You can interact with Orca Protocol here: https://www.orca.so/ or read up it's docs here: https://orca-so.medium.com/
At the end of this guide, we’ve included a challenge for you to apply what you’ve learnt to compare SOL-USDC token flow on Orca and Jupiter. The estimated time to go through this guide is 30 minutes - 1 hour.
Let’s get started and navigate to the solana.core.fact_swaps table on https://app.flipsidecrypto.com/velocity.
Once there, we can select “preview” to display 10 rows of results for that particular table. The preview will resemble:
SWAP_PROGRAM
indicates the DEX that was used.BLOCK_TIMESTAMP
indicates the time the transaction occurred. The timezone here is UTC+0BLOCK_ID
indicates the height of the blockTX_ID
is the unique transaction ID for that transaction. We can look up transaction IDs on https://solscan.io/ to verify themSUCCEEDED
informs us if the transaction was successful or notSWAPPER
informs us who initiated the transactionSWAP_FROM_AMOUNT
informs us the amount of token being swappedSWAP_FROM_MINT
informs us the token address of the token being swappedSWAP_TO_AMOUNT
informs us the amount of token being swapped for