Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

getTokenToTokenPrice #29

Open
deacix opened this issue May 5, 2019 · 2 comments
Open

getTokenToTokenPrice #29

deacix opened this issue May 5, 2019 · 2 comments

Comments

@deacix
Copy link

deacix commented May 5, 2019

Hi everyone!

What about the idea to extend the exchange contract with

getTokenToTokenPrice

function?

The problem is, that if i try to get price for token to token i have to use:

getEthToTokenInputPrice
and
getTokenToEthInputPrice

that means the fees would be charged twice, but in the function getTokenToTokenPrice only once..

@OliverNChalk
Copy link

I'm fairly certain that tokenToToken charges the fees twice (each reserve takes a 0.3% cut). Also, if this is on the front-end, is it not possible to simply call tokenToToken and observe the tokens returned to get the price?

@msujithk
Copy link

msujithk commented Aug 5, 2020

get_eth_token_input_price looks into the token exchange contract and does the price calculation based on the token balance. When i see the pool balance sat ETH-DAI in uniswap portal, amount of DAI is diffrent from the number amount in DAI exchange contract which is taken into consideration. Can you guys please give me more info on this. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants