Why Symmetric Fees?
Fees for binary options with complementary relationships must be symmetric to preserve market integrity.Symmetric means that someone selling 100 shares of
A @ 0.01.This is necessary because minting/merging complementary token sets for collateral can happen at any time, and asymmetric fees would create arbitrage opportunities.Fee Application Rules
Fees are applied differently based on the order side:Buying Outcome Tokens
Fee is levied on the proceed tokens (the outcome tokens received)
Selling Outcome Tokens
Fee is levied on the proceed collateral (the USDC/collateral received)
Fee Parameters
Base Fee Rate
ThefeeRateBps field in the Order struct defines the base fee rate in basis points (BPS).
OrderStructs.sol
The base fee rate corresponds to 2x the fee rate (collateral per unit of outcome token) paid by traders when the price of the two tokens is equal (i.e., 0.50).
Maximum Fee Rate
The exchange enforces a maximum fee rate to protect users:Fees.sol
Fee Calculation Formulas
The fee calculation adjusts based on price to maintain symmetry. The exchange usesmin(price, 1-price) to ensure symmetric fees.
- Selling (Collateral Fee)
- Buying (Token Fee)
Case 1: Selling Outcome Tokens
When selling outcome tokens for collateral, the fee is charged on the collateral proceeds:Implementation:CalculatorHelper.sol
feeRateBps- Fee rate in basis points (1 bp = 0.01%)outcomeTokens- Number of outcome tokens being soldBPS_DIVISOR- 10,000 (converts basis points to decimal)ONE- 10^18 (for fixed-point precision)
Fee Calculation Examples
The following examples demonstrate fee symmetry withbaseFeeRate = 0.02 (200 BPS or 2%):
Example 1: Equal Prices ($0.50)
Example 1: Equal Prices ($0.50)
Example 2: Low Price ($0.10)
Example 2: Low Price ($0.10)
Implementation Details
The complete fee calculation is implemented in theCalculatorHelper library:
CalculatorHelper.sol
Key Properties
Symmetry
Complementary trades at prices
p and 1-p pay identical fee valuesPrice Adjustment
Fees adjust dynamically based on
min(price, 1-price) to maintain fairnessProceeds-Based
Fees are always charged on what you receive, not what you pay
Capped
Maximum fee rate of 10% (1000 BPS) protects users from excessive fees