Ethereum token quotes using 'Dextrades' query - how acccurate?

Hello again,

I am struggling to determine how historic quotes are calculated using the Bitquery graph.

Take for example, a quote of token “SAFU” in WBNB at txHash 0x6c26d2e320739be9022d8454fbdc68346e3a86c82224d0bd5c8b4ccb1ac2f3ab

{
  ethereum(network: bsc) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 1}
      exchangeName: {in: ["Pancake v2"]}
      baseCurrency: {is: "0x2eba09fb8063aedba27424de9bf0dcb41567a943"}
      quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      txHash: {is: "0x6c26d2e320739be9022d8454fbdc68346e3a86c82224d0bd5c8b4ccb1ac2f3ab"}
    ) {
      transaction {
        hash
      }
      tradeIndex
      smartContract {
        address {
          address
        }
        contractType
        currency {
          name
        }
      }
      tradeIndex
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
          unixtime
        }
        height
      }
      baseCurrency {
        symbol
        address
      }
      quoteCurrency {
        symbol
        address
      }
      quotePrice
    }
  }
}

The result returned is 4.726269578406308e-16

However, if I look at the bscscan logs for this transaction and manually adjust the “Sync” reserve amounts to their pre-Swap equivalents, the calculated result is 4.7578e-16 (0.000000000000000475780) which is close, but not the same as the Bitquery result.

This can be confirmed by looking at the previous transaction and dividing the reserves in the sync event (reserve1 / reserve0 = 4.7578e-16):

Which result is the correct one, and am I missing something fundamental in deriving the token value using the sync/swap method above?

Many thanks!

The txHash used in the GraphQL query and txHash used in the above link are different. If you check for the txHash used by you in the above query i.e.

So, if you check for “sync” reserve the (reserve1 / reserve0 = 4.7184781e-16) which is near to 4.726269578406308e-16 (the value returned by the GraphQL query for the txHash 0x6c26d2e320739be9022d8454fbdc68346e3a86c82224d0bd5c8b4ccb1ac2f3ab)

Thanks for the reply @sayon. I had understood that the “sync” event on that transaction was the token price after the sell (what the next person will buy it at). Which is why referenced that other transaction below to show what the reserves were before the txhash in my bitquery query. But you are right, those amount are very similar if just dividing the WBNB by the token amount on that txhash, That would indicate what the price is after the token sell in that transaction right? Also, any idea why the amounts still differ in your example? Thanks!