Fee Dynamics
Last updated
Last updated
The fee mechanism in Bariff is designed to create automatic market incentives that help balance the prices of CHINA and USA tokens. Here’s how it works in detail:
Base Condition (Equal prices)
When CHINA and USA prices are equal (priceDelta = 0), both tokens have a minting fee equal to the baseFee (default 1%). This creates a neutral state where neither token is preferred.
Imbalance Condition (Price Divergence)
When prices diverge, the fee mechanism creates economic incentives to try and restore the balance:
The higher-priced token maintains the base fee (1%)
The lower-priced token’s fee increases proportionally to the price difference
Fee Scaling System
The fee for the lower-priced token is calculated using:
Where:
baseFee is the minimum fee (1%)
cappedDelta is the price difference percentage (capped at 100%)
MAX_FEE is the maximum possible fee (90%)
MAX_PRICE_DELTA is the maximum price delta to consider (100%)
Practical Example:
If USA price is 20% higher than CHINA:
USA maintains a 1% base fee for minting.
CHINA fee increases to approximately 18.1%
This incentivizes users to mint USA (lower fee) rather than CHINA, which creates:
Increased USA supply (potentially lowering price)
Reduced demand for minting CHINA (potentially stabilizing price)
LP System at T=0
At T=0, the system is going to start with the baseCondition at 1% and both tokens will automatically create their own LPs paired with BERA, using V3 and single-sided liquidity.
On the other hand, the USA/CHINA LP will also be created and its main functionality is to be an Stabilizer Pool for the system.