code-423n4 / 2022-01-insure-findings

2 stars 0 forks source link

Misleading comments and documentation #337

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

There are some issues with comments/documentation, e.g.: Misleading comment:

   * @return true if the id within the market already exists
  function getCDS(address _address) external view override returns (address)

No such function (present in documentation):

  function getInsuranceCount(address _user)

"getInsuranceCount returns how many insurance policies the specified user has."

Recommended Mitigation Steps

Consider revisiting and updating discrepancies between the documentation and comments.

oishun1112 commented 2 years ago

https://github.com/InsureDAO/pool-contracts/blob/audit/code4rena/contracts/Registry.sol#L100

https://app.gitbook.com/s/1LzBDG6XOM2hzmw9AjXY/market/market-contracts/pool

fixed