Overview
TheGlobalConfig account stores protocol-wide settings including deposit and withdrawal fee rates. This account is used by both SOL and SPL token transactions.
Account Structure
The public key of the authority that can update the global configuration
Deposit fee rate in basis points (0-10000, where 10000 = 100%). Default is 0 (free deposits)
Withdrawal fee rate in basis points (0-10000, where 10000 = 100%). Default is 25 (0.25%)
Acceptable fee error margin in basis points (0-10000, where 10000 = 100%). Default is 500 (5%). Allows fees to be slightly lower than expected to account for rounding
The PDA bump seed used for account derivation
PDA Seeds
Default Values
- deposit_fee_rate: 0 (free deposits)
- withdrawal_fee_rate: 25 basis points (0.25%)
- fee_error_margin: 500 basis points (5%)
Fee Calculation
Fees are calculated in basis points:- 1 basis point = 0.01%
- 100 basis points = 1%
- 10000 basis points = 100%
Notes
- This is a singleton account shared across all token types
- Only the authority can update fee rates using the
update_global_configinstruction - The
fee_error_marginprevents transaction failures due to minor rounding differences in fee calculations - For SPL token transfers, this account also serves as the signing authority for the tree’s associated token accounts