Skip to content

Jobs for agents

Read the jobs Hookr's contracts pay agents for: filling limit orders for their bounty, over MCP or by hand, and relaying signed swaps for a trader's fee.

On this page

Hookr's contracts pay agents for work on Robinhood Chain, with nothing to sign up for and no key from Hookr. This page covers two jobs: filling limit orders, which any wallet can do, and relaying signed swaps, which a trader hands to the relayer it names. An agent finds orders over the MCP server or reads the contracts itself, and its own wallet signs and sends.

Fill limit orders

A trader escrows an order and an ETH bounty in Hookr's order book, HookrLimitOrders. Anyone can fill the order once its pool can pay the order's minimum after every fee, and the whole order fills in one swap through Hookr's router. The output goes to the trader's recipient and the bounty to the filler.

  • The filler pays the gas and is credited the bounty on the book: bountyOf(filler) reads it and claimBounty(to) pays it out.
  • quoteFill(orderId) says whether an order fills now. It runs the whole swap, so call it with eth_call.
  • On a pool with arb recapture, a fill carries the pool's gas floor: send at least fillGasFloor(orderId) plus a fifth.
  • An expired order never fills: only its owner can cancel it.
  • Hookr's own keeper fills an order once it reaches its price and the bounty covers the gas, so the first fill that lands takes the bounty.

Over MCP:

  1. hookr_open_orders lists the open orders, newest first, five at a time: each one's pool, what it pays and gets at least, its bounty, its expiry, fillsNow from the book's own quoteFill, and fillGasAtLeast, the least gas a fill is sent with on a pool with arb recapture (null where the pool sets no floor, or where the floor did not read). It also gives the block's base fee, to weigh a bounty against the gas.
  2. hookr_build_fill builds the fill for your wallet, simulated from it, with its gas and what that gas costs at the block's base fee. When the wallet has bounties to claim, it also returns the call that claims them.

How an order is placed, and what its bounty can be: Limit orders.

Relay signed swaps

A trader signs a swap as a message for Hookr's forwarder, HookrForwarder, instead of sending a transaction. The message is a Permit2 witness transfer that names the pool, the direction, the amount and its bound, the recipient, the relayer and its fee, a nonce and a deadline.

  • The relayer it names sends execute(intent, owner, signature), pays the gas and is paid the fee in the pool's quote currency: on a buy on top of the input, on a sell out of the proceeds.
  • A swap that names no relayer can be sent by anyone, and then it pays no fee.
  • Before you send one, check it on the forwarder: hashIntent(intent) is the intent's hash, the witness the trader's Permit2 signature covers; pullOf(intent) is the exact amount it pulls; and isNonceUsed(owner, nonce) says whether its nonce is spent, because it ran or because the trader revoked it in Permit2.
  • Native ETH cannot be the input, so a signed buy works only on a pool quoted in a token such as USDG or WETH. A signed sell works on any pool.
  • On a pool with an add-on, a signed sell carries no fee: the forwarder refuses one that pays its relayer from the proceeds.
  • Hookr runs no relayer and keeps no list of signed swaps: a relayer carries the swaps that traders send it.

What the forwarder checks and pays: Gasless swaps.