Assumptions are made about Aave and Compound integrations  Acknowledged
The code makes several assumptions about the Aave and Compound integrations. A malicious or malfunctioning integration (or lending pool) might violate those assumptions. This might lead to unintended behavior in the system. Below are three such assumptions:\\nfunction `checkBalance` reverts if the token hasn't been added:\\n```\\nIPlatformIntegration(\\_integration).checkBalance(\\_bAsset);\\n```\\n\\nfunction `withdraw` is trusted to not fail when it shouldn't:\\n```\\nIPlatformIntegration(\\_integrators[i]).withdraw(\\_recipient, bAsset, q, \\_bAssets[i].isTransferFeeCharged);\\n```\\n\\nthe mapping from mAssets to pTokens is fixed:\\n```\\nrequire(bAssetToPToken[\\_bAsset] == address(0), "pToken already set");\\n```\\n\\nThe first assumption could be avoided by adding a designated function to check if the token was added.\\nThe second assumption is more difficult to avoid, but should be considered when adding new integrations. The system needs to trust the lending pools to work properly; for instance, if the lending pool would blacklist the integration contract the system may behave in unintended ways.\\nThe third assumption could be avoided, but it comes at a cost.
Consider revisiting or avoiding these assumptions. For any assumptions that are there by design it would be good to document them to facilitate future changes. One should also be careful to avoid coupling between external systems. For instance, if withdrawing from Aave fails this should not prevent withdrawing from Compound.
```\\nIPlatformIntegration(\\_integration).checkBalance(\\_bAsset);\\n```\\n