Protocol Economics
What this page is for: the on-chain economic parameters that govern every rFlow deal — the protocol fee, the buyback penalty curve, duration bounds, and the admin levers. For the $rFLOW token, supply, and distribution, see the dedicated tokenomics page.
Overview#
Every economic parameter rFlow uses is stored in the singleton ProtocolConfig account, seeds ["protocol_config"]. The defaults below come from programs/payflow/src/constants.rs and are tunable by the authority via update_config, capped at the program-level maxima.
Protocol fee#
A single 2% fee on selling_price is charged at fill time. The buyer pays the full sticker price; the program routes the seller the net amount and the treasury the fee:
1pub const DEFAULT_FEE_BPS: u16 = 200; // 2.00 %2pub const MAX_FEE_BPS: u16 = 1000; // 10.00 % (hard cap)1// buy_deal flow2const fee = sellingPrice * feeBps / 10_000;3const toSeller = sellingPrice - fee;45token::transfer(buyer -> seller, toSeller);6token::transfer(buyer -> treasury, fee);Treasury is configurable
ProtocolConfig.treasury and changeable via update_config. The fee distribution (founder / insurance pool / $rFLOW stakers) happens off the smart contract — see the public tokenomics page.Buyback penalty curve#
A seller can exit an active deal early via buyback_deal. They pay back the buyer the selling price + accrued yield + a decaying penalty. The penalty starts at base_penalty_bps at purchased_at and decays linearly to min_penalty_bps at ends_at.
1pub const DEFAULT_BASE_PENALTY_BPS: u16 = 300; // 3.00 %2pub const DEFAULT_MIN_PENALTY_BPS: u16 = 100; // 1.00 %34pub const MAX_BASE_PENALTY_BPS: u16 = 3000; // 30 % hard cap5pub const MAX_MIN_PENALTY_BPS: u16 = 1500; // 15 % hard cap1let progress_bps =2 (time_elapsed * BPS_DENOMINATOR / total_duration) as u16;34let penalty_range = base_penalty_bps - min_penalty_bps;5let penalty_reduction = penalty_range * progress_bps / BPS_DENOMINATOR;6let current_penalty = base_penalty_bps - penalty_reduction;78let penalty_amount = selling_price * current_penalty / BPS_DENOMINATOR;9let total_buyback = selling_price + actual_yield + penalty_amount;| Time elapsed | Progress (bps) | Penalty (default 3% → 1%) |
|---|---|---|
| Day 0 of 90 | 0 | 3.00% |
| Day 30 of 90 | 3333 | ~2.33% |
| Day 60 of 90 | 6666 | ~1.67% |
| Day 90 of 90 | 10000 | 1.00% |
Duration bounds#
1pub const MIN_DURATION_DAYS: u16 = 30;2pub const MAX_DURATION_DAYS: u16 = 365;The SDK only accepts the discrete set 30 | 60 | 90 | 180 | 365 via the VALID_DURATIONS constant. The on-chain program accepts any value in the configured range; the SDK's tighter constraint is a UX convention.
Admin controls#
All economic parameters are mutable by the authority on ProtocolConfig via update_config. Every parameter is an Option<T> — pass only what changes:
1update_config({2 fee_bps: Some(200),3 base_penalty_bps: Some(300),4 min_penalty_bps: Some(100),5 is_paused: Some(false),6 use_oracle: Some(true),7 new_treasury: None,8 new_authority: None,9 add_mint: Some(msolMint),10 remove_mint: None,11 add_payment_mint: None,12 remove_payment_mint: None,13})The authority is the only signer that can pause the protocol via is_paused. Active deals continue to settle while paused; only new deals are blocked.
$rFLOW token#
$rFLOW launches via Collaterize using Meteora DBC with bonding-curve mechanics, then migrates to DAMM V2. The token is independent of the deal protocol — there are no $rFLOW holdings required to buy or sell deals. Holders receive a share of protocol fees via staking.