Docs

Piton protects USDG loans on Morpho Blue (Robinhood Chain) from liquidation. When a loan's loan-to-value ratio reaches a trigger the borrower chose, Piton repays part of the debt and sells the matching collateral on Uniswap v3, so the loan goes back to the borrower's target instead of being liquidated.

Markets

NVDA / USDGMorpho market 0x8b16…9c3e, liquidation at 62.5% LTV. Sold through the Uniswap v3 NVDA/USDG 0.05% pool.
SPCX / USDGMorpho market 0x9b4b…297b, liquidation at 62.5% LTV. Sold through the Uniswap v3 SPCX/USDG 0.05% pool.
GOOGL / USDGMorpho market 0x7fa8…d0ba, liquidation at 62.5% LTV. Sold through the Uniswap v3 GOOGL/USDG 0.05% pool.
WETH / USDGMorpho market 0x7c82…66e2, liquidation at 77% LTV. Sold through the Uniswap v3 WETH/USDG 0.01% pool.

Setting it up

  • Your loan stays on Morpho in your own address. Piton never takes custody.
  • Call setAuthorization(Piton, true) on Morpho. This lets the Piton contract repay and withdraw collateral for you, and its code only uses it inside a rescue.
  • Call setRule(market, trigger, target) on Piton. The trigger must be at least 2 points under liquidation (max 60.5% on stocks, 75% on WETH), the target at least 3 points under the trigger and at least 10%.
  • To stop: setRule(market, 0, 0), or revoke the authorization on Morpho.

A rescue

  • A keeper checks every protected loan each minute with needsProtection() and calls protect() when it returns true. protect() is open to anyone.
  • The LTV is the debt over the collateral valued at the market's own Morpho oracle, the same price that decides liquidations.
  • The contract computes the collateral to sell so the loan lands at the target after the price bound and the fee: sell value = (debt − target × collateral value) / (k − target), with k = 1 − slippage bound − fee.
  • Order: the debt is repaid first; inside Morpho's repay callback the collateral is withdrawn and sold on Uniswap. The loan is never less healthy at any step.
  • The sale must return at least the oracle value minus 1.5%, or the whole rescue reverts and nothing changes.
  • From the sale: the debt repayment, Piton's fee (0.1% of the sale, capped at 0.5% by the contract), and anything left goes back to the borrower in USDG.

Costs

While protectedNothing
A rescueUniswap pool fee (0.05% stocks, 0.01% WETH), price impact of the sale, Piton fee 0.1% of the sale
A Morpho liquidation, for comparisonIncentive of 12.68% (stocks) or 7.4% (WETH) of the debt repaid, paid in your collateral to the liquidator

Owner powers

  • List a Morpho market with its Uniswap pool fee tier, or unlist it.
  • Set the fee and its receiver, at most 0.5%. Set the slippage bound between 0.1% and 3%.
  • Nothing else. There is no function that moves collateral, debt or USDG of any borrower.

Risks

  • A drop faster than the keeper's check, or a sale that cannot meet the price bound in a thin market, can still end in a Morpho liquidation.
  • Stock prices pause while the market is closed. If the pool drifts more than 1.5% from Morpho's oracle, a rescue waits until it is back in range.
  • The oracle, Morpho and Uniswap are outside Piton's control.
  • Unaudited. Tested on a fork of Robinhood Chain against the live markets. Start small.

Contracts

Pitondeploys at launch
Morpho Blue0x9D53…1010
Uniswap v3 SwapRouter020xcaf6…5cb2