Open alexzoid-eth opened 1 month ago
Is there a corresponding Cantina bug submission?
Is there a corresponding Cantina bug submission?
Yeah, #411
Do you have a link?
Do you have a link?
https://cantina.xyz/code/e2cf6906-ec8b-4c78-a585-74ac90615659/findings/411
Description
In the PositionManager contract, when settling with the
CONTRACT_BALANCE
flag, the action should always use the contract's entire balance of the specified currency. This flag is defined in ActionConstants as:However, the current implementation allows the payer to be set to the user even when the
CONTRACT_BALANCE
flag is used. This could lead to a situation where the user is charged for the entire contract balance instead of the contract itself.Proof of Concept
A Certora rule is violated https://prover.certora.com/output/52567/95983b906f214449807a0fe6283ed52f/?anonymousKey=d411d086cecc1adb8efb0af12b27385b85c98ffa
Recommendation
A previous rule is not violated after this fix https://prover.certora.com/output/52567/120916fd9a7647c490b2d57caa0f284b/?anonymousKey=43c8b2e83d1175b135c5461fd44e975e025fb935