MultiversX Tracker is Live!

How do I calculate the prices?

Etherum Reddit

More / Etherum Reddit 493 Views

I am a developer trying to learn blockchain programming and I am getting a bit stucked when dealing to prices.

I have developed an app that swaps eth for dai in ropsten network using uniswap, but when I get to check the price of eth in dai I get a strange value, 95.9...

Is it beacuse I am in Ropsten teste Network? I can't manage to figure out if it is because of that or If i am doing my calculations wrong, so I'd appreciate any help you guys could give me. The actual line where I check the price of 1 ether in dai goes like this (node.js):

await exchangeContract.methods.getEthToTokenInputPrice(web3.utils.toWei('1', 'Ether')).call()

Thank you everybody!

submitted by /u/ApolloJackson
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments