sherlock-audit / 2022-10-mover-judging

1 stars 0 forks source link

GalloDaSballo - M-01 `executeSwap` doesn't work #46

Closed sherlock-admin closed 2 years ago

sherlock-admin commented 2 years ago

GalloDaSballo

medium

M-01 executeSwap doesn't work

Summary

Due to most likely a programming mistake, executeSwap will call executeSwapDirect and then revert.

Vulnerability Detail

Impact

Because executeSwap calls executeSwapDirect it will always revert.

HardenedTopUpProxy is not programmed to call it either, leading me to believe this is a programming mistake.

Code Snippet

https://github.com/sherlock-audit/2022-10-mover/blob/main/cardtopup_contract/contracts/ExchangeProxy.sol#L91-L92

    function executeSwap(

Tool used

Manual Review

Recommendation

Delete the code if unused. Or refactor to allow any caller to use it.