Skip to main content

The fee

FEE_BPS = 30, a constant with no setter. On fulfill the market takes amount × 30 ÷ 10,000, rounded down, from the escrowed token. Refunds, cancellations and bond returns are free. Every settlement emits FeeTaken(id, token, fee), and the API totals them by day in GET /stats.
The fee and what the filler receives, shown before postingThe fee and what the filler receives, shown before posting

Integrator fees

A wallet, aggregator or front end that lists orders can earn its own fee on them. It lists with listVia(token, amount, bond, request, integrator, bps), naming the address paid and a rate from 1 to 100 basis points, so at most 1%.
  • Fixed at listing. The terms are stored in integrators(id), the maker signs them with the listing, and the order page shows them to every filler.
  • Paid only at release. On fulfill, the integrator is credited amount × bps ÷ 10,000, rounded down, next to the protocol fee. Refunds, expiry and cancellations pay nothing.
  • Out of the filler’s proceeds, like the protocol fee, so fillers price it into their quotes.
listVia emits IntegratorSet(id, integrator, bps) and settlement emits IntegratorFeeTaken(id, integrator, token, fee). Integrators withdraw from their credits like anyone else. Orders listed with list have no integrator fee.

The fee recipient

Fees are credited to feeRecipient. The market owner can propose a new recipient, and the change happens only when that address accepts. Changing the recipient never touches fees already credited.

Credits

Every amount that leaves an order (escrow, fee, bond) becomes a credit in credits[owner][asset], where ETH is address(0). Nothing is pushed during settlement, so a recipient that reverts can’t block anyone else’s settlement, and there is no external call for reentrancy.

Withdraw

withdraw(asset, to) sends your whole credit for that asset to any address except zero and the market. The credit is cleared before the transfer, and the market checks both balances moved by exactly the amount.
Credits waiting under ClaimCredits waiting under Claim