Users can trigger reward withdrawal by calling Withdraw or WithdrawLiquidity from credit manager. A malicious user can send the WithdrawLiquidity and set the minimum_receive assets to zero.
We discussed with @bobthebuidlr that including slippage for ProvideLiquidity and WithdrawLiquidity could simplify API (no too much logic to SC).
Moreover, I added config with max allowed slippage.
This is part of the fix for @thec00n finding:
We discussed with @bobthebuidlr that including
slippage
for ProvideLiquidity and WithdrawLiquidity could simplify API (no too much logic to SC).Moreover, I added config with max allowed slippage.