pipelineConvert missing slippage control because of how the penalty is applied
In the pipelineConvertFacet we can observe the following comments.
as the comment suggests, A stalk penalty may be applied if the convert crosses deltaB.
However, while user does a pipeline convert, because there is no slippage control, the user can suffer heavily and unexpected loss from the penalty that he did not account for when submitting his transaction.
as we can see, the penalty depends on the capacity and peg information and the up to 100% of the penalty can be applied.
consider the case when user A submits a pipelineConvert transaction, but then other user submits the transaction that fills in the convert cap and change delta B first before User A,
user A's transaction can suffer high stalk penalty, which is not what user A expected.
user may receive less tokens than he anticipated because of lack of slippage control
manual review
add a slippage control to check the min token minted amount and let user input the max penalty tolerance.
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.