The protocol will not be able to add liquidity on the curve with another token with a balance.
The `CurveSpell` protocol only ensure approve curve pool to spend its borrow token. Hence, it will not be able to add liquidity on the curve with another token with a balance.\\nThe `openPositionFarm()` function enables user to open a leveraged position in a yield farming strategy by borrowing funds and using them to add liquidity to a Curve pool, while also taking into account certain risk management parameters such as maximum LTV and position size. When add liquidity on curve ,the protocol use the borrowed token and the collateral token, it checks the number of tokens in the pool and creates an array of the supplied token amounts to be passed to the add_liquidity function. Then the curve will transfer the tokens from the protocol and mint lp tokens to the protocol. However, the protocol only ensure approve curve pool to spend its borrow token. Hence, it will not be able to add liquidity on the curve with another token with a balance.\\n```\\n // 3. Add liquidity on curve\\n        _ensureApprove(param.borrowToken, pool, borrowBalance);\\n        if (tokens.length == 2) {\\n            uint256[2] memory suppliedAmts;\\n            for (uint256 i = 0; i < 2; i++) {\\n                suppliedAmts[i] = IERC20Upgradeable(tokens[i]).balanceOf(\\n                    address(this)\\n                );\\n            }\\n            ICurvePool(pool).add_liquidity(suppliedAmts, minLPMint);\\n        } else if (tokens.length == 3) {\\n            uint256[3] memory suppliedAmts;\\n            for (uint256 i = 0; i < 3; i++) {\\n                suppliedAmts[i] = IERC20Upgradeable(tokens[i]).balanceOf(\\n                    address(this)\\n                );\\n            }\\n            ICurvePool(pool).add_liquidity(suppliedAmts, minLPMint);\\n        } else if (tokens.length == 4) {\\n            uint256[4] memory suppliedAmts;\\n            for (uint256 i = 0; i < 4; i++) {\\n                suppliedAmts[i] = IERC20Upgradeable(tokens[i]).balanceOf(\\n                    address(this)\\n                );\\n            }\\n            ICurvePool(pool).add_liquidity(suppliedAmts, minLPMint);\\n        }\\n```\\n
Allow the curve pool to spend tokens that have a balance in the protocol to add liquidity
The protocol will not be able to add liquidity on the curve with another token with a balance.
```\\n // 3. Add liquidity on curve\\n        _ensureApprove(param.borrowToken, pool, borrowBalance);\\n        if (tokens.length == 2) {\\n            uint256[2] memory suppliedAmts;\\n            for (uint256 i = 0; i < 2; i++) {\\n                suppliedAmts[i] = IERC20Upgradeable(tokens[i]).balanceOf(\\n                    address(this)\\n                );\\n            }\\n            ICurvePool(pool).add_liquidity(suppliedAmts, minLPMint);\\n        } else if (tokens.length == 3) {\\n            uint256[3] memory suppliedAmts;\\n            for (uint256 i = 0; i < 3; i++) {\\n                suppliedAmts[i] = IERC20Upgradeable(tokens[i]).balanceOf(\\n                    address(this)\\n                );\\n            }\\n            ICurvePool(pool).add_liquidity(suppliedAmts, minLPMint);\\n        } else if (tokens.length == 4) {\\n            uint256[4] memory suppliedAmts;\\n            for (uint256 i = 0; i < 4; i++) {\\n                suppliedAmts[i] = IERC20Upgradeable(tokens[i]).balanceOf(\\n                    address(this)\\n                );\\n            }\\n            ICurvePool(pool).add_liquidity(suppliedAmts, minLPMint);\\n        }\\n```\\n