StableSwapOperatorV1 - resistantFei value is not correct in the resistantBalanceAndFei function
The `resistantBalanceAndFei` function of a `PCVDeposit` contract is supposed to return the amount of funds that the contract controls; it is then used to evaluate the total value of PCV (collateral in the protocol). Additionally, this function returns the number of FEI tokens that are protocol-controlled. These FEI tokens are “temporarily minted”; they are not backed up by the collateral and shouldn't be used in calculations that determine the collateralization of the protocol.\\nIdeally, the amount of these FEI tokens should be the same during the deposit, withdrawal, and the `resistantBalanceAndFei` function call. In the `StableSwapOperatorV1` contract, all these values are totally different:\\nduring the deposit, the amount of required FEI tokens is calculated. It's done in a way so the values of FEI and 3pool tokens in the metapool should be equal after the deposit. So if there is the initial imbalance of FEI and 3pool tokens, the deposit value of these tokens will be different:\\n```\\n// get the amount of tokens in the pool\\n(uint256 \\_3crvAmount, uint256 \\_feiAmount) = (\\n    IStableSwap2(pool).balances(\\_3crvIndex),\\n    IStableSwap2(pool).balances(\\_feiIndex)\\n);\\n// // rest of code and the expected amount of 3crv in it after deposit\\nuint256 \\_3crvAmountAfter = \\_3crvAmount + \\_3crvBalanceAfter;\\n \\n// get the usd value of 3crv in the pool\\nuint256 \\_3crvUsdValue = \\_3crvAmountAfter \\* IStableSwap3(\\_3pool).get\\_virtual\\_price() / 1e18;\\n \\n// compute the number of FEI to deposit\\nuint256 \\_feiToDeposit = 0;\\nif (\\_3crvUsdValue > \\_feiAmount) {\\n    \\_feiToDeposit = \\_3crvUsdValue - \\_feiAmount;\\n}\\n```\\n\\nduring the withdrawal, the FEI and 3pool tokens are withdrawn in the same proportion as they are present in the metapool:\\n```\\nuint256[2] memory \\_minAmounts; // [0, 0]\\nIERC20(pool).approve(pool, \\_lpToWithdraw);\\nuint256 \\_3crvBalanceBefore = IERC20(\\_3crv).balanceOf(address(this));\\nIStableSwap2(pool).remove\\_liquidity(\\_lpToWithdraw, \\_minAmounts);\\n```\\n\\nin the `resistantBalanceAndFei` function, the value of protocol-controlled FEI tokens and the value of 3pool tokens deposited are considered equal:\\n```\\nresistantBalance = \\_lpPriceUSD / 2;\\nresistantFei = resistantBalance;\\n```\\n\\nSome of these values may be equal under some circumstances, but that is not enforced. After one of the steps (deposit or withdrawal), the total PCV value and collateralization may be changed significantly.
Make sure that deposit, withdrawal, and the `resistantBalanceAndFei` are consistent and won't instantly change the PCV value significantly.
```\\n// get the amount of tokens in the pool\\n(uint256 \\_3crvAmount, uint256 \\_feiAmount) = (\\n    IStableSwap2(pool).balances(\\_3crvIndex),\\n    IStableSwap2(pool).balances(\\_feiIndex)\\n);\\n// // rest of code and the expected amount of 3crv in it after deposit\\nuint256 \\_3crvAmountAfter = \\_3crvAmount + \\_3crvBalanceAfter;\\n \\n// get the usd value of 3crv in the pool\\nuint256 \\_3crvUsdValue = \\_3crvAmountAfter \\* IStableSwap3(\\_3pool).get\\_virtual\\_price() / 1e18;\\n \\n// compute the number of FEI to deposit\\nuint256 \\_feiToDeposit = 0;\\nif (\\_3crvUsdValue > \\_feiAmount) {\\n    \\_feiToDeposit = \\_3crvUsdValue - \\_feiAmount;\\n}\\n```\\n