Mochi fees can be accidentally burned #123
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
cmichel
Vulnerability details
The
NoMochiFeePool
allows anyone to callwithdraw
which sends the tokens towithdrawer
.This variable can however be set to zero, either in the constructor or in the
changeWithdrawer
function.Impact
Thus tokens can be accidentally burned by anyone if the
withdrawer
is the zero address at any point.Recommended Mitigation Steps
Add a check in
withdraw
that thewithdrawer != address(0)
to avoid accidentally burning tokens.The text was updated successfully, but these errors were encountered: