Simple Summary
Moonwell contributors from Solidity Labs propose an innovative way to improve how liquidations occur on Moonwell, ensuring a more efficient capture of revenue from liquidation events. Currently, professional liquidators compete using bots to earn fees by liquidating risky underwater loans, which are vital to maintaining the health of Moonwell. With this proposal, Moonwell would introduce a “MEV tax,” charging liquidators for priority access to update price feeds and execute liquidations. This ensures that additional revenue remains within the protocol and not captured by offchain systems. Our approach ensures secure liquidations, maintains usage of trusted Chainlink oracles for price updates, and includes robust fallback mechanisms. We recommend starting with a phased rollout on a single market and expanding gradually to other markets. This initiative aims to enhance Moonwell’s revenue generation while maintaining our focus on safety, decentralization, and onchain innovation.
Key Terms
- Liquidations: The process of resolving underwater loans to maintain the health and stability of the Moonwell protocol.
- Chainlink Price Oracles: Trusted price feeds used for secure and accurate liquidation triggers.
- Oracle Extracted Value (OEV): The value or revenue captured when price updates from oracles trigger liquidations of undercollateralized loans.
- Mempool: A temporary storage area where pending transactions are held before being included in a blockchain block. It acts as a queue, allowing nodes to validate and broadcast transactions across the network. Miners or validators select transactions from the mempool, often prioritizing those with higher fees, for inclusion in the next block.
- MEV Relay: A service that captures and redistributes Maximum Extractable Value (MEV) by enabling searchers and validators to prioritize transactions in a block via off-chain auctions. These relays maximize value from opportunities like arbitrage, liquidation, or front-running, while often sharing a portion of the captured value with users or protocols.
- MEV Tax: A protocol-level fee charged to participants seeking to capture MEV, such as liquidators. This tax ensures that a portion of the MEV generated by prioritized transactions, like liquidations, is captured directly by the Moonwell protocol, rather than being retained by third parties or off-chain systems.
Introduction
Oracle extracted value, or OEV, is typically captured by professional liquidators, who run bots that immediately liquidate any underwater loans on Moonwell and earn a liquidation fee for doing so. These liquidators provide a vital function that keeps the Moonwell protocol healthy and minimizes the risk of the protocol taking on bad debt. Moonwell is a decentralized protocol, and anyone can perform this function onchain, so when a large position is liquidated, typically many bots compete to be first and capture the profit from doing so. The liquidation is triggered when the Chainlink price oracle is updated to reflect a new, lower price for collateral securing the loan, or a new, higher price for a borrowed asset, thus the term “Oracle extracted value” has emerged as an accurate description, as the liquidators attempt to be first to liquidate following the price update.
Liquidations on Ethereum Layer 2s
On Base and Optimism, there is no public mempool, so liquidators can’t participate in a MEV relay auction, such as Flashbots, by bidding to pay Ethereum block producers to re-order the oracle price update and make sure their liquidation lands in the same block directly after the update, so liquidators instead give their liquidation transaction a higher “priority fee” so the L2 sequencer run by Coinbase or Optimism Foundation will prioritize their liquidation before others, hoping to win the profit for the liquidation. This activity results in very high priority fees paid to the sequencer for large liquidations.
“MEV Tax” Research
Dan Robinson and Dave White at Paradigm recently released an impressive research paper titled Priority Is All You Need, which made us think deeply about how we might enable OEV on the Base and Optimism networks in a way that was superior to Ethereum mainnet. With this groundbreaking new concept of a “MEV Tax” we realized that we could create a simple, yet profound new smart contract system that captured MEV tax at the Moonwell protocol level as revenue, rather than letting an off-chain auction or MEV relay capture most of the value from liquidators. The simple idea is to have the Moonwell protocol charge liquidators a MEV tax which is $99 for every $1 of priority fee paid for the right to update the price 30 seconds early. Because this new smart contract system can read the priority fee from the transaction it is called by, it knows exactly how much tax to charge and will only successfully charge the tax for the highest priced transaction, which will also be bundled with the liquidation itself. If a liquidator wasn’t the highest “bidder” in the priority fee auction, their liquidation will simply revert, and the tax won’t be paid.
We realized that with this powerful, yet simple contract system, we could now perform priority fee auctions completely onchain, with no dependencies on offchain systems like expensive and costly MEV relays that might have downtime, and are ultimately private centralized systems antithetical to the ethos of decentralization and permissionless networks espoused by Ethereum. This is only possible on Layer 2 networks like Base and Optimism (and other Superchain-aligned networks such as Unichain, Worldchain, Zora, and Mode) where there is a trusted sequencer that follows fair competitive priority ordering. Enforcing these rules in a trustless network like Ethereum mainnet remains an unsolved problem.
Ensuring Safety and Security
Security is the highest priority in the Moonwell community, and liquidations play a vital role in ensuring that underwater loans are liquidated quickly. In order to maintain the safety and security of liquidations, even in the event there are no bidders in the auction, we designed this new system in such a way that liquidations can still happen after 30 seconds, as the price will be automatically updated and liquidations can happen in the same way they happen today, without any liquidator paying a priority fee. This new contract system also “wraps” the Chainlink price feeds that are currently used by Moonwell so there is no risk of taking on a new and less trusted oracle provider. Chainlink has proven to be very safe and secure through over half a decade of operation, so it was important to us that we keep that same level of safety and economic security that Chainlink currently provides. The contracts are also extremely lightweight and are undergoing a comprehensive audit by Halborn Security prior to an onchain proposal to upgrade to the new system.
Phased Rollout Plan
To thoroughly evaluate the new OEV system, we propose a phased rollout, starting with a test on the Ethereum market on Optimism.There is enough liquidation activity in this market to measure performance of the system over time. If that proves successful, we can further expand to the other markets on Optimism and Base over time. This will allow us to measure the performance and ensure that liquidators are adequately informed about the benefits of using this new onchain auction.
Next Steps
We’d love to hear feedback from the rest of the community, especially anyone running liquidation infrastructure, about this proposed upgrade. What do you like or dislike about it? You can read a formal specification in the Moonwell Github repository here, as well as take a look at our pull request with the contract source code that is currently undergoing audit by Halborn Security.
Once we’ve heard your feedback, we’ll proceed with a temperature check vote, then an onchain vote to upgrade the Ethereum market on Optimism if the temperature check vote is successful.
Frequently Asked Questions
Why capture OEV at the Moonwell protocol level?
There are now two competing proposals from Redstone and API3 to provide offchain auctions using private venues (Fastlane for Redstone and OEV Network for API3) that would capture OEV and share the revenue with the Moonwell protocol. While these proposals are welcome, they split the revenue OEV with 3rd parties (Redstone and API3), and are more centralized and brittle due to their offchain nature. Additionally, these systems introduce extra trust assumptions. This proposed system would capture 100% of OEV at the Moonwell protocol level and does not rely on any additional offchain infrastructure. It will be just as reliable as Chainlink is today, and won’t have downtime unless the L2 sequencer has downtime.
What happens if there are no bids in the OEV auction?
If there are no bidders, the liquidation can be performed by any liquidator permissionlessly after 30 seconds on the Base or Optimism network, in the same way that liquidations happen today.
What are the benefits to the Moonwell protocol for this proposed upgrade?
The Moonwell protocol can generate more revenue than its peer lending protocols on the Base network, which can be used to fund future upgrades and improvements to Moonwell. Moonwell can continue to be the category leader in fee and revenue generation by becoming more capital efficient and generating more revenue with the same TVL.
What are the potential downsides to this proposed upgrade?
In the event that there are no bidders, liquidations would be delayed by 30 seconds. Currently Chainlink’s minimum update frequencies are 0.15% deviation and 1200 seconds.
Who is making this proposal?
We are Moonwell contributors from Solidity Labs, the leading boutique smart contract development firm. We have been contributors to the Moonwell protocol for over 18 months, and have contributed key systems, such as the Moonwell v2 smart contract upgrades that enabled the Moonwell launch on Base and Optimism, Temporal Governance that enabled multichain governance, The multichain upgrade to the WELL token, and the multichain governance system that makes Moonwell the most advanced multichain protocol to have complete feature parity on all the networks it is deployed on.