ownerOf() not defined in the IMlumStaking interface cause DoS on Voter.vote()
Summary
There is no function called ownerOf() defined in the IMlumStaking interface, but two function from Voter contract calls this function, causing the transaction to revert.
0xAadi
Medium
ownerOf()
not defined in theIMlumStaking
interface cause DoS onVoter.vote()
Summary
There is no function called
ownerOf()
defined in theIMlumStaking
interface, but two function fromVoter
contract calls this function, causing the transaction to revert.Vulnerability Detail
The vulnerability lies in the following code:
But the
IMlumStaking
interface is not defined theownerOf()
functionImpact
DoS on the crtical
vote()
function inVoter
contractCode Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/Voter.sol#L161 https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/Voter.sol#L403
Tool used
Manual Review
Recommendation
Define the
ownerOf()
function in theIMlumStaking
interface.