ETHGlobal Mumbai 2026 · Hackathon project

Autolysis: self-liquidating loans

The loan pays for its own liquidation. No privileged keeper, no signature, no 5% liquidator bonus.

Three layers, three sponsor stacks: Ethereum Foundation (frame transactions, alternative mempool), Uniswap Foundation (v4 hooks) and 1inch (Aqua, SwapVM). Press Present, then use the arrow keys; Esc exits.

One self-liquidation, block 2865 Included
Health factor
0.960 1.055
Debt (USDC)
0.1500 → 0.0936
Collateral (WETH)
0.1000 → 0.0686
Gas billed from collateral
0.0000939 WETH
Signatures from a keeper
none
Verify it yourself in section 7
02 · The problem

Liquidation is DeFi's most important safety mechanism and its most extractive one.

310,000+ liquidations processed by Aave, worth ~$4.65B Aave Labs, Feb 2026 · [TBD link]
~$429M liquidated by Aave in the crash week of Jan 31 – Feb 5, 2026, across ~12,500 transactions Aave Labs, Feb 2026 · [TBD link]
~5% of the debt paid as a bonus to outside bots, at the worst moment for the borrower
74% of fixed-spread liquidations paid above-average transaction fees: evidence of gas bidding wars Qin et al., 2021

Existing designs “sell excessive amounts of discounted collateral at the borrowers' expense.”

03 · The insight

“Liquidators were a workaround for loans that couldn't act on their own.”

A liquidator does six jobs. Autolysis gives each one to the market itself, or to someone already paid for it.

#Liquidator's jobWhat replaces it in Autolysis
1Watch positionsAnyone can broadcast; it costs nothing, because the account pays gas.
2Sign and sendNo key; the account's VERIFY frame is the authorization.
3Bring capitalNot needed; the market sells collateral it already holds.
4Pay gasPrefunded ETH tank, refilled from collateral, capped at 0.3% of what's sold.
5Hold collateral and price riskAqua makers and a backstop buy at the oracle price for a spread.
6Act fastLiquidatable from HF < 1; one nonce key per position, so many can be pending at once.
04 · How it works

Three layers, each owned by one sponsor.

Step through one liquidation. The active layer lights up below.

Transaction lifecycle
{{ cur.layer }}Step {{ cur.n }} · {{ cur.name }}

{{ cur.detail }}

1 · AuthorizeActive
Ethereum Foundation
EIP-8141 frame transactions + ERC-8421 alternative mempool

The market's contract account is the sender and gas payer.

FRAME 0 · VERIFY → APPROVE
Checks the one allowed liquidation shape:
  • selector + args
  • nonce key = hash(market, position)
  • fresh oracle round in band
  • unhealthy at two prices
  • fee cap
FRAME 1 · SENDER
Calls selfLiquidate.
2 · ExecuteActive
Uniswap Foundation
Uniswap v4 hook

The market's venue settles collateral first, then swaps through the official PoolManager.

BACKSTOPHOOK
  • Authorizes on the swap's sender, never hookData
  • Uses beforeSwapReturnDelta to fill at the oracle price

Everyone else sees an ordinary pool.

3 · FundActive
1inch
Aqua + SwapVM
TIER 1 · AQUA MAKERS
USDC stays in the makers' wallets; one balance backs every market. Our custom SwapVM opcode LiquidationGate lets an order fill only when the hook is the taker during a liquidation.
TIER 2 · BACKSTOP
Backstop deposits.
TIER 3 · POOL CURVE
Bounded by a 1% minimum output.
05 · Why the alternative mempool

Same transaction, two mempools.

Canonical mempool Rejected
Frame transaction validation-prefix simulation failed: StorageReadNonSender

Validation reads market and oracle storage, which the canonical rules forbid.

Alternative mempool AdmittedIncluded

The account is a staked entity (0.012 ETH).

Keyed-nonce transactions where the sender pays for itself aren't capped per sender, so a crash can have many liquidations pending at once.

See the included transaction, block 2865
VERIFY frame gas 94,168 of 100,000 cap · 94.2%
Measured with ethrex_simulateFrameTransaction on the devnet.
Crash scene, 12 positions Canonical [TBD]of 12 Alternative [TBD]of 12
06 · Cost calculatorEstimate

What does a liquidation cost the borrower?

