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:- Register in the Broadcaster Register smart contract
- Use a whitelisted address as
msg.sender
when callingcreateOrder
andsetUserTxOnBaseNetwork
functions
createOrder
function directly from their backend integration.
Order creation
Function
createOrder(CreateOrderParams _create, uint256 _frontEndFee)
Flow
When a broadcaster callscreateOrder
, 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
Field | Description |
---|---|
orderId | Unique string ID (UUID-style) |
baseNetworkId | Network where user sends funds |
baseTokenAddress | Address of token user sends or 0x0 for native asset (like BTC or ETH) |
quoteNetworkId | Network where user receives |
quoteTokenAddress | Address of token user receives |
userAddress | Recipient wallet on quote network |
baseAmount / quoteAmount | One must be zero, another non-zero |
maxPrice_e18 | Slippage protection |
orderValueInUSD_e18 | Order value in USD (scaled by 1e18) |
auctionDuration | Duration of solver auction (seconds) |
_frontEndFee | Broadcaster commission (basis points, max 10000 = 100%) |
Example
Commission flow
- Broadcaster includes
_frontEndFee
increateOrder
- Order executes successfully and both user and solver complete their settlements
- 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
anduserAddress
must be non-empty- Only one of
baseAmount
orquoteAmount
must be non-zero orderValueInUSD_e18 > 0
auctionDuration > 0
orderId
must not already exist (status == NOT_EXIST
)
Errors
Error | Meaning |
---|---|
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 |