Arbitrum Brings out the HashCash
snoopy gives us the scoop
We just talked about Arbitrum last newsletter, but as the main competitor to Optimism. Well, turns out there’s some pretty juicy news about how they’re changing the way their sequencer decides on the order of transactions in a block. Let’s talk about it!
This whole post was kicked off by this excellent thread by @snoopy_mev. They’re a talented ‘searcher’ (there’s a good chance you don’t know what this means, that’s ok) in the MEV space.
The tl;dr is that Arbitrum, an Eth L2 (as explained in my last newsletter) is a semi-private Eth network. There’s only one party that takes all the transactions proposed for the next block and orders them as they’d like, and that’s the Arbitrum project.
MEV, or “miner extractable value”, is the art of paying high miner fees in order for your transaction to be the first or second one in a block. I say “art” because the place that you get the funds to pay miners such high fees is usually from someone other than yourself.
MEV is hunted for by bots that are written by developers who are known as “searchers”. They look for ways to order transactions that gives them a lot more money than they started with. Most of that goes to the miners, or in Arbitrum’s case the sequencer. The difference is almost free money though. Over enough iterations, and winning enough of the block races, it adds up to quite significant sums.
How Arbitrum orders transactions
What this tweet is saying is that Arbitrum decides which transaction to put in the top of a block not by who’s paying the most in fees, but on a “FCFS” or first-come first-serve basis.
This means that speed matters. Which means that getting the last block or the newest transaction data out of the mempool first matters, as that’s the signal your bot will use to create a new transaction to send to the sequencer. It’s a race, and only the fastest searcher wins. A race played out over and over, every single new block. Which I hear on main-net Eth is meant to be every 15s. I’m not sure what it is on Arbitrum.
You want to get the next block that the sequencer picks first. And remember there’s only one sequencer. It’s not like bitcoin where any random miner might find the next block. There’s only one “miner” on Arbitrum. So there’s only one server that knows the next block first every single time. It’s the same server: the sequencer.
Once the sequencer has chosen the next block, they have to tell everyone else on the Arbitrum network about it. They use “peering” connections to do that, which is to say anyone who directly connects to them will get the block first.
So searchers all connect directly to the Arbitrum sequencer node’s connection.
Let’s say there’s now 10 connections to peers from Arbitrum’s node. One of them is going to be sent the next block before any of the other 9 connections will be. How does Arbitrum decide which of these 10 connections to send the block to? They decide randomly.
If you’re a searcher and you want to get the next block first, because that basically determines whether you’re going to be able to win the MEV money in the next block; how would you increase your odds of getting picked? Well, you’d try to have more connections than the next guy. If there’s 20 total connections, and 10 of them are yours, you’ve just increased your odds from 1/10 to 1/2.
How to Stop Connections
Eventually there will be more than one computer that has the next block first. But until that happens, that one computer is overloaded with websocket connections. So they opened a pull request to change what it takes in order to open a connection to the sequencer.
I’m just gonna post from snoopy’s thread, as it’s great.
tl;dr: Arbitrum wants to add a hashcash rate-limiter to connections, so that who gets the next block first is decided by, that’s right, Proof of Work.
I don’t know if they’re going to go through with it. The PR was opened just 2 days ago and hasn’t been merged.
This last line from the PR introduction is pretty good. It explains that if you’re not able to provide a new nonce every 25 hrs that’s still in the “target” range, then you get unceremoniously disconnected.
If a relay client's nonce hash was last computed over 25 hours ago, it gets recomputed and that timer gets reset. If the nonce hash no longer meats the target specified, the client gets disconnected.
This means every 24hrs you had better have found a hash that beats out all the other searcher’s hashes. Which means you’re suddenly in a race to spend money on computers that are finding the next hash for you, but one that’s smaller what you competitors are able to afford hunting for.
Proof of Work is coming baaaaack to eth baby.
Who Gets What and Why
So Arbitrum is proposing to do this. I found what snoopy had to say about this really illuminating, as he’s a top tier searcher. He knows where the money goes.
Basically he’s saying that MEV searchers are going to get squeezed because suddenly their profits have to go towards not just paying the sequencer but also paying for a computer cluster to compute the next hash, so that they can win the next block-race, so they can earn some more eth, so they can pay for their server bills.
snoopy’s point is that if they *didn’t* add this, then they could keep more of the capital that searcher’s find, instead of having it get paid out to the sequencer.
I’m not sure I follow this logic exactly. If you had to pay to get to the top of the block, I would understand this. But if Arbitrum is a First-Come First-Serve by default, then why would you as a searcher be paying anything extra to the miner to include your transaction? They’re already going to be putting up first just based on the time that they received it? Maybe I’m missing something here, I’m not sure.
Point is that while it would cost more to participate in winning the MEV game on Arbitrum, I’m not convinced that this would hurt Arbitrum more than it would hurt the MEV searcher’s profits. In fact, I’d largely expect searching to turn into a marginal business, from something that was quite a money maker.
Negotiating with Pirates
The final part of snoopy’s thread is quite good. It points out how some clever searcher’s have figured out how to ask the HashCash designer to change the algorithm to make the nonce smaller, so that they can re-purpose existing hash machines to hunt for Arbitrum Relay Client Nonces. Feels a bit too Roko’s Basilisk to be comfortable.
Proof of Work removes some opportunities for gaining an edge in arbitraging a system, because it makes the next block source random. This randomness makes it hard to figure out who to stalk to get the next block. It could be coming from anywhere.
Centralized systems on the other hand have a lot of issues with mitigating MEV. They’re in one place and the rules about how they operate are well known. It’s interesting to see the randomness re-added back to a centralized system, but pushed onto being the burden of the clients rather than the server’s. Since you’re not randomizing the block source, the only way out is to randomize the source’s client connections. And it seems like the best way to do a random lottery is to involve proof of work.
Ce la vie.
Thanks for reading niftynei's shitcoin chronicles! Subscribe for free to receive new posts and support my work.