Collecting Fees
How fees accumulate on-chain and how to withdraw your venue revenue.
Fees are collected automatically on every trade fill. As a venue operator, your share is transferred directly to your feeRecipient address during each matchOrders call — there is no separate withdrawal step.
How Fees Accrue
Every time matchOrders executes a fill, fees are calculated and distributed immediately to four recipients:
| Recipient | Fee | How It's Paid |
|---|---|---|
| Protocol treasury | 20 bps (fixed) | Direct transfer during fill |
| Venue fee recipient | 1–200 bps (minus creator share) | Direct transfer during fill |
| Market creator | 0–venue fee bps | Direct transfer during fill |
| Match operator | 10 bps (fixed) | Direct transfer to msg.sender |
Fees are paid in the market's collateral token (USDC). There is no accrual or pending balance — each fee share is transferred on-chain as part of the fill transaction.
Checking Fee Revenue
Query cumulative fees for your venue via the subgraph:
{
venue(id: "1") {
totalFees
totalVolume
}
}Or get daily fee snapshots:
{
venueDailySnapshots(
where: { venue_: { venueId: "1" } }
orderBy: timestamp
orderDirection: desc
first: 30
) {
dailyFees
dailyVolume
cumulativeFees
timestamp
}
}For per-fill fee breakdowns:
{
feeEvents(
where: { market_: { marketId: "42" } }
orderBy: timestamp
orderDirection: desc
) {
protocolFee
venueFee
creatorFee
operatorFee
totalFees
timestamp
}
}Fee Recipient Management
The feeRecipient address receives both:
- Your venue's share of trading fees (on every fill)
- 50% of market creation fees (when markets are created)
To change the fee recipient:
// Via writeContract (not yet wrapped in SDK)
const hash = await walletClient.writeContract({
address: diamondAddress,
abi: VenueFacetABI,
functionName: 'updateVenue',
args: [
venueId,
'My Venue', // name
'', // metadata
tradingAccessControl, // keep existing
creationAccessControl, // keep existing
newFeeRecipient, // new address
],
});The feeRecipient cannot be the zero address. Changes take effect immediately for all subsequent fills.
Market Creation Fees
Market creation fees are collected separately when createMarket is called. The fee is split 50/50 between the protocol treasury and your venue's feeRecipient. This fee is set at venue creation and cannot be updated.
| Constraint | Value |
|---|---|
| Minimum | 5 USDC |
| Split | 50% protocol, 50% venue |
| Updatable | No |
What's Next
- Fee Structure → — understand the four-layer fee model
- Venue Admin → — manage your venue configuration