> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stonkme.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# On Hyperliquid

> The same market as a contract on HyperEVM, trading trade.xyz stock perps.

`StonkSleeve` is a StonkMe market written for Hyperliquid. It runs on HyperEVM and trades trade.xyz's stock perps on HyperCore, with the same rules as the Solana program.

1. The creator funds the take by sending USDC to the contract's address on HyperCore. `start` moves it into the contract's account on the stock dex. Only the contract can move it.
2. One trader posts a stake, which stays on HyperEVM, and trades only the stocks the creator allowed, through `trade`: an immediate-or-cancel order within 1% of the mark price.
3. Exposure is capped at the money traded.
4. Anyone can `close` once the clock runs out or losses reach 80% of the stake, then `settle` a block later. The trader keeps 30% of any profit; losses come out of the stake first.

HyperCore actions land a block after the call that sends them, which is why closing and settling are two calls.

## Run on testnet

October 6, 2026, contract `0x0bccdbf9699726df5de8e318612d7f3c126f9213` on HyperEVM testnet (chain 998): 50 USDC funded, 30 staked, 0.1 NVDA bought and closed through the contract, settled at 49.90 with the 0.10 loss taken from the stake.

| | Mainnet | Testnet |
| - | - | - |
| trade.xyz dex index | 1 | 65 |
| NVDA perp index (`dex × 10000 + i`) | 10002 | 650002 |
| Order asset id (`100000 + perp`) | 110002 | 750002 |

<Note>The creator funds on HyperCore rather than through the EVM bridge: that's where Hyperliquid users hold USDC, and on testnet a contract's `CoreDepositWallet.depositFor` is never credited.</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.