Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicação do código #1

Open
andermarce opened this issue Nov 23, 2020 · 3 comments
Open

Explicação do código #1

andermarce opened this issue Nov 23, 2020 · 3 comments

Comments

@andermarce
Copy link

Olá @pedrobergamini

existe algum documento explicativo do seu código ?
estou aprendendo a espeito mas tenho algumas dúvidas, por exemplo na linha 68:
const spread = Math.abs((priceSushiswap / priceUniswap - 1) * 100) - 0.6;

por que você usa -0,6 na fórmula ?

ficaria grato pela ajuda

@Downbeat-Interactive
Copy link

Downbeat-Interactive commented May 17, 2021

Hey @andermarce,

I'm not involved with this project at all, but My guess is that the -0,6 comes from the UniSwap and SushiSwap fees (0.3% each). So we want the profit spread to be more than 0.6%.

Jackson

@xale76
Copy link

xale76 commented Jun 4, 2021

anyway it's strange, this formula is based on 0-100 interval and I think it's compared in following rows with a 0-1 value interval.

@webhype
Copy link

webhype commented Sep 24, 2021

@xale76 I had the same exact observation, "spread" begins as a percentage (0 - 100) and later is used as a fraction (0.0 to 1.0). That seems to me a bug.

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

No branches or pull requests

4 participants