The Paladin Bot
Solving Bad MEV for Good (2/4)
The Paladin bot is a very fast open-source arb-bot, which runs locally in the validator and only operates when the validator is the leader.
Paladin is designed to run inside the Jito-client validator, listen to state updates from the geyser interface, and inject its own transactions to capture opportunities directly in real-time, removing unnecessary artificial delays to outsource this to an auction for searchers.
Paladin only improves APY for validators running it, by not “leaving money on the table” for searchers and capturing opportunities directly (atomic arb searchers keep tens of $Ms/yr).
Paladin can be configured to only interact with only a subset of the tokens and protocols, and leave other opportunities to be captured less efficiently by the Jito auction (as they currently do). This provides each validator complete flexibility to determine its own unique compliance requirements.
The Paladin bot has 3 key functionalities which are built on top of one another, to capture good MEV.
Atomic Arb
The key functionality of Paladin is being a very fast (tick-to-trade < 1 ms) arb-bot, spawned in a process of its own in the Validator machine, ingesting state updates from the geyser, and lands its own atomic arb Tx. There is no “secret sauce” to capture atomic arb on Solana, known only to shadowy MEV searchers. It is a straightforward path-searching problem, and the key to winning is hearing of state updates as fast as possible.
Paladin simply does it better than any external searcher, since it can land a Tx much faster than they would even hear of the opportunity.
It’s worth noting that:
- Paladin does not frontrun. It only takes into account the output of Tx after they execute.
- Paladin disincentivizes arb-spam. Spamming only makes sense if sometimes the spam lands and captures arb.
Paladin identifies and captures arb immediately after each batch of Tx is executed, before any other Tx has a chance to capture it, so it leaves no opportunities for spam to capture.
CeFi-DeFi Arb
In order to capture CeFi/DeFi arb, which is a significant part of MEV, Paladin utilizes a permissionless DeFi bulletin board, and allows anyone — MMs, HFTs, arbitrageurs, random ppl of the internet — to send quotes directly to the leader’s Paladin bot to offer trading specific quantities, at specific prices, in specific times (eg current slot) using their onchain liquidity.
Since MMs will constantly update their quotes, any CeFi price action will trigger MMs to adjust their quotes, which in turn will be consumed by the Atomic Arb logic almost immediately, as Paladin will correct the difference between all the onchain venues and the CeFi-initialized quotes.
This functionality allows the validator to capture almost all the onchin part of the CeFi/DeFi arb, while ensuring Solana users get the current correct price at any given time.
To prevent DDoS, Paladin rate-limit the quotes to 100 quotes/sec, which it divides its capacity pro-rata to those who “lock” their PAL token temporarily (30 min) for this purpose.
PALAggregator
The leader has a unique advantage over all others — it knows in real-time the exact price of every asset, and doesn’t need to “guess” what would be the ideal path for a swap when it executes.
Paladin allows the leader to leverage this, and offers to try and improve any aggregator (eg Jupiter) Tx. Given a Tx containing the path and quote of an aggregator (or even the best single-pool price), Paladin wil try and find a better path in real-time and if successful shares the surplus with the user and the wallet/platform which sent it.
If unsuccessful- it would use the exact same path specified by the aggregator and charge no fee, but whether it fails or succeeds it will include the Tx much faster and provide users a much smoother UX.
This service too is rate-limited by locked PAL token, and we expect wallets and other platforms to provide it to their users in order to capture their share (10%) of the surplus it creates.
Future Bot Functionality
There are numerous ways to enhance Paladin in multiple dimensions. These range from capturing liquidations MEV, to building dashboards to provide clean insight to the value it distributes, to a “whitehat” module to identify and prevent hacks, to founding a foundation organization to coordinate such efforts.
The Paladin bot is very likely to evolve over time, and PAL provides an Evergreen Dev Fund which can fund any such efforts of the Searcher, Validator, and general Solana community.
In the next post we explain how the PAL token incentivizes Validators to run Paladin honestly.