Description: The sellPoolTokens
function is intented to allow users to easily sell pool tokens and receive WETH in exchange. Users indicate how many pool tokens they are willing to sell in the poolTokenAMount
parameter. However, the function currently micalculates the swapped amount. This is due to the fact that the swapExactOutput
function is called, whereas the swapExactInput
function is the one that should be called. Because users specify the exact amount of input tokens, not the output.
**Impact:**Users will swap wrong amount of tokens, which is a severe disruption of protocol functionality.
Proof of Concept:
Recommended Mitigation:
Consider changing the implementation to use swapExactInput
instead of swapExactOutput
. Note that this would also require changing the sellPoolTokens
function to accept a new parameter (ie minWethToReceive
to be passed to swapExactInput
)
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.