The collateral ratio (CR) is the fraction of every XSD token that is backed by real WETH collateral versus the algorithmic BankX token. It is stored in PIDController.global_collateral_ratio as a uint256 with 1e6 precision.
At CR = 1000000 (100%), every XSD minted requires WETH equal to the full silver-gram value of the XSD amount. At CR = 850000 (85%), only 85% of the value needs to come from WETH; the remaining 15% is covered by burning BankX tokens. At CR = 0, XSD is purely algorithmic and backed entirely by BankX.
The protocol launches at CR = 1000000 (fully collateralised) and adjusts dynamically over time.
Key Concepts
global_collateral_ratio — Stored in PIDController; read by CollateralPool for all mint/redeem calculations.
xsd_step — The increment by which CR changes per systemCalculations() call. Default: 2500 (0.25% in 1e6 precision).
collateral_ratio_cooldown — Minimum elapsed time between CR updates (seconds). Set at initialisation by the owner.
growth_ratio — Ratio of BankX market cap (in the AMM pool) to uncollateralised XSD supply. Used optionally to inform CR direction.
GR_top_band / GR_bottom_band — Tolerance bands around growth_ratio for the growth-ratio-based CR adjustment mode. Default: 1000 each.
FIP_6 — Optional mode that restricts systemCalculations() calls to when XSD is outside its price band.
CR Adjustment Logic
systemCalculations() in PIDController is callable by anyone (subject to collateral_ratio_paused == false). Each call:
Reads current XSD and BankX spot prices from the AMM pools (10-slot rolling average).