Skip to main content

VaultMev

Git Source ↗

Inherits: Initializable ↗, VaultState, IVaultMev

Defines the Vaults' MEV functionality

State Variables

_sharedMevEscrow

Note: oz-upgrades-unsafe-allow: state-variable-immutable

address private immutable _sharedMevEscrow

_ownMevEscrow

address private _ownMevEscrow

__gap

This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain. See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps

uint256[50] private __gap

Functions

constructor

Constructor

Since the immutable variable value is stored in the bytecode, its value would be shared among all proxies pointing to a given contract instead of each proxy’s storage.

Note: oz-upgrades-unsafe-allow: constructor

constructor(address sharedMevEscrow) ;

Parameters

NameTypeDescription
sharedMevEscrowaddressThe address of the shared MEV escrow

mevEscrow

The contract that accumulates MEV rewards

function mevEscrow() public view override returns (address);

Returns

NameTypeDescription
<none>addressThe MEV escrow contract address

_harvestAssets

Internal function for harvesting Vaults' new assets

function _harvestAssets(IKeeperRewards.HarvestParams calldata harvestParams)
internal
virtual
override
returns (int256 totalAssetsDelta, bool harvested);

Returns

NameTypeDescription
totalAssetsDeltaint256The total assets delta after harvest
harvestedbooltrue when the rewards were harvested, false otherwise

__VaultMev_init

Initializes the VaultMev contract

function __VaultMev_init(address ownMevEscrow) internal onlyInitializing;

Parameters

NameTypeDescription
ownMevEscrowaddressThe address of the own MEV escrow contract