Barrif on Berachain
  • 🐻Bariff— Onchain Wars
  • INTRODUCTION
    • ⛓️Abstract
    • ⛓️Core Mechanics
    • 💧Liquidity Pool & Incentives
    • 📊Fee Dynamics
  • LBE & TOKENOMICS
    • 💧Liquidity Bootstrapping Event
    • 🪙Tokenomics
Powered by GitBook
On this page
Export as PDF
  1. INTRODUCTION

Fee Dynamics

PreviousLiquidity Pool & IncentivesNextLiquidity Bootstrapping Event

Last updated 1 month ago

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:

  1. 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.

  1. 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

  1. Fee Scaling System

  • The fee for the lower-priced token is calculated using:

scaledFee=baseFee+(cappedDelta⋅(MAX_FEE−baseFee))\text{scaledFee} = \text{baseFee} + \left(\text{cappedDelta} \cdot (\text{MAX\_FEE} - \text{baseFee})\right) scaledFee=baseFee+(cappedDelta⋅(MAX_FEE−baseFee))

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%)

  1. 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)

  1. 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.

📊