Veyronn Documentation

Delegated Sessions

Authorize offline execution without handing over unrestricted wallet control.

A trading session is an on-chain capability granted by an owner to a specific executor.

Session bounds

The TradingSessionRequest records:

  • executor address
  • whether open, reduce, and close are allowed
  • maximum collateral
  • maximum position size
  • maximum leverage
  • expiry
  • allowed market IDs

Each session also tracks revocation and a monotonically increasing nonce.

Execution flow

  1. The wallet creates the bounded session on-chain.
  2. The user reviews an intent draft.
  3. The wallet signs the exact EIP-712 intent message.
  4. The BFF verifies signature, domain, expiry, payload, and owner before queueing.
  5. The keeper repeats verification and checks the current session.
  6. A fresh oracle report is fetched.
  7. The transaction is simulated and submitted through delegatedOpenPosition or delegatedClosePosition.
  8. The protocol increments the session nonce and emits TradingSessionUsed.

Revocation

The owner can revoke a session on-chain. Revocation does not require the keeper to be online and blocks future delegated use at contract level. Expiry has the same fail-closed effect.