FOREVER MARKETS
Smart accounts
Deterministic per-user accounts manage collateral and trading without exposing implementation complexity.
Why accounts exist
The protocol needs one canonical place to hold each user’s USDG, position, margin and trading authorization. The factory deploys a deterministic account for each wallet, while the interface presents a normal deposit balance.
The connected EOA remains the owner. Only the owner can withdraw USDG, change sessions or transfer account authority.
One-time trading authorization
Users may sign a scoped EIP-712 session that lets the dedicated relayer submit orders, reductions, closes and cancels without another MetaMask confirmation for each trade.
A session contains a validity window, permitted actions, maximum leverage, per-order size and spend caps, total token budget, nonce and account epoch. It can be revoked individually or all at once.
Trading sessions do not authorize USDG withdrawals, ownership changes, arbitrary calls or session self-extension.
Gas and trust
The relayer pays transaction gas but cannot change the user-signed order. The smart account verifies the owner signature, session key, relayer, nonce, limits and deadline onchain before forwarding the action.