Skip to content
Request an audit

‹ All findings

Code should not panic underflow

Low/InfoM^0 Minter Gateway·Three Sigma · Stablecoin framework · 8th January, 2024Codebase3S-M^0-N06

Description

There's several places in the protocol where proper code validation is missing by, instead, relying on panic errors. This is not recommended behaviour as per Solidity Docs: Properly functioning code should never create a Panic, not even on invalid external input.

If this happens, then there is a bug in your contract which you should fix. Here are the instances that rely on panic errors caught during the review:

Recommendation

Raise proper errors instead of relying on panic.

Status

Addressed in #20b3b62, #160d105,