ntropika-labs / potion-protocol

2 stars 3 forks source link

BUG(potion-dapp): Buy potion reverts with invalid strike in development #82

Closed RazorSiM closed 2 years ago

RazorSiM commented 2 years ago

We use Coingecko apis to fetch prices for the underlying assets. Locally, we fixed the price to be 1300$ for all the underlying, but the price is different on chain. This means that you can actually pass a wrong strike price if oracle and hardcoded prices are not the same.

I suggest retrieving prices from oracles, at least for the Buyer side of the app.

RazorSiM commented 2 years ago

It's solved. Coingecko is now mocked to use oracle prices in localhost/testnets