Skip to main content

Overview

Broadcasters (also called Integrators) — partners that create user orders on-chain on behalf of their users, wallets, or marketplaces. They broadcast user intents into the Bron network and receive a front-end fee per executed order. Each broadcaster must be registered and authorized in the Broadcaster Register smart contract before creating any orders.

Registration

To become a broadcaster:
  1. Register in the Broadcaster Register smart contract.
  2. Use the registered (whitelisted) address as msg.sender when calling contract functions:
    • createOrder
    • setUserTxOnBaseNetwork
After registration, you can call createOrder directly from your backend or programmatic service.

Order creation

Function

createOrder(CreateOrderParams _create, uint256 _frontEndFee)

Flow

When a broadcaster calls createOrder, it:
  • validates parameters
  • initializes a new order with status = USER_INITIATED
  • stores _frontEndFee for settlement
  • emits OrderStatusChanged(orderId, USER_INITIATED)
  • triggers the auction phase and waits for solvers’ quotes
  • once the auction finishes, broadcaster must send user’s funds from baseParams.networkId
  • after sending funds, broadcaster calls setUserTxOnBaseNetwork(orderId, txHash)
  • waits until status COMPLETED (7)

Parameters

FieldDescription
orderIdUnique string ID (UUID-style)
baseNetworkIdNetwork where user sends tokens
baseTokenAddressToken contract on base chain, or 0x0 for native assets
baseAmountAmount user sends (in token decimals)
quoteNetworkIdNetwork where user receives tokens
quoteTokenAddressToken contract on quote chain, or 0x0 for native assets
quoteAmountAmount user receives (opposite side to baseAmount)
maxPrice_e18Maximum price in e18 units (slippage limit)
orderValueInUSD_e18Total value of order in USD, scaled by 1e18
auctionDurationSolver auction duration in seconds
userAddressDestination address on quote network
_frontEndFeeBroadcaster fee (basis points, 10000 = 100%)

Example

const tx = await orderEngine.createOrder({
    orderId: 'ord_01H7FZ9A8XY...',
    baseNetworkId: 'BTC',
    baseTokenAddress: '0x0',
    baseAmount: Big(0.01).mul(Big(10).pow(8)).toFixed(),    // 0.01 BTC
    quoteNetworkId: 'ETH',
    quoteTokenAddress: '0x0',
    quoteAmount: Big(0.2796).mul(Big(10).pow(18)).toFixed(), // 0.2796 ETH
    maxPrice_e18: Big(27.96).mul(Big(0.994)).mul(Big(10).pow(18)).toFixed(),
    orderValueInUSD_e18: Big(1220).mul(Big(10).pow(18)).toFixed(),
    auctionDuration: 20,
    userAddress: '0x1234...',
    liquidationReceiver: '0x0000000000000000000000000000000000000000' // deprecated, always set to zero
  },
  BigInt(3), // 0.03% broadcaster fee (3 bps)
  { gasLimit: 1_000_000 }
);

await tx.wait();

Commission flow

  1. Broadcaster specifies _frontEndFee during order creation, in bps.
  2. Once order executes and both sides settle, on-chain logic distributes the broadcaster.
  3. Broadcaster fees can be collected at any time via SolverRegister.collectBroadcasterFees().

Typical integration flow

1

1. Register broadcaster

Call BroadcasterRegister.register(address) and fund the account.
2

2. Create order

Call orderEngine.createOrder() with all required params and your frontend fee.
3

3. Monitor status

Subscribe to:
event OrderStatusChanged(string orderId, OrderStatus status)
4

5. Show the price to user

Once you receive the event OrderStatusChanged(orderId, 2), show the current best quote to the user.
5

5. Send user transaction

When the auction ends, send user’s base token from baseNetworkId and baseTokenAddress to the solver’s settlement address quoteParams.solverAddress.
6

6. Link txHash

Call setUserTxOnBaseNetwork(orderId, txHash) to confirm user payment.
7

7. Fee settlement

After completion, your frontend fee is distributed automatically on-chain.

Validation rules

  • _frontEndFee < 10000
  • orderId and userAddress must be non-empty
  • Exactly one of baseAmount or quoteAmount must be non-zero
  • orderValueInUSD_e18 > 0
  • auctionDuration > 0
  • orderId must not exist before creation

Errors

ErrorMeaning
BC_INVALID_PARAMS()Invalid parameters
BC_INVALID_CALLER()Unauthorized broadcaster
BC_INVALID_ORDER_STATUS()Invalid state transition
BC_TX_ALREADY_USED()Transaction hash already linked

Example broadcaster implementation

See BroadcasterService — reference implementation using @bronlabs/intents-sdk, ethers, and Hono HTTP server: https://github.com/bronlabs-intents/intents-broadcaster-example This service:
  • Listens for HTTP requests (POST /orders, GET /orders/:id, POST /orders/:id/accept)
  • Creates on-chain orders
  • Tracks order statuses
  • Sends user transactions after auctions
  • Print order statuses