Skip to main content

Futarchy Authority

The FutarchyAuthority account controls protocol governance, fee collection, and revenue distribution.

Account Structure

#[account]
pub struct FutarchyAuthority {
    pub version: u8,
    pub authority: Pubkey,

    pub recipients: RevenueRecipients,
    pub revenue_share: RevenueShare,
    pub revenue_distribution: RevenueDistribution,

    pub bump: u8,
}

pub struct RevenueShare {
    pub swap_bps: u16,
    pub interest_bps: u16,
}

pub struct RevenueRecipients {
    pub futarchy_treasury: Pubkey,
    pub buybacks_vault: Pubkey,
    pub team_treasury: Pubkey,
}

pub struct RevenueDistribution {
    pub futarchy_treasury_bps: u16,
    pub buybacks_vault_bps: u16,
    pub team_treasury_bps: u16,
}

Fields

version
u8
Authority version. Currently 1.
authority
Pubkey
The authority that controls this account.
recipients
RevenueRecipients
Addresses for revenue distribution recipients.
revenue_share
RevenueShare
Protocol revenue share percentages for swap and interest fees.
revenue_distribution
RevenueDistribution
Distribution percentages for each recipient. Must sum to 10000 (100%).
bump
u8
PDA bump seed.

Revenue Share

The revenue_share determines what portion of fees go to the protocol:
  • swap_bps: Percentage of swap fees that go to protocol (rest goes to LPs)
  • interest_bps: Percentage of interest that goes to protocol (rest goes to LPs)

Revenue Distribution

The revenue_distribution determines how protocol revenue is split:
  • futarchy_treasury_bps: Percentage to futarchy treasury
  • buybacks_vault_bps: Percentage to buybacks vault
  • team_treasury_bps: Percentage to team treasury
Constraint: All three percentages must sum to exactly 10000 (100%).

Fee Flow from Pairs

Protocol revenue accumulates in pair vaults as a surplus — the difference between actual vault balances and accounted cash reserves: Claimable Fees=RvaultRcash\text{Claimable Fees} = R_{\text{vault}} - R_{\text{cash}}

Fee Sources

SourceHow It Accumulates
Swap FeesFutarchy portion of swap fee is transferred immediately to authority token accounts
Interest FeesReduces cash_reserve during interest accrual, creating surplus in vault

Claiming Protocol Fees

The claim_protocol_fees instruction distributes accumulated surplus from a pair’s vaults:
  1. Calculate claimable amount per token:
    claimable = vault_balance - cash_reserve
    
  2. Distribute to recipients based on revenue_distribution:
    • buybacks_vault: claimable × buybacks_vault_bps / 10000
    • team_treasury: claimable × team_treasury_bps / 10000
    • futarchy_treasury: Remainder (handles rounding dust)
  3. Transfer tokens directly from pair vaults to recipient token accounts
The claim process does not modify the pair’s cash_reserve or reserve values — it only transfers the surplus tokens that were never accounted as cash.

PDA Derivation

The futarchy authority account is a PDA derived from:
[FUTARCHY_AUTHORITY_SEED_PREFIX]
Where FUTARCHY_AUTHORITY_SEED_PREFIX = b"futarchy_authority".