Actions

Three things you can do in one signature

Each action is a fixed recipe of contract calls that runs inside a single flash-loan callback. Below: what every step does, which contracts it touches, the live numbers behind it and the guardrails that make it revert instead of half-succeed.

Open the app
Perpetualaction 01

Perpetual. one deposit, up to 2.6x

You bring USDG. The router flash-borrows the rest, buys the stock on Uniswap, posts it as collateral on Morpho, borrows USDG against it and repays the flash loan. What is left is a leveraged long, opened in one signature.

When to use it
  • You want more exposure to a name than your cash allows, without a margin account
  • You want the loan priced by an on-chain rate curve instead of a broker's margin rate
  • You want the whole position visible and closable on-chain at any hour
Live numbers
NVDA max leverage
NVDA borrow APY
AdaptiveCurve IRM, live
Idle USDG to borrow
in the NVDA market right now
Flashable USDG
idle across all Morpho markets
txPerpetual recipe
executing
one block
01Flash borrow
Morpho
02Swap
Uniswap v3
03Supply
Morpho
04Borrow
Morpho
05Repay
Morpho
capital in
1,000 USDG
flash borrowed
1,500 USDG
if any step fails
nothing happened
Contract calls, in order
  1. 01
    Morpho.flashLoan(USDG, flashAmount, data)
    Fee-free, must be repaid before the callback returns
  2. 02
    SwapRouter02.exactInputSingle({ tokenIn: USDG, tokenOut: STOCK, fee, amountOutMinimum })
    amountOutMinimum comes from the quote you saw, minus your slippage tolerance
  3. 03
    Morpho.supplyCollateral(market, tokens, onBehalf: you)
    Collateral is credited to your address, not the router
  4. 04
    Morpho.borrow(market, debt, onBehalf: you, receiver: router)
    Requires a one-time Morpho authorization for the router
  5. 05
    USDG.transfer(Morpho, flashAmount)
    Closes the flash loan inside onMorphoFlashLoan
Guardrails
  • /The app refuses to open above 90% of the liquidation threshold
  • /The swap reverts if output falls below your minimum, and with it the whole transaction
  • /Borrow is blocked when the market's idle USDG is smaller than your debt
Open perpetual in the app
Rotateaction 02

Rotate. swap collateral, keep the loan

Move a position from one stock to another without closing it. The router flash-borrows your debt amount, repays it to release the old collateral, swaps that collateral, supplies the new one, borrows the same debt again and repays the flash loan.

When to use it
  • You want to rotate sectors, NVDA into AAPL, without cash sitting idle for a settlement cycle
  • You are happy with your loan size and only want to change what backs it
  • A market for the destination stock has enough idle USDG to re-open your debt
Live numbers
NVDA oracle
Morpho oracle, Chainlink backed
AAPL oracle
same source
AAPL idle USDG
room to re-open debt
Rate change
NVDA market to AAPL market
txRotate recipe
executing
one block
01Flash borrow
Morpho
02Repay and withdraw
Morpho
03Swap
Uniswap v3
04Supply and borrow
Morpho
05Repay
Morpho
capital in
1,000 USDG
flash borrowed
1,500 USDG
if any step fails
nothing happened
Contract calls, in order
  1. 01
    Morpho.flashLoan(USDG, debt, data)
    Sized from your live borrow shares
  2. 02
    Morpho.repay(oldMarket, debt, onBehalf: you)
    Clears the loan so the collateral can leave
  3. 03
    Morpho.withdrawCollateral(oldMarket, tokens, onBehalf: you, receiver: router)
    Router holds the tokens only for this transaction
  4. 04
    SwapRouter02.exactInput(path)
    Path is chosen by the quoter: direct, via USDG or via WETH
  5. 05
    Morpho.supplyCollateral(newMarket) then Morpho.borrow(newMarket, debt)
    Debt is re-opened at the same USDG amount
Guardrails
  • /Blocked when the destination LTV would sit above 98% of its liquidation threshold
  • /Blocked when the destination market cannot supply your debt
  • /Slippage on the stock-to-stock leg is bounded by your minimum output
Open rotate in the app
Arbitrageaction 03

Arbitrage. zero balance, borrowed inventory

The same stock trades in several pools. When one prices it below another by more than both pool fees, the router flash-borrows USDG, buys at the cheap venue, sells at the dear one and repays. Whatever clears is yours, and if nothing clears the transaction reverts and costs only gas.

When to use it
  • Weekends and after-hours, when the underlying is closed and pools drift apart
  • Right after large trades, before other bots rebalance the pools
  • Any time the scanner shows a net spread above zero on a ticker with two or more venues
Live numbers
Venues scanned
Uniswap v3, v4 and forks
Tickers with two or more venues
pairwise spreads computed
Widest deviation now
Refresh
every venue re-read from chain
txArbitrage recipe
executing
one block
01Flash borrow
Morpho
02Buy
cheap venue
03Sell
dear venue
04Repay
Morpho
05Keep
you
capital in
1,000 USDG
flash borrowed
1,500 USDG
if any step fails
nothing happened
Contract calls, in order
  1. 01
    Morpho.flashLoan(USDG, size, data)
    Or a Uniswap v3 flash if the route needs WETH
  2. 02
    SwapRouter02.exactInputSingle(USDG -> STOCK) on venue A
    Uniswap v3 and forks; v4 via the Universal Router
  3. 03
    SwapRouter02.exactInputSingle(STOCK -> USDG) on venue B
    amountOutMinimum is set to size plus your minimum profit
  4. 04
    require(profit >= minProfit)
    Otherwise revert: no partial fills, no inventory left behind
Guardrails
  • /Net spread ignores price impact, so size stays small until the router simulates the exact fill
  • /A minimum-profit check makes an unprofitable attempt revert instead of executing
  • /Gas is the only cost of a failed attempt
Open arbitrage in the app
Which stocks

Every action needs a live market or a live pool

Leverage and rotate need a Morpho market with USDG supply. Arb only needs two venues pricing the same token.