Comments (8)
Ok, I managed to deploy my own node with 20ms in the US East region. I updated the code as well.
The bsc push NewBlockHead timestamp is seconds, how to measure the node delay using milliseconds? Like you say 20ms.
from uniswap-arbitrage-flash-swap.
you had better have another measuring about the time intervals between your NewBlockHead data's timestamp and the raw startfunction transaction is mined by validator nodes. Even if you optimize the execution time of check function < 10ms, there also are so much fails. If you look into this fail transaction, you'll find that the transaction block number often fall behind NewBlockHead data block number 1~3 blocks.
from uniswap-arbitrage-flash-swap.
simply use all all of them
- for light client you can pick every vserver < 2 USD / EUR; latency ~500ms, there is no need for bigger hardware. its still the fastest as new blocks are getting here at first
- quicknode, chainstack have lowest latency of execution < 100ms, but getting notified later for new blocks
- region: german / usa for hosting
i am never running into "e00: out of block" every transaction only takes 1-2 blocks. you can higher the "block.number + 2", but normally its too late.
from uniswap-arbitrage-flash-swap.
.... and feel free to remove estimateGas
and replace it with a fixed value. this line takes normally its time ;)
estimateGas = await tx.estimateGas({from: admin});
vs
let estimateGas = 519540;
from uniswap-arbitrage-flash-swap.
@Haehnchen you say "...you can higher the "block.number + 2", but normally its too late" in this code in file watcher.js at line 106 is "block.number + 2", you make modification out of this public repository? you can share? tks
from uniswap-arbitrage-flash-swap.
Ok, I managed to deploy my own node with 20ms in the US East region. I updated the code as well.
from uniswap-arbitrage-flash-swap.
NewBlockHead
we measure the request time, i.e. how long it takes to fetch data from your node.
from uniswap-arbitrage-flash-swap.
there are 2 parts of measuring
- connect to multiple websocket providers listen for "NewBlockHead", you will notice some nodes are getting new blocks faster
- then execute the checks
so basically the calculation would be "first knowledge of the new block" + "execution time"
from uniswap-arbitrage-flash-swap.
Related Issues (20)
- Not a single opportunity with Full Node HOT 10
- Coingecko Prices HOT 7
- Do we need to set the amount we want to purchase with HOT 4
- No suitable peers available HOT 1
- Why you return a int on check function?
- Weird profits HOT 8
- How can I deploy this contract? can you teach me the steps to install and launch them? HOT 1
- Swap pairs HOT 3
- TypeError HOT 1
- I can't deploy the contract on remix HOT 2
- The repay value is in coin1
- Can't able to deploy contract please help me out
- deploy not working
- Flash
- Pull updates from one of your forks HOT 2
- Create an Oracle for new tokens listed, new possible arbitrage opporunities HOT 3
- After Change Token address getting error
- How to add 1 inch support HOT 3
- Light node error HOT 4
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 uniswap-arbitrage-flash-swap.