Exit
How a strategy is unwound and its money paid to your withdrawal address, with DLTX's help or without it.
An exit closes a strategy for good and pays everything to your withdrawal address. You can start one at any time, with one signature, and it finishes with or without DLTX.
If you only want your money back in your balance, DLTX can also unwind a strategy and pay it back to your deposit contract; that is an ordinary operation, not an exit. An exit is for when you want out of DLTX's hands.
The rules of an exit
- It is one-way. Once a contract is exiting, DLTX's powers over it are gone for good, and nothing reverses it.
- Anyone may push it forward. Every step is a public function that anyone may call, and every step is harmless to repeat. A stalled caller costs time, not money.
- The money goes to one place. All the USDC goes to your withdrawal address, read from your owner record on Arbitrum. It does not pass through your balance.
- No one chooses the price. The long contract sells at Aave's oracle price, within its price bound; the short contract closes at Hyperliquid's oracle price, within its order bound. Prices come from an oracle, never from whoever drives the exit.
What happens, in order
- Begin. The exit starts on one half, by your signature or through the escape hatch. That half tells its partner with a Circle message, and the partner begins too. If the message cannot be sent at that moment, anyone can send it later.
- The short contract unwinds. It cancels its orders, closes the position reduce-only at the oracle price within its bound, moves its margin back to HyperEVM, and burns all its USDC over Circle's bridge to the long contract, the only address it can send to. It buys a little HYPE for gas on Hyperliquid if it needs to.
- Circle attests the transfer, and the USDC is minted to the long contract on Arbitrum.
- The long contract unwinds. It repays its Aave debt (from its USDC, then by repaying with its own collateral where it must), withdraws everything once the debt is zero, sells its WETH at Aave's oracle price within its bound, and pays all the USDC to your withdrawal address.
While one half is still running and the other is exiting, DLTX may only reduce risk on the running half.
Exit with DLTX
- In the app, you sign an exit request for the strategy: one signature, valid on both halves.
- DLTX checks your signature against your deposit contract, begins the exit on both halves, and drives every step above until both are done, about every 25 seconds per half.
- The app shows the exit's progress, and warns you if a step has been stuck for ten minutes (for example, while Circle's bridge is paused).
Exit without DLTX
You do not need DLTX to exit. Every call below is public: you can make it yourself, or anyone you trust can make it for you. Whoever makes the calls pays the gas: ETH on Arbitrum, HYPE on HyperEVM. The money still goes only to your withdrawal address.
1. Begin, on either half. Two ways:
- With your signature, at any time. Sign the exit message with one of your credentials, and
call
beginExit(deadline, signature)on the long contract or the short contract. A wallet credential can sign without DLTX's website; a passkey cannot (see your credentials). - Without a signature, once DLTX has been silent for 7 days. If the execution key operating
your strategy has not checked in for 7 days, anyone may call
beginExitStopped()on each half.
If the other half has not begun after a while, call notifyPartner() on the half that has.
2. Drive the short contract, on HyperEVM. Call exitStep until the position is closed and its
USDC has been burned toward the long contract. If it needs HYPE for gas on Hyperliquid, call
topUpHype and send some with the call. bridgeOut() sends any USDC left on HyperEVM to the long
contract.
3. Bring the USDC to Arbitrum. Each burn is a Circle message. Fetch its attestation from
Circle's public attestation service, and call receiveMessage on Circle's MessageTransmitter on
Arbitrum: the USDC is minted to the long contract. Anyone may relay it.
4. Drive the long contract, on Arbitrum. Call exitStep(0, 0) until its debt is repaid, its
collateral sold and its USDC paid to your withdrawal address. (The two arguments let a caller work
in smaller pieces when a single step is too large for the market; 0 means all.)
Before an exit: stopping DLTX
You do not have to exit to stop DLTX. On either half of a strategy you can revoke the execution key, and on the short contract you can replace the trading agent with an inert address, each with one signature. See stopping DLTX.
What can slow an exit down
- Circle's bridge. The short contract's USDC reaches the long contract over Circle's bridge. If Circle pauses it, the exit waits.
- No gas on Hyperliquid. The short contract needs a little HYPE to move its USDC; anyone may send it some.
- Unusual markets. A position in a market with no independent price (an ETH strategy holds none), or one that will not fill within the order bound, needs an order you sign yourself to close: the contract cannot price it alone.
- Leftover tokens on Hyperliquid. Small balances of tokens other than USDC can be swept only to one of your wallet credentials, 24 hours after it is first named for the sweep.