Skip to main content
A market accumulates protocol fees over time from several sources. The curator (or a designated fee recipient) periodically withdraws these to a destination account.

Sources of protocol fees

Each reserve generates fees independently based on its config. The fees are stored on-chain in the reserve’s liquidity substructure as accumulated_protocol_fees_sf (scaled fraction). All fees accumulate in the reserve’s fee vault on the same liquidity mint as the reserve. A USDC reserve’s fees are accumulated in USDC.

Two withdrawal handlers

For routine curator operations, redeemFees is the relevant instruction.

Withdraw fees via SDK

The SDK exposes the raw redeemFees and withdrawProtocolFee instructions via the codegen module. Build the instructions with the relevant accounts and submit from the curator’s wallet (or multisig).
For full args / accounts shapes, see the auto-generated source at klend-sdk/src/@codegen/klend/instructions/redeemFees.ts and withdrawProtocolFee.ts.

Fee recipient

The fee recipient is configured at the program level. For most curator markets, this is the lending_market_owner (or its multisig). In specialized configurations, it can be a separate dedicated address — useful when the curator wants ops to flow to one signer set and fee revenue to flow to another. Confirm the recipient by inspecting the market’s accounts via get-market-or-vault-admin-info.

When to withdraw

Fees accrue continuously but withdrawing them is a discrete event. A common cadence:

Operational considerations

Reference