code-423n4 / 2023-05-caviar-mitigation-contest-findings

0 stars 0 forks source link

Mitigation Confirmed for M-02 #38

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

The solution effectively resolves the issue by ensuring that each change transaction is sent only the exact amount of Ether it requires. The solution simply follows the intended way that is also present in the buy function of the ethRouter. After the fix, the only way for the function to fail prematurely will be if the user hasn’t provided the same or a bigger amount of ether for the transaction compared to the sum of the baseTokenAmount variables in each change operation.

c4-judge commented 1 year ago

GalloDaSballo marked the issue as satisfactory