underSpentAmount should be transferred back to sender without any fee. #47
Labels
bug
Something isn't working
invalid
This doesn't seem right
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-06-nested/blob/b4a153c943d54755711a2f7b80cbbf3a5bb49d76/contracts/NestedFactory.sol#L486-L505
Vulnerability details
Impact
underSpentAmount is dust amount, Currently, fee is even applied to dust amount, causing overspent user to loss some money due to this fee. Normally, dust amount must transfer back to only
_msgSender()
as a best practice without any fee applied to it.Proof of Concept
You will see that you are correcting fee transferring underSpentAmount back to _msgSender().
Since these underSpentAmount is not being used, it should be transferred back without any fee.
Tools Used
Manual
Recommended Mitigation Steps
You should transfer dust amount back to sender without any fee
The text was updated successfully, but these errors were encountered: