VIS-2 / taobank-04-24

0 stars 0 forks source link

The risks of relying on assert() in solidity contracts #19

Open 0xMilenov opened 4 months ago

0xMilenov commented 4 months ago

Context

StabilityPool.sol

Description

In versions after 0.8.0, it's prudent to minimize the use of assert(). The Solidity documentation suggests that code should never reach a state where assert() is triggered. Instead, for better clarity and understanding of contract failures, developers are advised to utilize require() statements or custom error messages.