Swap Pairs on Optimism

    Q 107. Create a document that includes all addresses for all swap pairs for Sushiswap on Optimism plus the addresses of the two tokens belonging to each pair.

    Methodology :


    1.off-chain investigation :

    To find Swap Pairs, I first went to Sushiswap Contracts on Optimism :

    ConstantProductPoolFactory : 0x93395129bd3fcf49d95730D3C2737c17990fF328 which manage to create pairs pools contracts

    TridentRouter : 0xbE811A0D44E2553d25d11CB8DC0d3F0D0E6430E6 which manage swap transactions

    But none of them have information or events or signatures about created pairs. To create a Swap Pair, a Multicall interaction is performed with the TridentRouter contract, which doesn’t contains an EVENT that can be distinguished from other transactions, also is recorded in the Flipside database in the same way. so I went to the api data at


    Analytics.sushi.com has an api for Swap Pairs on Arbitrum: here , also for polygon here but there is nothing for Optimism, then I went to Sushi.com to see how it gets information about swap pairs and pools.


    Suhiswap receives information about pools and swap pairs in Optimism from a subgraph at api.thegraph.com/subgraphs/name/olastenberg/trident-optimism/graphql

    Through this api you can get information about pools, User Liqudities. In this way, I was able to obtain direct SwapPairs.

    so first i export liquidityPositions with this query from the api :

    query MyQuery {liquidityPositions { pool { id assets { token { name symbol id decimals } } } } }

    which put out user created pools with pool-address, pair-address and symbol and decimals in Json format.

    then export same date from pools table from the api graph and combine both and remove the duplicate pools by pool-address.

    then convert the result Json to CSV table and finally result can be access :

    1. here :

      and

    2. here :

    Tables Contains

    Pair Pool AddressToken1 - AddressToken1 - NameToken1 - SymbolToken1 - DecimalsToken2 - AddressToken2 - NameToken2 - SymbolToken2 - Decimals

    i added the table end of current Dashboard.

    db_img

    2.on-chain investigation :

    Considering that the Optimism table was recently added to Flipside, it is not possible to find information about past transactions and information about Sushi contracts.

    However, data can be obtained from the TridentRouter contract using the optimism.core.fact_event_logs table.

    below table contains swaps between 2 tokens via Sushiswap, obtained through this table.

    Loading...
    Pair Pool AddressToken1 - AddressToken1 - NameToken1 - SymbolToken1 - DecimalsToken2 - AddressToken2 - NameToken2 - SymbolToken2 - Decimals
    0x0671e74a25e6fe7e26bc3c28505776c5577b17290x1318811b1c6aed9c48623adb1ee22f81c6c6f876DC TokenDC60x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x0e736045cf438d813848ffd7c9f1443dac3e2a3d0x4200000000000000000000000000000000000042OptimismOP180x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9Synth sUSDsUSD18
    0x10961429dd786abe0fcf427a72397416142aeb0f0x4200000000000000000000000000000000000006Wrapped EtherWETH180x4200000000000000000000000000000000000042OptimismOP18
    0x1124b8598ca69f8e3448001bfb120bfeb759e1b50x4200000000000000000000000000000000000006Wrapped EtherWETH180x9bcef72be871e61ed4fbbc7630889bee758eb81dRocket Pool ETHrETH18
    0x11b072c5259ebd68e888a79c49bfff0bcf7429830x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x19847400661159f297cbef8a6fe567dd89a44bed0x4200000000000000000000000000000000000006Wrapped EtherWETH180x68f180fcce6836688e9084f035309e29bf0a2095Wrapped BTCWBTC8
    0x1b67c104240478a98c7a5dfaec5dd4817c12f0140x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x1c06a7ba4874b161fc7e72faa579f21837bdfe330x4200000000000000000000000000000000000006Wrapped EtherWETH180xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0x1e31a2c6e6614273d740358affb46bef180efb7b0x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x1ffa8f0e0d11f0d0aefb155c54bd5b02573d3a5f0x4200000000000000000000000000000000000006Wrapped EtherWETH180xe265fc71d45fd791c9ebf3ee0a53fbb220eb8f75DubaiDevsDAODDD18
    0x249c5a2b55522295500848910550d0539e1d673d0x4200000000000000000000000000000000000006Wrapped EtherWETH180xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0x2e93fd0ce9e14798c1968ffe2a0501babe9e2f1b0x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC60xe649951f6e18492fca574d6113bbf446269312eeUS TokenUS6
    0x37ae52069d199ea473dde0cb5f41b07aac937dd90x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x3a7ba3048fb3287051f6cb3df64233f13558132c0x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x3b3fadbbb82530408ec67a9f3a314b51b5b655740x4200000000000000000000000000000000000042OptimismOP180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x3e096286ffd113c51cde56f22361a6849f67a0f10x4200000000000000000000000000000000000006Wrapped EtherWETH180x94b008aa00579c1307b0ef2c499ad98a8ce58e58Tether USDUSDT6
    0x3e87635b7bf86e62991c1bf2867150eee0c0d65a0x0994206dfe8de6ec6920ff4d779b0d950605fb53Curve DAO TokenCRV180x4200000000000000000000000000000000000006Wrapped EtherWETH18
    0x3ef81036e45743dc31bee5a3fcdb226bb1b0aa4f0x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC60xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0x421bf64e342429992f6ce7c7e5c6a4db6993b7320x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x5231c20af03fd827005e652afee1b6576589f9680x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC60xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0x5f46f0f03db438459d4cdafb61826061a93504fc0x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC60x94b008aa00579c1307b0ef2c499ad98a8ce58e58Tether USDUSDT6
    0x611165b083e5f3cf1c64b9064cc9e14e0d8b4d990x1eba7a6a72c894026cd654ac5cdcf83a46445b08GitcoinGTC180x4200000000000000000000000000000000000042OptimismOP18
    0x67a381d449750056f3250c73161da1365dce87810x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC60xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0x6ded0b6ddaeb335bf40c09b235f8dfdd13bcfb750x4200000000000000000000000000000000000006Wrapped EtherWETH180x6f620ec89b8479e97a6985792d0c64f237566746WePiggy CoinWPC18
    0x7086622e6db990385b102d79cb1218947fb549a90x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x7170bd6f5ab1ac44a1ba7a0beb5f3f06c2d4a8980x4200000000000000000000000000000000000006Wrapped EtherWETH180x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9Synth sUSDsUSD18
    0x7559aa3c295cb0db37c1d5780de3d3f865d951310x94b008aa00579c1307b0ef2c499ad98a8ce58e58Tether USDUSDT60xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0x7f17b33e19ab6379de525073f95519d8ddebfd020x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x8c02104f6f5c60957318455cdc2c5e7db207ae470x4200000000000000000000000000000000000042OptimismOP180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0x90a521471aec7064480a3be8be1e5738b1a6ea900x4200000000000000000000000000000000000042OptimismOP180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0xaa1513ab4622ed52deee4bd2cd984fe52f336a630x4200000000000000000000000000000000000006Wrapped EtherWETH180x4200000000000000000000000000000000000042OptimismOP18
    0xae8bf5a9ca4e980637526ba1e5b68462d3880d490x4200000000000000000000000000000000000006Wrapped EtherWETH180x4200000000000000000000000000000000000042OptimismOP18
    0xc3fafa11dc8555d1404e7a1046019ff892bda2b70x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0xca84824e30ac61a5c450791a87f34f64bfd2c15c0x3c8b650257cfb5f272f799f5e2b4e65093a11a05VelodromeVELO180x4200000000000000000000000000000000000006Wrapped EtherWETH18
    0xcfbf5dfb210248965a83be57c0af34b07c934a750x4200000000000000000000000000000000000042OptimismOP180xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0xf5484ad6c3a69c0ff33dfed4fdf5a4c7eea136340x4200000000000000000000000000000000000006Wrapped EtherWETH180x7f5c764cbc14f9669b88837ca1490cca17c31607USD CoinUSDC6
    0xf981045e20949b1884c0f19ab4d5dc700b4cd6ca0x3f56e0c36d275367b8c502090edf38289b3dea0dQiDaoQI180x4200000000000000000000000000000000000042OptimismOP18
    0xfda7269b90fa2e291026c5e7e31393a58338d0de0x8700daec35af8ff88c16bdf0418774cb3d7599b4Synthetix Network TokenSNX180xda10009cbd5d07dd0cecc66161fc93d7c9000da1Dai StablecoinDAI18
    0x7e37d29074e76583a2c94c1170c0ef7719f8b3b80x4200000000000000000000000000000000000042OptimismOP180x8700daec35af8ff88c16bdf0418774cb3d7599b4Synthetix Network TokenSNX18

    Sushiswap Swap Pairs on Optimism Tabel