Fee Vaults

Fee vaults are simple contracts that collect the three types of fees in Citrea.

You can find these contracts in the following addresses.

Currently all these three contracts have the same logic, yet they can be upgraded in case the need arises to do a programmatic redirection of fees.

State Structure

address public recipient;

Address to send the accumulated fees.


uint256 public minWithdraw;

Minimum required fee amount to be accumulated in the contract before it can be withdrawn to the recipient address, this is 0 by default.

Access Control Structure

modifier onlyOwner()

Ensures that only the contract owner can call the function (inherited from Ownable).

Functions

function withdraw() external

Sends the accumulated fees to recipient address.


function setRecipient(address _recipient) external onlyOwner

Changes the recipient address.

ParametersDescription

address _recipient

Address of the new recipient


function setMinWithdraw(uint256 _minWithdraw) external onlyOwner

Changes the minimum withdraw amount.

ParametersDescription

uint256 _minWithdraw

New minimum withdraw amount

Events

event RecipientUpdated(address oldRecipient, address newRecipient)

Emitted when the recipient address is changed.

ParametersDescription

address oldRecipient

Old recipient address

address newRecipient

New recipient address


event MinWithdrawUpdated(uint256 oldMinWithdraw, uint256 newMinWithdraw)

Emitted when the minimum withdraw amount is changed.

ParametersDescription

uint256 oldMinWithdraw

Old minimum withdraw amount

uint256 newMinWithdraw

New minimum withdraw amount

Last updated