The repaying action in `BBLeverage.sellCollateral` function pulls YieldBox shares of asset from wrong address
The `sellCollateral` function is used to sell a user's collateral to obtain YieldBox shares of the asset and repay the user's loan. However, in the BBLeverage contract, it calls `_repay` with the `from` parameter set to the user, even though the asset shares have already been collected by this contract beforehand.\\nIn `BBLeverage.sellCollateral`, the `from` variable (user) is used as the repayer address.\\n```\\nif (memoryData.shareOwed <= memoryData.shareOut) {\\n    _repay(from, from, memoryData.partOwed);\\n} else {\\n    //repay as much as we can\\n    uint256 partOut = totalBorrow.toBase(amountOut, false);\\n    _repay(from, from, partOut);\\n}\\n```\\n\\nTherefore, asset shares of user will be pulled in `BBLendingCommon._repay` function.\\n```\\nfunction _repay(address from, address to, uint256 part) internal returns (uint256 amount) {\\n    // rest of code\\n    // @dev amount includes the opening & accrued fees\\n    yieldBox.withdraw(assetId, from, address(this), amount, 0);\\n    // rest of code\\n```\\n\\nThis is incorrect behavior since the necessary asset shares were already collected by the contract in the `BBLeverage.sellCollateral` function. The repayer address should be `address(this)` for `_repay`.
Should fix as following:\\n```\\nif (memoryData.shareOwed <= memoryData.shareOut) {\\n    _repay(address(this), from, memoryData.partOwed);\\n} else {\\n    //repay as much as we can\\n    uint256 partOut = totalBorrow.toBase(amountOut, false);\\n    _repay(address(this), from, partOut);\\n}\\n```\\n
Mistakenly pulling user funds while the received asset shares remain stuck in the contract will result in losses for users who have sufficient allowance and balance when using the `BBLeverage.sellCollateral` functionality.
```\\nif (memoryData.shareOwed <= memoryData.shareOut) {\\n    _repay(from, from, memoryData.partOwed);\\n} else {\\n    //repay as much as we can\\n    uint256 partOut = totalBorrow.toBase(amountOut, false);\\n    _repay(from, from, partOut);\\n}\\n```\\n