Perpetual - withdrawFromInsuranceFund should check wadAmount instead of rawAmount  Pending
`withdrawFromInsurance` checks that enough funds are in the insurance fund before allowing withdrawal by an admin by checking the provided `rawAmount` <= insuranceFundBalance.toUint256(). `rawAmount` is the `ETH` (18 digit precision) or collateral token amount (can be less than 18 digit precision) to be withdrawn while `insuranceFundBalance` is a WAD-denominated value (18 digit precision).\\nThe check does not hold if the configured collateral has different precision and may have unwanted consequences, e.g. the withdrawal of more funds than expected.\\nNote: there is another check for `insuranceFundBalance` staying positive after the potential external call to collateral.\\n```\\nfunction withdrawFromInsuranceFund(uint256 rawAmount) public onlyWhitelistAdmin {\\n    require(rawAmount > 0, "invalid amount");\\n    require(insuranceFundBalance > 0, "insufficient funds");\\n    require(rawAmount <= insuranceFundBalance.toUint256(), "insufficient funds");\\n\\n    int256 wadAmount = toWad(rawAmount);\\n    insuranceFundBalance = insuranceFundBalance.sub(wadAmount);\\n    withdrawFromProtocol(msg.sender, rawAmount);\\n\\n    require(insuranceFundBalance >= 0, "negtive insurance fund");\\n\\n    emit UpdateInsuranceFund(insuranceFundBalance);\\n}\\n```\\n\\nWhen looking at the test-cases there seems to be a misconception about what unit of amount `withdrawFromInsuranceFund` is taking. For example, the insurance fund withdrawal and deposit are not tested for collateral that specifies a precision that is not 18. The test-cases falsely assume that the input to `withdrawFromInsuranceFund` is a WAD value, while it is taking the collateral's `rawAmount` which is then converted to a WAD number.\\ncode/test/test_perpetual.js:L471-L473\\n```\\nawait perpetual.withdrawFromInsuranceFund(toWad(10.111));\\nfund = await perpetual.insuranceFundBalance();\\nassert.equal(fund.toString(), 0);\\n```\\n
Check that `require(wadAmount <= insuranceFundBalance.toUint256(), "insufficient funds");`, add a test-suite testing the insurance fund with collaterals with different precision and update existing tests that properly provide the expected input to `withdraFromInsurance`.
```\\nfunction withdrawFromInsuranceFund(uint256 rawAmount) public onlyWhitelistAdmin {\\n    require(rawAmount > 0, "invalid amount");\\n    require(insuranceFundBalance > 0, "insufficient funds");\\n    require(rawAmount <= insuranceFundBalance.toUint256(), "insufficient funds");\\n\\n    int256 wadAmount = toWad(rawAmount);\\n    insuranceFundBalance = insuranceFundBalance.sub(wadAmount);\\n    withdrawFromProtocol(msg.sender, rawAmount);\\n\\n    require(insuranceFundBalance >= 0, "negtive insurance fund");\\n\\n    emit UpdateInsuranceFund(insuranceFundBalance);\\n}\\n```\\n