Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integration Guide

Integrate LeverAcc with EIP-712 signed intents: the user lifecycle from account creation to close-out, common pitfalls and available tools.

This page is an overview. Detailed interface references, ABIs and examples are provided to partners during onboarding.

Integration model

Your users sign; anyone can submit. LeverAcc uses EIP-712 signed intents: the user signs an intent with their own wallet, and your backend (or any relayer) submits it on-chain. Every intent is bound to the chain, the Account, the project, the user, a nonce and an expiry, and can be used only once.

User lifecycle

  1. Create the account: the user signs CreateAccountIntent (with your project ID), or creates an unbound account and later signs BindProjectIntent.

  2. Bind your execution wallet: the user signs BindExecutionWalletIntent; your project operator signs ProjectExecutionWalletApproval.

  3. Builder fee approval: your project signs ApproveProjectBuilderFeeIntent, and LeverAcc completes the Hyperliquid builder-fee approval for the account.

  4. Fund and borrow: the user deposits and signs BorrowIntent.

  5. Trade: your execution wallet places orders on Hyperliquid for the account.

  6. Repay / withdraw: the user signs RepayIntent or one of the withdraw intents.

  7. Close out: the user signs RequestStopIntent; anyone calls settle().

Things to get right

  • Discover addresses from the Registry, not from hard-coded values. The active vault is read from the Fund Vault Manager; the current account logic is upgradeable.

  • A transaction receipt is not a deposit. Moving funds between HyperCore and HyperEVM is confirmed by reading balances, not by the submission receipt.

  • Use your project's own wallets. The project operator must not be the same as any risk wallet.

  • Expect fail-closed behaviour. If protocol risk mode is active, a stop is pending, or a fee settlement window is open, some actions are refused with clear errors. Retry after the condition clears.

Tools

  • Contract ABIs and Solidity interfaces

  • Indexed protocol events (subgraph)

  • Gas Station API for HYPE gas and HyperCore account activation (see Gas Station)

  • Testnet environment for end-to-end rehearsal before mainnet

Last updated