When issuing an invoice, I want to display the price in the local currency of the user.
First I need to get the price of CORE in USDT, a 5% daily deviation is acceptable.
Is there any smart contract on CORE (or any other network) that has that official and maintained onchain view function I could use ?
Alternatively, you can calculate the price from a DEX pair in Colend or other (e.g., CORE/USDT) using getReserves() from the liquidity pool. This approach can meet your 5% deviation tolerance but may be affected by low liquidity or price manipulation.
I looked into Pyth doc, and it wasn’t clear to me if it worked on any blockchain ( I am going to support TRX alongside CORE ).
It seems to me getReserves() is a more durable (and simpler) approach.