Dai Token (DAI) security audit, conducted by the Callisto Network Security Department in August 2019.


 

Dai Token (DAI) Specificities

 

 

 

Audit Request

Audit Top 200 CoinMarketCap tokens.

Dai (DAI) stablecoin.

Symbol      : DAI
Name        : Dai

http://www.makerdao.com/

Source Code:

https://etherscan.io/address/0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359#code

Disclosure policy

Public.

Platform:

ETH.

Number of lines:

238.

 


Dai Token (DAI) Smart Contract Security Audit Report

Are Your Funds Safe?


 

1. In scope

2. Findings

In total, 4 issues were reported including:

  • 3 low severity issues.

  • 1 owner privileges (the ability of an owner to manipulate contract, may be risky for investors).

No critical security issues were found.

2.1. Known vulnerabilities of ERC-20 token

Severity: low.

Description:

  • 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.

Recommendation:

Add the following code to the transfer(_to address, ...) function:

require( _to != address(this) );

2.2. Blocking transferring

Severity: owner privileges.

Description:

The contract owner allowed to block transfer functions( transferFrom, approve, mint, burn).

Code snippet:

  • Line 234.

2.3. ERC20 Compliance — event missing

Severity: low.

Description:

According to ERC20 standard when coins are minted(or burned) a Transfer event should be emitted.

Code snippet:

  • Lines 423, 428, 303.

2.4. Checking input addresses

Severity: low.

Description:

Incoming addresses should be checked for an empty value(0x0 address) to avoid loss of funds or blocking some functionality.

Code snippet:

  • setOwner function (lines 129-135)
  • transferFrom function (lines 390-405)

3. Conclusion

The audited smart contract can be deployed. Only low severity issues were found during the audit.

4. Revealing audit reports

Appendix

Smart Contract Audits by Callisto Network.

Miscellaneous

Why Audit Smart Contracts?

Our Most Popular Audit Reports.


Trust the Blockchain, Audit the Smart Contracts.


Follow Callisto’s Security Department on Twitter to get our latest news and updates!