InfinityStaker
and InfinityExchange
are prone to "donate" user's ether by mistake
#14
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-06-infinity/blob/601e0e5498587f5b1ae33f345223c86526ae9ce1/contracts/staking/InfinityStaker.sol#L345-L348
https://github.com/code-423n4/2022-06-infinity/blob/601e0e5498587f5b1ae33f345223c86526ae9ce1/contracts/core/InfinityExchange.sol#L1229
Vulnerability details
Impact
The methods
receive
andfallback
arepayable
and the doesn't track the user ether, so the user's ether can be locked until owner decide.The contracts contains a method to get the accidentally ether by the admin
But also, it facilitate the human errors with the
payable
methodsreceive
andfallback
.Affected source code:
Recommended Mitigation Steps
receive
andfallback
method, otherwise the owner is in charge of MAYBE return the funds.The text was updated successfully, but these errors were encountered: