Good questions! A bot network is “decentralized” if we have guarantees that if one bot crashes or is compromised, the other servers can continue to execute transactions on behalf of users, and the overall network will continue to operate with limited or zero disruption.
How does Gelato try to achieve this in practice today?
Basically at the moment there is a whitelist of who can be an executor and execute transactions on Gelato. You can find the whitelist on our diamond contract here. Go to the
ExecFacet and check out the
executors state variable.
This whitelist is currently controlled by the Core Dev team, i.e. it decides who can run these bots. In practice we and other parties we trust (which also run infra for other projects) run them. If a bot does not execute transactions at the right time, even though the transaction is in its slot, it will get kicked.
The control over this whitelist will soon be given to the GelatoDAO after the launch of the GEL token so that the Core Dev team is not solely responsible for maintaining the list anymore.
ConcurrentCanExecFacet handles the coordination of bots off-chain, which is done to help them not to collide in each others slots.
Why is there a whitelist you might ask? The answer is twofold:
First, to avoid unnecessary Gas Price Auctions and bot operators racing each other in order to get certain transactions mined. There is really no point in having 100 Executors racing for the same set of transactions and marginalizing each others revenue. The added benefit of having 100 bots over 10 bots is really not that great. In order to ensure a network is resilient and reliable, having 10 highly reliable bots is worth much more than having 100 random ones.
Secondly, having bots automatically execute transactions on your behalf in the future means that you provide those parties with quite a bit of “power”. Our aim is to design a system where transactions always get executed in the best interest of the end user, which often times is difficult to implement in a completely permissionless system because what constitutes a “good” transaction execution is a highly subjective topic. Bots should not frontrun or otherwise extract value maliciously from users. That’s why we think having a whitelist where these operators have some social reputation at stake is beneficial (at least initially), so that we know who they are and can hold them accountable if they actually do extract a lot value from users.
Having said all that, things will change fairly soon:
- GelatoDAO will take over the whitelist control and decide who can run executors
- Bots will require to stake GEL tokens in order to have economic stake in the system and not solely social reputation
- New advancements such as Flashbots provide a different way of getting transactions mined which make Gas Price Auctions redundant. This means it becomes easier and more efficient to have multiple bots monitor and execute the same sort of transactions without risking collisions. We are already investigating how we can utilize these sort of mechanisms to make running Gelato bots even more permissionless.
Hope that answers your questions for now! Let me know if you want to dig deeper into some of these topics!
Also, if you have cool ideas you want to share of how we can make our network more decentralized and permissionless as time goes by, please do share them in here