L = 0.80 · T = 1.05 · s = 0.01
CP = HF × D / L = {{ c.cp }}
Insolvent below HF = L/(1−s) ≈ 0.808
Insolvent: wound down fully, shortfall recorded as bad debt.

This applies to Aave v3, Aave v4 and Autolysis alike.

Aave v3
Paid to the liquidator
{{ c.v3p }}
Repays {{ c.v3r }} ({{ c.v3rule }})
5% of repaid · {{ c.v3per }} per $100 repaid
Aave v4 Dec 2025 design
Paid to the liquidator
{{ c.v4p }}
Repays {{ c.v4r }} (to target HF 1.05)
4% of repaid · {{ c.v4per }} per $100 repaid
The formula exceeds the debt here, so repayment is capped at the full debt.
Autolysis
Cost to the borrower
{{ c.lo }}–{{ c.hi }}
Repays {{ c.ar }}, sells {{ c.sold }} of collateral
0.2–1.1% of sold · {{ c.aper }} per $100 repaid

At these inputs, Autolysis repays ≈ {{ c.ar }} for ≈ {{ c.lo }}–{{ c.hi }}. Aave v3 pays a liquidator {{ c.v3p }}; Aave v4 pays {{ c.v4p }}. That is most of the 5%, net.

Formulas
Aave v3: if HF ≥ 0.95 repay 50% of D, else 100%. Paid = 5% of repaid.
Aave v4: r = (T·D − CP·L) / (T − L·1.04). Paid = 4% of r.
Autolysis: r = (T·D − CP·L) / (T − L/(1−s)). Sold = r/(1−s). Cost = sold × (0.2% to 1.1%): maker spread 0.2–0.8% plus gas capped at 0.3%.

Costs move, they don't disappear: borrowers still pay gas, the spread and slippage, just not the bonus.

07 · Proof

Verify it yourself.

Every claim on this page has a row here, with its status spelled out.

AuthorizeExecute Keyless, self-paid liquidation Included On the devnet
Block 2865 · both frames succeeded 0x913762…40fe56
Before → afterBeforeAfter
Health factor0.9601.055
Debt (USDC)0.15000.0936
Collateral (WETH)0.10000.0686
Hook tokens / claims0 / 00 / 0
Gas billed from collateral to the account0.0000939 WETH
Layer
Claim
Status
Evidence
Authorize
Staked account
0.012 ETH in NaiveStakingRegistry
On the devnet[TBD link]
Account0x91233f…39cd40
Stake tx0x1e5a93…2fed4b
Authorize
Canonical mempool rejects the same transaction
Frame transaction validation-prefix simulation failed: StorageReadNonSender
Rejected
Verbatim error text
Execute
The same transaction sold through our hook on the official v4 PoolManager
Devnet PoolManager
IncludedOn the devnet
0x6bF9Aa…429848
Execute
Full liquidation through the official Unichain PoolManager
Unichain mainnet fork · run just fork-uniswap · Uniswap confirmed a fork test is enough
On a Unichain fork
0x1f9840…000004
Fund
A real fill through our gated SwapVM router against the official Aqua registry
Unichain mainnet fork at block 63,190,327 · run just fork-c2 · the maker's wallet pays USDC and receives WETH; a stranger's fill reverts with LiquidationGateClosed
On a Unichain fork
0x111111…f6a90a
All layers
Crash scene (12 positions), replacement and attack scenes
[TBD]
Links [TBD]
All layers
104 Foundry tests, 9 SwapVM tests, 41 kit tests
Stateful invariants, fuzzing, and mutation tests for every validation rule
Local test
CI badge[TBD]
All layers
Source code
Public repo
08 · Prior art, credited

Built on good ideas, with the operator removed.

DesignWhat it doesHow Autolysis relates
Aave v4
Dec 2025 design
Sells only to a target HF. Still pays a third party a ~4–5% bonus. SourceCredited: the “sell to target” idea.
Morpho pre-liquidationGradual close factor before full liquidation.Credited: our gradual close-factor schedule, 10% at HF 1.00 rising to 100% at 0.95.
DeFi Saver automationOpt-in bots; 0.05% fee plus gas (fees). Reports protecting $446M of Aave v3 collateral in one selloff (report).Proves demand. But it's run by one operator; Autolysis is a property of the market itself, with no operator.
Aave repay-with-collateralThe borrower repays debt using their collateral.Needs the borrower awake and signing.
AutolysisSells to a target HF through the market's own account. No third-party bonus, no operator, no borrower signature.Gas, spread and slippage remain. Most of the 5%, net, stays with the borrower.
09 · FAQ

