Understanding Whirlpool Fees
When a user performs a swap on a Whirlpool, a % portion of the swap input amount can be taken as a fee for the liquidity providers and pool treasury.
Total Fee
On the protocol, the total fee collected from the user is referred as the fee-rate. It is stored as a hundredths of a basis point on the Whirlpool account.
A 0.01% (1bps) swap fee would equate to a fee_rate value of 100.
Fee Breakdown
ProtocolFee
The protocol_fee is the fee diverted to a wallet that only the WhirlpoolConfig's collectProtocolFeesAuthority can collect. Often, this is used as the treasury of the protocol hosting the Whirlpools program.
It is stored as a basis point of the total fees collected on the Whirlpool account.. For example, 3% of the total swap fee is diverted to the protocol would have a protocol_fee value of 300.
Liquidity Provider Fee
The liquidity providers get all of the remaining fees once the protocol fee is subtracted.
Managing Pool Fee Rates
You can read more on how to manage the default rate of Whirlpools in your group and individual Whirlpools below.
pageManaging Pool FeesLast updated