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).
Fixed in this commit.
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.