hats-finance / Proof-Of-Humanity-V2-0xef0709445d394a22704850c772a28a863bb780b0

Proof of Humanity Protocol v2
2 stars 1 forks source link

State was never set to Vouching, for that reason the contract will revert on execution of few main functionalities. #79

Open hats-bug-reporter[bot] opened 2 months ago

hats-bug-reporter[bot] commented 2 months ago

Github username: -- Twitter username: -- Submission hash (on-chain): 0x68e79e39fee5f6ada4481c4bc07ff7b15f25b7639546b810fd072f2ecec864e0 Severity: high

Description: Description\ Status.Vouching is not set anywhere of ProofOfHumanity.sol contract, as many function execution is depending on this status like - fundRequest(), withdrawRequest() & most important advanceState(), these functions will revert.

This Status.Vouching might need to be set while claiming a request i.e in time of calling claimHumanity().

Attack Scenario\ There is no attack required in this case. The calls to above mentioned functions will revert everytime.

Attachments

You can search here and see that the request.status = Status.Vouching was not set anywhere.

clesaege commented 2 months ago

In solidity, variables have a default value, in the case of an enum, this is the first item. In the case of Status, this is Vouching. Therefore, requests are in Vouching by default and we do not need to change them to Vouching.