Skip to content
Smart contracts Audit finding Intermediate

Unchecking the ownership of mph in function distributeFundingRewards could cause several critical functions to revert

The distributeFundingRewards function in MPHMinter does not verify that the contract owns the mph token, so if ownership is transferred away, calls to mph.ownerMint revert. This causes dependent functions in DInterest such as withdraw, rolloverDeposit, and payInterestToFunders to revert as well.

88mph

Originally disclosed on Code4rena

In contract MPHMinter, the function distributeFundingRewards does not check whether the contract itself is the owner of mph. If the contract is not the owner of mph, mph.ownerMint could revert, causing functions such as withdraw, rolloverDeposit, payInterestToFunders in the contract DInterest to revert as well.

Recommend adding a mph.owner() != address(this) check as in the other functions (e.g., mintVested).

ZeframLou (88mph) confirmed:

Fixed in this commit.

The original report as published on Code4rena. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the function lacks an ownership check before calling ownerMint, unlike other functions that verify the contract is the token owner.

Impact

If the contract is not the owner of mph, several critical functions in DInterest could revert, potentially disrupting withdrawals and interest payments.

What the attacker needed

Mph ownership transferred away from MPHMinter

The fix

The issue was fixed by adding an ownership check as recommended.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract can own tokens, and some actions only work if the contract is the token's owner. This report says one function forgot to check that ownership, so if the owner changes, that function fails and blocks other important actions.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More from 88mph

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.