osmosis-labs / osmosis

The AMM Laboratory
https://app.osmosis.zone
Apache License 2.0
892 stars 593 forks source link

feat: publish spot price for token swap event (backport #8780) #8783

Closed mergify[bot] closed 1 month ago

mergify[bot] commented 1 month ago

This commit resolves the issue where the priceNative data published to Dexscreener occasionally displayed incorrect values due to potential rounding errors. Instead of relying on the token in/out amounts from the token_swapped event to determine the priceNative value, this commit utilizes on-chain spot price data. This data will be published to the indexer backend and made available through the /events endpoint.


This is an automatic backport of pull request #8780 done by Mergify.