Live on Robinhood Chain
Kedge

A loan is stuck to whatever you pledged first.

To change what stands behind it you have to repay it — and the money to repay it is exactly what you do not have, because you borrowed it. Kedge borrows the repayment for the length of one transaction: your old collateral comes out, is sold, the new one is bought and pledged, and the same dollars are borrowed straight back against it. The debt that comes out is the debt that went in.

Markets read
every one that lends the dollar
You can move into
with pools to trade through
Our contracts
0
Morpho's and Uniswap's, already live
The problem

You cannot take the collateral out while the loan is still on it.

That is not a flaw in Morpho; it is what makes the loan safe. But it means every ordinary way of changing your mind needs money you do not have — and the two ways round it both cost you something real.

1

Find the cash

Repay the loan out of your own pocket, swap the collateral, pledge it again and borrow again. It works, and it needs the whole debt in dollars, sitting idle, for as long as the four transactions take.

four transactions · the debt, in cash
2

Sell down instead

Sell part of the collateral to repay, then buy the new one with what is left. You end up with a smaller position than you started with, and you have paid the spread on the part you sold twice over.

a smaller position · the same fees
3

Or borrow it for a moment

Morpho will lend anyone the dollars for the length of one call, as long as they come back before it ends. That is the whole trick: the repayment is borrowed, used, and handed back inside a single transaction.

one transaction · no cash at all
How a move runs

Six calls, one signature, nothing left behind.

This is the whole bundle. It is sent to Bundler3 — Morpho's own batching contract — and every call in it is to a contract that was already live on this chain before Kedge existed. Kedge deploys nothing.

  1. Borrow the repayment. morphoFlashLoan takes the debt, plus a small cushion for the interest that accrues while the transaction waits, out of Morpho's own idle dollars. Everything below happens inside that call.
  2. Repay the loan — all of it. By shares, not by dollars: a debt grows every second, and a repayment that misses by a millionth of a dollar leaves a position with dust debt and no collateral, which anyone may then liquidate.
  3. Take the collateral out. The position is empty now, so Morpho lets it go. This is the one step that acts for you, and it is why a signature is needed.
  4. Sell it, and buy the new one. Both hops go to Uniswap's Universal Router in a single call — the old stock to dollars, those dollars to the new stock. Each hop is routed to whichever pool, v3 or v4, gets the most for it.
  5. Pledge the new collateral and borrow the same dollars back. Against the new stock, in the new market, at that market's own rate.
  6. Hand the flash loan back, and repay the cushion into the new loan, so the debt that comes out is the debt that went in.

The permission is temporary. Steps 3 and 5 act on your position, so Morpho wants an authorisation. Rather than leaving one standing, the bundle carries two signatures over consecutive nonces: it grants the permission in its first call and revokes it in its last. After the transaction, isAuthorized is false again — the fork suite asserts exactly that after every move it makes.

What it costs

Two different questions hide in that word.

One of them is money that is gone. The other is an opinion held by two price feeds. Kedge shows them separately, because adding them together would flatter every move on this chain.

The trading cost

Two pool fees and the price your own size moves, measured against the same two pools at their mid price. Kedge prices it by simulating the pools exactly — the same arithmetic the pool runs, in the page, over the tick data it has actually read — so the number is not an estimate from a formula. It is never negative, and it is the money you do not get back.

What the two oracles make of it

Morpho values collateral from an oracle, not from a pool, and on this chain the two do not always agree. Arriving in a market whose oracle sits above its pool gives the position more borrowing power than you paid for. That is worth knowing and it is not profit, so it is reported on its own line.

Where a position could go

priced live

The worked example above, against every market with enough left to lend and a pool to trade through. Cheapest first.

Move intoTo tradeAt the oraclesRate you would payLiquidation
reading the chain…
The rate you arrive at

The posted rate is not the rate you will pay.

Every Morpho market here prices borrowing off how full it is. These markets are small, so a loan arriving in one is not a rounding error — it is the thing that sets the rate.

Kedge answers that with a line-by-line port of Morpho's Adaptive Curve IRM, taken from the verified source of the contract deployed on this chain. Because the port takes the market state as an argument, it can be asked about a state that has not happened yet: what will this market charge once my loan is in it? The scan checks the port against the deployed model on every market it lists, and the answers have to agree to the unit.

The market you leave is reported too. A loan going out of a small market lowers the rate for everyone still borrowing there, and that is part of an honest picture of a move.

port vs the deployed model:
What can go wrong

A move is a trade, and it is still a loan afterwards.

The new market can liquidate you sooner

Markets lend at different thresholds — 62.5% against some stocks here, 38.5% against others. The same debt against the same value of collateral can be comfortable in one and close to the edge in another. Kedge shows the liquidation price on both sides and refuses any move that would land above 90% of the destination's threshold.

These pools are thin

The whole move goes through them twice. Kedge prices every pool a stock trades in, at your size, and refuses a hop it cannot price from the tick data it has read rather than guessing at the depth beyond it. The transaction carries one floor, on the collateral that comes out the far end.

The destination has to have the dollars

Your debt is borrowed again on arrival, so a market with less left to lend than you owe cannot take you, however good it looks. Every row on the board is checked against that first, and the ones that fail say so instead of disappearing.

Oracles and pools disagree

Every market's oracle is checked against a Uniswap pool for the same stock, and one that disagrees by more than 25% is marked suspect and never offered as a destination. A market's own oracle cannot corroborate itself.

Nothing here is advice

Kedge does not decide what you should be long of. It prices the change you are considering and sends it as one transaction instead of four.

Kedge holds nothing

No contract of ours is deployed, no balance of yours passes through anything we own, and no permission is left standing afterwards. If this site went dark tomorrow your position would be exactly where you left it, in Morpho.

What has actually been checked

Claims, and what stands behind each one.

    The same record, as the suites wrote it: /js/proof.json — built from the results files and nothing typed in.

    Not built. A sabotage sweep: deliberately breaking one part of the move at a time — the flash loan's size, the repayment by shares, the minimum on the swap — to confirm the suite notices each one. Until that exists, the suites prove that the move works, not that they would catch it if it stopped working. It is named here rather than left out, because a gap that is not mentioned reads as a clean bill.