code-423n4 / 2021-11-badgerzaps-findings

0 stars 0 forks source link

Modifier should be used instead of functions to write modifier in ibBTC VaultZap.sol #26

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

fatima_naz

Vulnerability details

Impact

In ibBTC VaultZap.sol line no - 91 and 95 Function Modifiers are used to modify the behaviour of a function. For example to add a prerequisite to a function.The main use case of modifiers is for automatically checking a condition, prior to executing a function.

Proof of Concept

https://stackoverflow.com/questions/44982437/what-does-a-modifier-do-in-solidity

Tools Used

Recommended Mitigation Steps

use modifier keyword instead of writing function .

tabshaikh commented 2 years ago

agree good practice to use function modifiers

GalloDaSballo commented 2 years ago

Disagree as inline modifiers are an emergent pattern, that also saves gas

0xleastwood commented 2 years ago

Will keep issue open as non-critical