0

I am trying to wrap my head around. I understand the concept of x*y=k vol. when we are calculating this we can get the price but there’s also an exchange price, say eth. That means the pool will have 2 eth prices (?) one from the pool, one from the cex. Do we assume that there’s always arbitrage? If so, why do examples always pull in external prices?

1
  • Which examples?
    – kfx
    May 24, 2022 at 14:03

1 Answer 1

0

It just depends on what you're trying to do. A lot of time you can just use the pool price as your oracle, but there are some issues if you don't use a twap (flash loans) and even if you do, you need a lot of liquidity or you'll be subject to manipulation. If the majority of the liquidity is on a cex however, it makes it much more robust to just grab price. Of course, then you may have oracle risk, but its really a design decision you'll have to make in your smart contracts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.