Skip to content

Instantly share code, notes, and snippets.

@askeluv
Created June 11, 2021 03:56
Show Gist options
  • Save askeluv/2beead41f16e7e2f56acc1139030dafc to your computer and use it in GitHub Desktop.
Save askeluv/2beead41f16e7e2f56acc1139030dafc to your computer and use it in GitHub Desktop.
SELECT SUM(CAST(value AS FLOAT64) / 1e18) AS dai
FROM `public-data-finance.crypto_polygon.token_transfers`
WHERE to_address = '0x5143e71982a2d5dc63a77f0a5611685cf13c5aaf' -- where DAI is sent in auctions
AND token_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' -- DAI
AND from_address != '0x3b7e9ea4bf300525ccbbc81c792b2bce7a13a2d6' -- exclude DAI from LP token
AND block_timestamp > '2021-06-09' -- save query costs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment