Balancing Curves


Balancing Curves, as outlined in BIP-0007, introduce a dynamic mechanism within BabelFish's ecosystem to achieve and sustain optimal equilibrium in the allocation of stablecoins within the aggregator. This dynamic system steers the aggregator towards balance by strategical incentivization and penalization of user actions, creating a responsive and equitable decentralized finance (DeFi) platform at the core of BabelFish's operations.

Balancing curve technical specification

A formula is derived to provide an incentive which depends on the balance of the basket before and after a given transaction, in such a way that the incentive is positive for deposit operations that bring the stablecoins closer to their target weights and negative for withdrawal operations that bring stablecoins further from their target weights.
∑1Nwi=1\sum\limits_{1}^N {w_i}=1
∑1NTi=1\sum\limits_{1}^N {T_i}=1
We define
as a measure of the basket’s distance from optimality:
D=1N∑1N(wi−Ti)2D= \frac 1 N\sum\limits_{1}^N ({w_i-T_i})^2
With weights
and target weights
is also in
. We calculate an asymptotic function:
is a constant used to calibrate the formula to be as shallow or as steep as desired. We calculate the difference between
before and after the transaction:
In the case where a withdrawal has a positive reward, or a deposit a negative reward, $R$ is set to 0. Negative rewards are removed in XUSD from a user’s withdrawal prior to conversion to the required stablecoin and kept in a vault. Positive rewards are paid from the vault and added to the user’s minted XUSD after conversion.

Balancing Curves Technical Components:

  1. 1.
    • The Aggregator is like the control center, combining stablecoins from different blockchains into a meta-stablecoin called XUSD.
    • Currently aggregated stablecoins
      • Native Rootstock stablecoins:
      • Stablecoin bridged and used in Rootstock ecosystem:
      • BNB Smart Chain aggregated stablecoins:
      • Ethereum aggregated stablecoins:
  2. 2.
    Conversion Fees:
    • Conversion Fees are charges users encounter when withdrawing stablecoins. They serve as imbalance fees and act as a corrective tool, nudging the Aggregator back to its optimal balance. It's prupose is discouraging deviations from the target weight. It's worth noting that Conversion Fees aren't applied for withdrawals of stablecoins exceeding the target weight, creating a nuanced approach to incentivize smart withdrawals.
  3. 3.
    Reward Manager Smart Contract:
    • At the heart of Balancing Curves, the Reward Manager Smart Contract collects Conversion Fees. It then uses these fees as incentives for users who deposit stablecoins below their target allocation, creating a give-and-take mechanism.
  4. 4.
    Dynamic Adjustment:
    • The system is dynamic, adjusting rewards and fees based on how close stablecoin pools are to their target weights. This ensures a responsive and fair mechanism.

Balancing Curves Parameters

According to BIP-0008, following Balancing Curves Parameters were accepted in the vote

Target weights

  • Native Rootstock stablecoins:
    • ZUSD: 49%
    • DOC: 0.5%
    • RDOC: 0.5%
  • Stablecoin bridged and used in Rootstock ecosystem:
    • rUSDT: 5%
  • BNB Smart Chain aggregated stablecoins:
    • USDTbs: 15%
    • BUSDbs: 5%
    • DAIbs: 5%
    • USDCbs: 5%
  • Ethereum aggregated stablecoins:
    • USDTes: 5%
    • DAIes: 5%
    • USDCes: 5%

Rewards and penalties

  • Max Reward: 2.5%
  • Max Penalty: 10%
  • Reward and Penalty slippage: 2.5%
  • Factor
    = 2000000