​SurplusMinter smart contract is responsible for aggregated CDP protocol fees and interest collection.

Key concepts

Realized interest

Certain fees collected by the protocol can be expressed as a realized interest. Such fees are collected in existing BOB tokens, obtained from liquidation fees and debt repayments.
Protocol governance can withdraw these tokens as per their decisions.

Unrealized interest

Certain fees collected by the protocol cannot be expressed in existing BOB tokens, as they have not been truly repayed yet. Such fees include stability fees accumulated on active vaults, that haven't been yet repayed by vault owners.
Protocol governance can withdraw those unrealized BOB tokens by minting them in advance, since any unrealized is expected to eventually converge to the realized one.