0

Trying to make a ecosystem where you have two tokens (Token X, Token Y) Token X can be minted for $1 worth of Token Y burned. And Token X can be redeemed for $1 worth of Token Y. How would I do this in solidity without using a data feed like chainlink? I'm a horrible coder so advice would be appreciated lol.

1 Answer 1

0

If you plan to take the token outside your solidity project's world, there is no way of getting the price of the token without using an oracle service.

2
  • What if I used a twap over like a minute Jul 26, 2022 at 4:45
  • I am not sure whether that can be very successful. Go through the failures of all algorithmic stable coins in existence to understand what not to do. I am no expert to comment further on it. Just know that oracle would give you the accurate value that you need when dealing with financial stuff.
    – AoS
    Jul 26, 2022 at 5:05

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.