📖
Flipside-Wiki
  • Welcome to Flipside-Wiki
  • Information
    • Public Flipside Links
      • Twitter
      • Discord
      • YouTube
      • SQL-Models
      • Github
    • Flipside Official Documentation
    • Flipside Database Status
    • Flipside Power Tools
    • External Guides
    • Flipside Query Tips and Tricks
      • Export To AWS Bucket
    • Flipside Vouches and Thanks
    • Kida's Bounty Payments
  • Bounties
    • AAVE
    • Abracadabra
    • Apollo
      • QUERY - StrategyID to Name
    • Algorand
      • QUESTIONS - Payouts
      • QUERY - Random
      • NOTES - Yieldly
      • NOTES - Swap + Escrow
      • NOTES - Bootstrap
      • NOTES - Old Txs
      • TUTORIAL - ASA Buy/Sell
    • Anchor
      • AVAX - Anchor
      • QUERY - Liquidations
      • QUESTIONS - Payout
      • DASHBOARDS - Best
      • DASHBOARD - Anchor Interest Rate
      • PROJECTS - that use Anchor
    • Angel Protocol
    • Astroport
    • ConstitutionDAO
      • QUESTIONS - Payout
    • Defi Kingdoms
      • CONTRACTS - Harmony
      • BOUNTY - Link
      • MISC - Transactions To Track
      • MISC - Taxable Events
      • MISC - ONE to 0x Conversion
      • MISC - Dev FAQ
      • WEBSITE - https://dfk-report.vercel.app ( built by me )
      • WEBSITE - DFK Dev Community
    • ENS
    • Friends With Benefits
    • Katana
    • MakerDAO
    • Mars Protocol
    • Mirror
      • QUERY - Starter
    • Olympus DAO
      • OHM - 3,3 PoolTogether
    • Orbs
    • Orion Money
    • Paraswap
    • Polygon
    • Rari Fuse
    • Ribbon
    • Solana
      • HINT - Swaps
      • DATA - Transfers
      • QUERY - CEX
      • Data - Tokens
    • Stader
    • SushiSwap
      • QUESTIONS - Payout
      • Query - Random
      • QUERY - Using Sync Events
      • DOCS - Uniswap
    • Terra
      • QUESTIONS - Payout
      • QUERY - Validators
      • QUERY - Addresses
      • QUERY - NFT Contract Addresses
      • QUESTION - msgs vs msg_events
      • NFT - Marketplaces
    • Terraswap
    • Terra - Galactic Punks
      • MISC - Transactions
    • Terra - Knowhere
      • QUERY - Sales
      • STRUCT - Collection Addresses
    • Terra - Levana Dragons
      • QUERY - Dust
      • QUERY - Eggs
      • QUERY - Meteors
      • GOOGLEDOC - LVN Starters
    • Terra - Loopr
      • QUERY - Liquidity Pools
    • Terra - Random Earth
      • QUERY - Sales
      • STRUCT - Collection Addresses
    • Terra - Talis
    • Terra - Wormhole
      • STRUCT - VAA_Data
      • QUERY - VAA_DECODEING
      • TOOL - Python Decoder
      • QUERY - Tokens
      • Query - Movement Into Terra
      • QUERY - Movement Out of Terra
    • THORChain
      • QUESTIONS - Payout
      • QUERY - RaiseTheCaps
      • QUERY - Daily Active Validator Count
    • Uniswap
      • QUESTIONS - Payout
    • Valkyrie Protocol
    • Visor - Gamma
      • QUERY - Contracts
  • Massnomis Guides
    • Guides
      • 12 Dec 2021
      • 21 Nov 2021
      • 15 Nov 2021
      • 07 Nov 2021
      • MID OCTOBER 2021
      • EARLY OCTOBER 2021
      • SEPTEMBER 17 2021
      • LATE AUGUST 2021
      • MID AUGUST 2021
      • AUGUST 6 2021
      • JULY 30 2021
      • JULY 23 2021
      • JULY 16 2021
      • JULY 9 2021
      • JULY 1 2021
    • Links
  • Testing Area
    • Image Upload Test
    • Luna Breakdown
Powered by GitBook
On this page
Edit on GitHub
  1. Bounties
  2. Solana

HINT - Swaps

Swaps are in the event_type transfer, there is no reason to do it DEX by DEX. That's the super long way to do it. There is a pattern in the postTokenBalances field that will allow you to identify if the transfer is a swap or not.

Basically, the postTokenBalances has to have at least two entries and a certain field in the first and last entry of this array shouldn't match

A majority of Solana transfers are not swaps, there are 3.6 million swaps in our data since Jan. 28th.

Also adding extra guidance: There is a way to do it by looking at postTokenBalances.

Basically postTokenBalances only appears for in the Solana events table with event_type = 'transfer' in two scenarios.

One is a swap and the other is when a token that isn't Solana is being transferred (ex. a transfer of ORCA or KIN between wallets).

In a swap, the field "mint" will be different in different indices of the postTokenBalance array.

PreviousSolanaNextDATA - Transfers

Last updated 3 years ago