Skip to content

feat: add configurable minOEVFee to ChainlinkFeedOEVWrapper - #673

Open
Sertug17 wants to merge 1 commit into
moonwell-fi:mainfrom
Sertug17:fix/feed-oev-min-fee
Open

Sertug17 wants to merge 1 commit into
moonwell-fi:mainfrom
Sertug17:fix/feed-oev-min-fee

Conversation

@Sertug17

Copy link
Copy Markdown

The updatePriceEarly fee formula (gasprice basefee) * feeMultiplier produces a negligible amount on L2s like Base and Optimism. Whether you're liquidating $100 or $10M, the protocol gets the same fee (~$0.00002).

This adds a minOEVFee storage variable that sets a floor. Governance can adjust it via setMinOEVFee(). Defaults to 0 for backwards compatibility with existing deployments.

Changes:
- event MinOEVFeeChanged(uint256 oldFee, uint256 newFee)
- uint256 public minOEVFee (default 0)
- function setMinOEVFee(uint256) external onlyOwner
- updatePriceEarly() now checks msg.value >= calculatedFee AND msg.value >= minOEVFee

Fixes #672

The updatePriceEarly fee formula (gasprice - basefee) * feeMultiplier
produces a negligible amount on L2s like Base and Optimism, regardless of
the liquidation value. This means the protocol captures essentially zero
OEV for profitable liquidations.

Add a minOEVFee storage variable that sets a floor on the fee. Governance
can adjust it via setMinOEVFee(). Defaults to 0 for backwards compatibility
with existing deployments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant