Tether Token (USDT) Security Audit Report
Are Your Funds Safe?
Our expert team at Callisto Network has conducted an in-depth security audit of the Tether Token (USDT) smart contract. This audit aims to ensure the security of your funds by identifying and assessing any potential vulnerabilities. Here, we present our findings:
Executive Summary
This report presents the results of the security audit conducted by the Callisto Network Security Department on the Tether Token (USDT) smart contract in July 2019. It analyzes the contract’s security in-depth and highlights any identified vulnerabilities.
1. Scope of the Audit
The audit focused on the following USDC contract:
2. Audit Findings
Our audit reported a total of 3 finding(s), categorized as follows:
- 0 high-severity issue(s).
- 0 medium severity issue(s).
- 3 low-severity issue(s).
In addition to these findings, our audit identified 4 additional points, detailed in the following sections:
- 0 note(s).
- 4 owner privilege(s).
No critical security issues were found.
2.1 Owner Privileges
- The contract allows for the pausing and unpausing of
transfer
andtransferFrom
functions. - Individual user addresses can be blacklisted, thus restricting their use of the
transfer
andtransferFrom
functions via theaddBlackList
andremoveBlackList
commands. Additionally, blacklisted users’ assets can be burned through thedestroyBlackFunds
function. Please note that these assets are expected to have a 1:1 backing ratio. - Transaction fees can be applied up to a maximum rate of 0.2%, with a maximum value of 50 USDT per transaction. More details can be found here.
- The owner of the contract has the ability to upgrade it via the
deprecate
function and implement new logic into the upgraded contract. However, even if the new contract is audited, it is still possible to change the address of the new contract again to an unaudited and potentially insecure one.
[/bsf-info-box]
2.2 Transfer to Address(0)
transfer
and transferFrom
allow the destination address to be equal to zero, meaning that the user’s fund can be lost if sent to it by mistake.[/bsf-info-box][bsf-info-box icon_type=”custom” icon_img=”id^11679|url^https://callisto.network/wp-content/uploads/2023/04/star-svgrepo-com.png|caption^null|alt^null|title^star-svgrepo-com|description^null” img_width=”20″ icon_animation=”fadeIn” title=”Code Snippet:”]
function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) { uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } uint sendAmount = _value.sub(fee); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); Transfer(msg.sender, owner, fee); } Transfer(msg.sender, _to, sendAmount); }
function transferFrom(address _from, address _to, uint _value) public onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } if (_allowance < MAX_UINT) { allowed[_from][msg.sender] = _allowance.sub(_value); } uint sendAmount = _value.sub(fee); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); Transfer(_from, owner, fee); } Transfer(_from, _to, sendAmount); }
[/bsf-info-box]
2.3 Not Emitted Transfert Event
ERC20 standard: “A token contract which creates new tokens SHOULD trigger a Transfer event with the _from the address set to 0x0 when tokens are created”. The same can be deducted when redeeming or burning tokens.
The same issue is applicable for TetherToken
constructor.[/bsf-info-box][bsf-info-box icon_type=”custom” icon_img=”id^11679|url^https://callisto.network/wp-content/uploads/2023/04/star-svgrepo-com.png|caption^null|alt^null|title^star-svgrepo-com|description^null” img_width=”20″ icon_animation=”fadeIn” title=”Code Snippet:”]
- https://gist.github.com/RideSolo/24c79eb34b565ade477ec89c2af49a5b#file-usdt-sol-L406.
- https://gist.github.com/RideSolo/24c79eb34b565ade477ec89c2af49a5b#file-usdt-sol-L420.
[/bsf-info-box]
2.4 Known Vulnerabilities of ERC-20 token
- The smart contract is susceptible to double withdrawal attacks. Learn more about this type of attack here.
- The contract lacks a transaction handling mechanism. WARNING! This common vulnerability has already led to significant financial losses. For a comprehensive understanding of this issue, click here.
[/bsf-info-box][bsf-info-box icon_type=”custom” icon_img=”id^11679|url^https://callisto.network/wp-content/uploads/2023/04/star-svgrepo-com.png|caption^null|alt^null|title^star-svgrepo-com|description^null” img_width=”20″ icon_animation=”fadeIn” title=”Recommendation:”]
Add the following code to the
transfer(_to address, ...)
function:require( _to != address(this) );
[/bsf-info-box]
3. Conclusion
The audited smart contract can be deployed. Only low severity issues were found during the audit.
About Callisto Network
Founded by Dexaran, co-founder of Ethereum Classic, Callisto Network is a blockchain platform that prioritizes security. We’ve conducted over 330 smart contract audits across platforms like Ethereum, Ethereum Classic, and EOS. In addition to our audits, we’ve developed the ERC 223 token standard and CallistoNFT standard, enhancements over existing standards that address flaws and offer new capabilities, further establishing us as industry leaders in crypto-security.