AuraSpell#openPositionFarm uses incorrect join type for balancer
Summary
The JoinPoolRequest uses "" for userData meaning that it will decode into 0. This is problematic because join requests of type 0 are "init" type joins and will revert for pools that are already initialized.
0x52
medium
AuraSpell#openPositionFarm uses incorrect join type for balancer
Summary
The JoinPoolRequest uses "" for userData meaning that it will decode into 0. This is problematic because join requests of type 0 are "init" type joins and will revert for pools that are already initialized.
Vulnerability Detail
https://etherscan.io/address/0x5c6ee304399dbdb9c8ef030ab642b10820db8f56#code#F24#L49
We see above that enum JoinKind is INIT for 0 values.
https://etherscan.io/address/0x5c6ee304399dbdb9c8ef030ab642b10820db8f56#code#F24#L290
Here user data is decoded into join type and since it is "" it will decode to type 0 which will result in a revert.
Impact
Users will be unable to open any farm position on AuraSpell
Code Snippet
AuraSpell.sol#L63-L147
Tool used
Manual Review
Recommendation
Uses JoinKind = 1 for user data