Questions a skeptical judge should ask.

WhyWhy does this need to exist?

Liquidation is DeFi's most important safety mechanism and its most extractive one. Aave has processed 310,000+ liquidations worth ~$4.65B, and outside bots are paid a bonus of about 5% of the debt, at the worst moment for the borrower.

Qin et al. (2021) found 74% of fixed-spread liquidations paid above-average transaction fees, and that existing designs “sell excessive amounts of discounted collateral at the borrowers' expense.”

WhyWhy not just keep liquidators?

Liquidators were a workaround for loans that couldn't act on their own. Each of their six jobs (watch, sign, bring capital, pay gas, hold price risk, act fast) has a replacement inside the market; see the insight table. The bonus pays for work the market can now do itself.

AuthorizeIf nobody gets a bonus, who sends the transaction?

Anyone. Broadcasting costs nothing, because the account pays. The borrower's app, a watcher or any node can do it; builders are paid by the priority fee. So: no privileged keeper, not no keeper.

CostSo liquidation is free?

No. Gas, spread and slippage remain; we quote net savings. Autolysis removes most of the 5%, net. Try the cost calculator.

AuthorizeCan collateral pay its own gas?

Not in the same transaction. EIP-8141 charges the max cost at approval, so the account keeps a prefunded tank, refilled from collateral afterwards.

FundCan someone sandwich it?

The Aqua and backstop tiers fill at the oracle price. Only the curve tier can be moved, and at most to the 1% minOut floor.

AuthorizeWhat if the alt mempool stalls in a crash?

Lender fallback: below HF 0.95, after 3 rounds with no self-liquidation, a classic 5% liquidation opens to anyone. An invariant proves it never pre-empts self-liquidation.

AuthorizeCan someone grief the account into paying for failed attempts?

VERIFY checks the round, the band, two-price health and the fee cap. At most one failed attempt is billed per price round per position.

AuthorizeWhy not ERC-4337?

Autolysis is built on EIP-8141 frame transactions: the account's VERIFY frame is the authorization and the account is both sender and gas payer, so no key signs. Its validation reads market and oracle storage, which the ERC-8421 alternative mempool admits from a staked account.

[TBD] Direct comparison with ERC-4337.

ExecuteWhy a hook and not a router?

The hook sits inside the official PoolManager's swap path. BackstopHook authorizes on the swap's sender (never hookData) and uses beforeSwapReturnDelta to fill at the oracle price, while everyone else sees an ordinary pool.

FundWhy Aqua?

Aqua makers' USDC stays in their wallets, and one balance backs every market. Our LiquidationGate opcode lets an order fill only when the hook is the taker during a liquidation, so makers quote at the oracle price for a spread without exposing their orders to anyone else.

AuthorizeOracle wicks?

The position must be unhealthy at both the cited and the latest round, within a 0.5% band. A breaker needs two rounds for moves over 10%.

AuthorizeWhat is EXO-010?

A proposed rule (EXO-010): a narrowly scoped ERC-8421 reputation rule. An invalidation caused by an outside state change the sender didn't cause, such as an oracle round moving or the borrower repaying, shouldn't count against the sender. Malformed or self-caused invalidations still count.

StatusIs it live on mainnet?

No. EIP-8141 and ERC-8421 are drafts on an experimental devnet. The Uniswap and Aqua parts run against official contracts on a Unichain mainnet fork.

AdoptionWould this work with Aave or Morpho?

Autolysis is a liquidation route, not a new lending protocol. Any market implementing ISelfLiquidatingMarket can adopt it. Our demo market is deliberately minimal.

10 · Limitations, honestly

What this does not solve yet.

AuthorizeDraft EIPs

EIP-8141 and ERC-8421 are drafts on an experimental devnet.

AuthorizePrefunded gas tank

The account holds ETH up front; collateral refills it afterwards.

Fund1% slippage bound

On the curve tier, the last-resort fill.

ExecuteWETH-only collateral

One collateral asset in the demo market.

FundOpt-in backstop

Backstop liquidity is opt-in.

Any designGap-down crashes

Below HF ~0.81, bad debt appears under any design.