Dai smart contract security audit report performed by Callisto Security Audit Department
Audit Top 200 CoinMarketCap tokens. Dai (DAI) stablecoin.
In total, ** issues** were reported including:
-
3 low severity issues.
-
notes.
-
4 owner privileges (the ability of an owner to manipulate contract, may be risky for investors).
No critical security issues were found.
-
It is possible to double withdrawal attack. More details here.
-
Lack of transaction handling mechanism issue. WARNING! This is a very common issue and it already caused millions of dollars losses for lots of token users! More details here.
Add the following code to the transfer(_to address, ...)
function:
require( _to != address(this) );
The contract owner allowed to block transfer functions( transferFrom
, approve
, mint
, burn
).
- Line 234.
According to ERC20 standard when coins are minted(or burned) a Transfer
event should be emitted.
- Lines 423, 428, 303.
Incoming addresses should be checked for an empty value(0x0
address) to avoid loss of funds or blocking some functionality.
- setOwner function (lines 129-135)
- transferFrom function (lines 390-405)
The audited smart contract can be deployed. Only low severity issues were found during the audit.
https://gist.github.com/yuriy77k/bf2ea7c611b07073262d216d05de3b30
https://gist.github.com/yuriy77k/8cc19398ee91c3dd236f30a5b91c2d97