Submitted by pkqs90
Loss of funds (quoteToken) for reallocator if the swapped quoteTokens exceeds requirement during reallocation.
See the reallocation flowchart here.
The reallocator would call a Market contract, which triggers the reallocation logic in PredyPool. Then tokens would then be swapped accordingly using the SettlementCallbackLib.
For baseToken, there is a check that the diff in baseToken (before/after the swap) must be equal to what is required for reallocation. For quoteToken, if the swap generates more quoteToken than what is required (e.g. the exceedsQuote > 0 case in the following code), the quoteTokens should be transferred back to the initial reallocator, since it was the reallocator who was performing the swap.
However, the quoteTokens are transferred back to msg.sender, which is the Market contract, and would cause a loss of funds for the reallocator.
Send the tokens to the reallocator.
Token-Transfer
0xsomeone (judge) decreased severity to Low and commented:
pkqs90 (warden) commented:
syuhei176 (Predy) confirmed
0xsomeone (judge) increased severity to Medium and commented:
