claim - Incomplete and Lenient Implementation
In the current version of the code, the `claim` function is lacking crucial input validation logic as well as required state changes. Most of the process is implemented in other contracts or off-chain at the moment and is therefore out of scope for this audit, but there might still be issues caused by potential errors in the process. Moreover, pool manager and committee together have unlimited ownership of the deposits and can essentially withdraw all collateral to any desired address.\\n```\\nfunction claim(\\n uint256 policyIndex\\_,\\n uint256 amount\\_,\\n address receipient\\_\\n) external onlyPoolManager {\\n```\\n
To ensure a more secure claiming process, we propose adding the following logic to the `claim` function:\\n`refund` should be called at the beginning of the `claim` flow, so that the recipient's true coverage amount will be used.\\n`policyIndex` should be added as a parameter to this function, so that `coverageMap` can be used to validate that the amount claimed on behalf of a recipient is covered.\\nThe payout amount should be subtracted in the `coveredMap` and `coverageMap` mappings.
```\\nfunction claim(\\n uint256 policyIndex\\_,\\n uint256 amount\\_,\\n address receipient\\_\\n) external onlyPoolManager {\\n```\\n