code-423n4 / 2023-09-goodentry-mitigation-findings

0 stars 0 forks source link

H-05 MitigationConfirmed #32

Open c4-submissions opened 1 year ago

c4-submissions commented 1 year ago

Lines of code

Vulnerability details

Comments

The vulnerability is obvious. The excess tokens in swapTokensForExactETH are not returned to the user, resulting in loss of funds.

Mitigation

ogInAsset.safeTransfer(msg.sender, amountInMax - amounts[0]);

Obtain the actual amount of funds used by returning the value, calculate the difference and return the excess funds.

Conclusion

LGTM

c4-judge commented 12 months ago

gzeon-c4 marked the issue as confirmed for report

c4-judge commented 12 months ago

gzeon-c4 marked the issue as satisfactory