Skip to main content

Overview

Integrators — also called Broadcasters — are partners that create user orders on-chain on behalf of their platforms, 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 via the Broadcaster Register before creating orders.

Registration

To become a broadcaster, integrator must:
  1. Register in the Broadcaster Register smart contract
  2. Use a whitelisted address as msg.sender when calling createOrder and setUserTxOnBaseNetwork functions
After successful registration, broadcaster can call the createOrder function directly from their backend integration.

Order creation

Function

createOrder(CreateOrderParams _create, uint256 _frontEndFee)

Flow

When a broadcaster calls createOrder, it:
  • validates input parameters
  • initializes a new order in state with status = USER_INITIATED
  • records _frontEndFee for later settlement
  • subscribes to OrderStatusChanged(orderId, status) events and show prices to users
  • once auction ends, send user’s transaction to the baseParams.networkId with token baseParams.tokenAddress with amount pricingParams.baseAmount
  • wait until OrderStatusChanged with status 7 = “completed”

Parameters

FieldDescription
orderIdUnique string ID (UUID-style)
baseNetworkIdNetwork where user sends funds
baseTokenAddressAddress of token user sends or 0x0 for native asset (like BTC or ETH)
quoteNetworkIdNetwork where user receives
quoteTokenAddressAddress of token user receives
userAddressRecipient wallet on quote network
baseAmount / quoteAmountOne must be zero, another non-zero
maxPrice_e18Slippage protection
orderValueInUSD_e18Order value in USD (scaled by 1e18)
auctionDurationDuration of solver auction (seconds)
_frontEndFeeBroadcaster commission (basis points, max 10000 = 100%)

Example

OrderEngine.createOrder({
  orderId: "ord_01H...",
  baseNetworkId: "ETH",
  baseTokenAddress: "0xA0b86991c...",
  baseAmount: 100000000,  // 100 USDC (6 decimals)
  quoteNetworkId: "CC",
  quoteTokenAddress: "0x0",
  quoteAmount: 0,
  maxPrice_e18: 1500000000000000000,  // 1.5
  orderValueInUSD_e18: 100e18,
  auctionDuration: 20,
  userAddress: "0x1234..."
}, 20)  // 20 BPS front-end fee

Commission flow

  1. Broadcaster includes _frontEndFee in createOrder
  2. Order executes successfully and both user and solver complete their settlements
  3. Settlement logic distributes broadcaster fee according to on-chain configuration

Typical integration flow

1

Register broadcaster

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

Create user order

Use OrderEngine.createOrder() with correct _frontEndFee.
3

Track order status

Monitor events:
  • OrderStatusChanged(orderId, status)
4

Send transaction

Once auction is over, broadcaster should send user’s transaction to the baseParams.networkId with token baseParams.tokenAddress with amount pricingParams.baseAmount
5

Set user's txHash setUserTxOnBaseNetwork

Once auction is over, broadcaster should call OrderEngine.setUserTxOnBaseNetwork(orderId, txHash). This will link the transaction hash to the order so that it can be settled correctly.
6

Collect fees

After order completion, broadcaster receives commission automatically via the settlement logic.

Validation rules

  • _frontEndFee < 10000
  • orderId and userAddress must be non-empty
  • Only one of baseAmount or quoteAmount must be non-zero
  • orderValueInUSD_e18 > 0
  • auctionDuration > 0
  • orderId must not already exist (status == NOT_EXIST)

Errors

ErrorMeaning
BC_INVALID_PARAMS()Invalid input parameters
BC_INVALID_CALLER()Unauthorized broadcaster
BC_INVALID_ORDER_STATUS()Wrong order state
BC_TX_ALREADY_USED()Transaction already linked

Event

event OrderStatusChanged(string orderId, OrderStatus status)
Can be used by broadcasters to update order states in real time.
I