Comments (3)
"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"
Maybe?
from uni-sushi-flashloaner.
I really don't understand this:
const spread = Math.abs((priceSushiswap / priceUniswap - 1) * 100) - 0.6;
const shouldTrade = spread > (
(shouldStartEth ? ETH_TRADE : DAI_TRADE)
/ Number(
ethers.utils.formatEther(uniswapReserves[shouldStartEth ? 1 : 0]),
));
- spread is in percentage, right?
- why in shouldTrade formula, we divide ETH_TRADE for DAI reserves (if shouldStartEth is true) and we divide DAI_TRADE for ETH reserve elsewhere?
please help
from uni-sushi-flashloaner.
@xale76 had the same question as well.... not sure what the relationship between spread and the calculation. It seems that we should trade if the ratio of the ETH_TRADE (or DAI_TRADE) in to the reserve in uniswap is less than the spread. But then that spread comparison seems arbitrary.
- so spread = ratio of price difference
- should trade = ratio of price difference > ratio of ETH_TRADE / uniswap ETH reserve
yea, i guess i'm not seeing this connection.
from uni-sushi-flashloaner.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uni-sushi-flashloaner.