SuperchainRevSharesCalculator

Table of Contents

Summary

A Superchain implementation is provided for the ISharesCalculator interface. It pays the greater amount between 2.5% of gross revenue or 15% of net revenue (gross minus L1 fees) to the configured share recipient. The second configured recipient receives the full remainder via FeeSplitter's remainder send.

It allows the ProxyAdmin.owner to configure the recipient address of the Superchain revenue share and the recipient of the remainder.

Functions

getRecipientsAndAmounts

Calculates the share for each of the two recipients based on the following formula:

GrossRevenue = Sum of all vault fee revenues
GrossShare = GrossRevenue × 2.5%
NetShare = (GrossRevenue - L1FeeRevenue) × 15%

ShareRecipientAmount = max(GrossShare, NetShare)
RemainderRecipientAmount = GrossRevenue - ShareRecipientAmount
function getRecipientsAndAmounts(uint256 _sequencerFeeRevenue, uint256 _baseFeeRevenue, uint256 _operatorFeeRevenue, uint256 _l1FeeRevenue) external view returns (ShareInfo[] memory shareInfo)
  • MUST return the correct partition of shares for each of the shareRecipient and remainderRecipient addresses based on the above formula.

setShareRecipient

Sets the recipient of the shares calculated by the fee sharing formula.

function setShareRecipient(address payable _shareRecipient) external
  • MUST only be callable by ProxyAdmin.owner.
  • MUST emit ShareRecipientUpdated.
  • MUST update the shareRecipient storage variable.

setRemainderRecipient

Sets the recipient of the remainder of the fees once the shares for the share recipient have been calculated.

function setRemainderRecipient(address payable _remainderRecipient) external
  • MUST only be callable by ProxyAdmin.owner.
  • MUST emit RemainderRecipientUpdated.
  • MUST update the remainderRecipient storage variable.

Events

ShareRecipientUpdated

Emitted when the recipient for the calculated share of the fees is updated.

event ShareRecipientUpdated(address indexed oldShareRecipient, address indexed newShareRecipient);

RemainderRecipientUpdated

Emitted when the recipient for the remainder of the fees is updated.

event RemainderRecipientUpdated(address indexed oldRemainderRecipient, address indexed newRemainderRecipient);