sherlock-audit / 2024-08-cork-protocol-judging

2 stars 2 forks source link

Mammoth Laurel Nightingale - [L-06] No Parameter Validation in Constructor #288

Closed sherlock-admin2 closed 2 months ago

sherlock-admin2 commented 2 months ago

Mammoth Laurel Nightingale

Low/Info

[L-06] No Parameter Validation in Constructor

Summary

Vulnerability Detail

In Solidity, constructor functions for smart contracts can be created with parameters, which are typically used to initialize some aspect of the contract's state. If the values passed to parameters in a constructor are not validated, it is possible that the contract might be deployed in an incorrect or undesirable state.

Further reading: Solidity Documentation: Constructors

Impact

Code Snippet

Tool used

Manual Review

Recommendation -

add require condition to check for zero address and other checks too

sherlock-admin2 commented 1 month ago

The protocol team fixed this issue in the following PRs/commits: https://github.com/Cork-Technology/Depeg-swap/pull/120