OwnMevEscrow
Inherits: IOwnMevEscrow
Accumulates received MEV. The escrow is owned by the Vault.
Events
MevReceived
Event emitted on received MEV
event MevReceived(uint256 assets);
Parameters
| Name | Type | Description |
|---|---|---|
assets | uint256 | The amount of MEV assets received |
Harvested
Event emitted on harvest
event Harvested(uint256 assets);
Parameters
| Name | Type | Description |
|---|---|---|
assets | uint256 | The amount of assets withdrawn |
Functions
vault
Vault address
function vault() external view returns (address payable);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address payable | The address of the vault that owns the escrow |
harvest
Withdraws MEV accumulated in the escrow. Can be called only by the Vault.
Important
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
| Name | Type | Description |
|---|---|---|
assets | uint256 | The amount of assets withdrawn |
receive
Function for receiving MEV
receive() external payable;