Skip to main content

OwnMevEscrow

Git Source ↗

Inherits: IOwnMevEscrow

Accumulates received MEV. The escrow is owned by the Vault.

Events

MevReceived

Event emitted on received MEV

event MevReceived(uint256 assets);

Parameters

NameTypeDescription
assetsuint256The amount of MEV assets received

Harvested

Event emitted on harvest

event Harvested(uint256 assets);

Parameters

NameTypeDescription
assetsuint256The amount of assets withdrawn

Functions

vault

Vault address

function vault() external view returns (address payable);

Returns

NameTypeDescription
<none>address payableThe address of the vault that owns the escrow

harvest

Withdraws MEV accumulated in the escrow. Can be called only by the Vault.

IconImportant

Because control is transferred to the Vault, care must be taken to not create reentrancy vulnerabilities. The Vault must follow the checks-effects-interactions pattern: https://docs.soliditylang.org/en/v0.8.22/security-considerations.html#use-the-checks-effects-interactions-pattern

function harvest() external returns (uint256 assets);

Returns

NameTypeDescription
assetsuint256The amount of assets withdrawn

receive

Function for receiving MEV

receive() external payable;