didpay function can revert in case of non intencionaly 0 slippage
Proof of Concept
in case the person in charge set a wrong slippage in JBDidPayData struct the division (_quote * _slippage / SLIPPAGE_DENOMINATOR) can round to 0 and set a _slippage of 0 wich can fail due the volatility.
Lines of code
https://github.com/code-423n4/2023-05-juicebox/blob/9d0458282511ff269b3b35b5b082b56d5cc08663/juice-buyback/contracts/JBXBuybackDelegate.sol#L197
Vulnerability details
Impact
didpay function can revert in case of non intencionaly 0 slippage
Proof of Concept
in case the person in charge set a wrong slippage in JBDidPayData struct the division (_quote * _slippage / SLIPPAGE_DENOMINATOR) can round to 0 and set a _slippage of 0 wich can fail due the volatility.
https://github.com/code-423n4/2023-05-juicebox/blob/9d0458282511ff269b3b35b5b082b56d5cc08663/juice-buyback/contracts/JBXBuybackDelegate.sol#L197
Tools Used
manual
Recommended Mitigation Steps
make a new memory variable and check for 0 slippage
Assessed type
Other