Skip to content

Functions

topUpReserve

function topUpReserve(uint256 amount, address vault) external

Caller: Approved vault addresses only

Description: Transfer USDC from the buffer to the requesting vault's idle reserve. Called by the vault when its idle reserve drops below 50% of the reserve target.

Constraints: - Caller must be in approvedVaults - amount must not exceed totalBuffer × MAX_TOPUP_BPS / 10000 (10% of buffer per call)

The per-call cap (10% of buffer) limits the exposure from a single call and gives governance time to react to rapid reserve drain. Multiple calls are required for larger top-ups.

Emits: ReserveTopup(vault, amount)


fund

function fund(uint256 assets) external

Caller: Any address

Description: Deposit USDC into the buffer. Used by the house operator to maintain the buffer at recommended levels (12–15% of peak vault TVL).

Emits: BufferFunded(funder, amount)


withdraw

function withdraw(uint256 assets, address to) external

Caller: Owner only

Description: Withdraw USDC from the buffer to any address. Owner governance function for buffer management.

Emits: BufferWithdrawn(to, amount)


approveVault

function approveVault(address vault) external

Caller: Owner only

Description: Authorize a vault address to call topUpReserve(). Called during vault deployment setup.

Emits: VaultApproved(vault)


revokeVault

function revokeVault(address vault) external

Caller: Owner only

Description: Remove a vault's authorization to call topUpReserve(). Used when a vault is deprecated or a security issue is detected.

Emits: VaultRevoked(vault)


transferOwnership

function transferOwnership(address newOwner) external

Caller: Owner only

Description: Initiate an ownership transfer. Sets pendingOwner = newOwner. Does not transfer ownership immediately — the pending address must call acceptOwnership() to complete the transfer. This two-step pattern prevents permanent lockout from fat-finger errors.

Emits: OwnershipTransferProposed(currentOwner, newOwner)


acceptOwnership

function acceptOwnership() external

Caller: pendingOwner address only

Description: Complete a pending ownership transfer. Sets owner = pendingOwner and clears pendingOwner.

Emits: OwnershipTransferred(oldOwner, newOwner)