Open hats-bug-reporter[bot] opened 8 months ago
There is no state variable corresponding to the description hash to be set.
Note that also initialize()
just emits the SetVaultDescription()
event.
The description is stored off-chain and the last SetVaultDescription()
event is read to validate the description.
Github username: @ololade97 Submission hash (on-chain): 0xdb761c8b6418415462587b12cb43b50f568a4bf127b8649979c8a0f28ab931ae Severity: high
Description: Description\ The
_descriptionHash
parameter passed into the setVaultDescription function cannot be set. There is no variable passed to the function or anything else through which the_descriptionHash
parameter can be set.The function only emits an unset
_descriptionHash
parameter - nothing will be emitted by the way.Attack Scenario\ The
_descriptionHash
parameter cannot be set in the setVaultDescription function.Attachments https://github.com/hats-finance/hats-contracts/blob/0d6ebbde912bc272d9b310140d434ee2aacd36d3/contracts/HATVault.sol#L133-L135
Proof of Concept (PoC) File
function setVaultDescription(string calldata _descriptionHash) external onlyRegistryOwner { emit SetVaultDescription(_descriptionHash); }
Revised Code File (Optional)