What Are Front-Running Bots Doing?

To understand front-running blockchain bots, it helps to understand traditional front-running in equity markets. It’s similar to insider trading.

1. You know a big order for Apple stock is about to occur
2. This will drive the price higher (temporarily at least)
3. You buy some Apple stock for £100 before the big order (AKA front-running)
4. The big order occurs, sending Apple stock to £105
5. You sell yours. Pocketing a gain of £5

Insider trading is illegal and unethical. Front-running operates in a grey area. The two are similar concepts but not the same.


…This then takes us to front-running run by machines, otherwise known as High Frequency Trading (HFT). A very good book on this is Flash Boys by Michael Lewis. I recommend it.

Side note: Although HFT machines can decide faster than humans on matters, they’re still competing with other HFT machines. This kicked off a race to have the fastest connections, to shave milliseconds. There were HFT firms buying offices as close as they could to stock exchanges. They were investing in having the straightest and shortest fibre-optic connection possible, so they could gather information about trades sooner than anyone else.


…If the above makes sense to you, you’ll be glad to know front-running bots on blockchain are exactly the same premise. N.B. The bots take the form of smart contracts.

To keep it simple:

• The bots are like HFT machines, programmed to front-run your trade
• A mempool is a public register of pending blockchain trades, like a stock exchange

ELI5 – You can already see how the recipe unfolds like non-blockchain front-running. You have a smart contract bot that can see what’s being bought, buy it first, sell it higher, then pocket the difference. The question is, why does this happen on blockchains?

1. Thin liquidity
If a bot is scanning a niche DEX liquidity pool such as SNX/BAT for orders, 1 front-running trade can create significant price fluctuations in that pool. This works if the purchaser allows for wide slippage (an acceptable price range, rather than a fixed price).
2. Miners like it
Since the bot front-runs your trade by submitting the same trade but offering a higher gas price to get it fulfilled first…miners will happily allow this activity because it means they get to collect those gas fees created by front-running bots.
3. Breaking news! Public blockchains are public!


Thinking out loud:

• ETH’s EIP 1559 doesn’t really stop front-runners, high-tipping bots are given priority.
• Proof of stake emulates conventional wealth inequality traps, it compounds with those who already have wealth – is PoS a good structural change when excluding the matter of carbon emissions?
• Proof of humanity works to filter bots if trading, for example, via Metamask on a DEX. However can’t one directly plug into liquidity pools via a private node and a bespoke WalletConnect config? Captcha probably won’t stop the more intelligent front-running attempts
• Is there an opportunity to integrate zk-SNARK tech somewhere in the flow?

What is Progress?

The world will continue to overflow with innovation, but it’ll remain short on the flourishing of human beings as a whole.

Brunch is a few taps on an app away, meanwhile demand at food banks are increasing each year.

Progress

All advanced technology looks like a “wall of no” until someone finds a path through. Or doesn’t. The only way to know is by throwing money and smart people at it until one’s appetite for risk is spent, or one hits it big.

I say “hits it big” and not “has a breakthrough“ because infrastructure ramps up on striking oil, not having epiphanies.

The Evil You Know

Fines imposed by the Financial Conduct Authority on banks in 2020 include:

• £26m – Barclays
• £38m – Commerzbank
• £48m – Goldman Sachs
• £64m – Lloyds

The fines were related to inappropriate conduct or the unfair treatment of customers.

Here are some fines imposed on banks in 2019:

• £28m – UBS
• £34m – Goldman Sachs
• £46m – Bank of Scotland
• £102m – Standard Chartered

The fines were imposed for lack of transparency as well as breaching money laundering regulations. The notes show Bank of Scotland receiving a 30% discount on the fine.

Nascent fintech gets a bad rap (or a cease and desist) before it can demonstrate its promise, meanwhile the incumbents quietly pay their fines year after year. Sometimes at a discount.

Humans have been around for many thousands of years…why are most of us right-handed?

Parts Unknown

Note: it seems careless to share a thought like this when Covid has taken millions of lives. It was a thought nonetheless.

When lockdown hit and travel was restricted, I felt okay having explored a dozen countries preceding the closures.

The first few months were tough in lockdown. I usually move to think, and I was stuck indoors, but I knew containing the virus was critical. Fortunately any travel urges were suppressed by Anthony Bourdain’s Parts Unknown on Netflix.

Anyone who ventures off the beaten path would love the series. He’s a chef but it’s not only about food. He visits various countries but it’s not only about attractions. I’ve been educated by it. For example, I learnt that Laos had more bombs dropped on it than all bombs dropped in World War II (there are ~80m unexplored ones remaining). I learnt that the Quebecois tow tiny homes onto frozen lakes to fish and feast. I learnt what Basque Country is. It wasn’t only that I saw new places, he helped sharpen my critical thinking skills, he made me constantly reevaluate what I want to give to the world.

Here was a man with past demons uncovering much of the planet. The production value and his sincerity brought forth a visceral experience. After reaching the final season, I learned that he took his own life. It took me a few days to process that. I rewatched the series, but a new intensity stemmed from the warnings signs that were suddenly so clear.

Nonetheless, I’d call Anthony Bourdain a role model. The legacy he left behind is invaluable and will educate folk well into the future.

True Size

Use this site to visualise the real size of a country, rather than the impression 2d maps give.

Russia is not as big as it seems. The Democratic Republic of the Congo is nearly 40% of the size of USA.

Signal

When you use Signal, your data is stored encrypted on your devices. All of it. Signal servers only get the phone number you joined with, when you joined and last logged on.

The Signal app uses the Signal protocol. If you want the technical side of things, the protocol is built on the Double Ratchet algorithm, triple Elliptic-curve Diffie–Hellman (3-DH) handshake, and prekeys. It uses Curve25519, AES-256, and HMAC-SHA256 for its encryption algorithms.

Interestingly, apps like WhatsApp use the Signal protocol partially, to encrypt message content. WhatsApp chooses to collect your metadata for its own use (they pass it along to Facebook too). More here.

Don’t even get me started on email. PGP must be over 20 years old now.

I downloaded Subnautica because it was free. I didn’t expect it to be one of the most enthralling games I’d ever play.