CertiK reviewed Gradient Protocol (Gradientprotocol.) on 1 Apr 2024: 6 findings, 0 critical; all acknowledged, none fixed.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 4 | 0 |
| Medium | 0 | 1 | 0 |
| Low | 0 | 1 | 0 |
In the contract `Gradient` the role `AUX_ADMIN` has authority over the functions shown in the diagram below. Any compromise to the `AUX_ADMIN` account may allow the hacker to take advantage of this authority and change fee exempt address, change pair address, change threshold and change fee percentage.  In the contract `Gradient` the role `DEFAULT_ADMIN_ROLE` has authority over the functions shown in the diagram below. Any compromise to the `DEFAULT_ADMIN_ROLE` account may allow the hacker to take advantage of this authority and change fee exempt address, change pair address, change threshold and change fee percentage, change token receive address and transfer tokens/ETH out of the contract. 
In function `_swapTokensByPair`, `GDT` tokens are swapped to `currentPair.base` token, which is set by the admin. These tokens are subsequently sent to the tributeHolder wallet. As a result, over time the tributeHolder address will accumulate a significant portion `GDT`. The mishandling of its private key can have devastating consequences for the project as a whole.
All of the GDT tokens are sent to the contract deployer. This is a centralization risk because the deployer can distribute tokens without obtaining the consensus of the community. Any compromise to the deployer address may allow a hacker to steal and sell tokens on the market, resulting in severe damage to the project.
In the contract `Gradient`, the owner has the authority to withdraw all tokens from the contract. ```solidity=124 function rescueTokens(address recipient, address token, uint amount) public { require( hasRole(DEFAULT_ADMIN_ROLE, msg.sender) , "Insufficient privileges" ); IERC20(token).transfer(recipient, amount); } ``` Any compromise to the owner account may allow a hacker to take advantage of this authority and withdraw tokens from the contract.
The maximum fee rate can be set to 100%, in which case all of the user's transferred Tokens will be swapped and sent to tributeHolder.
A sandwich attack might happen when an attacker observes a transaction swapping tokens or adding liquidity without setting restrictions on slippage or minimum output amount. The attacker can manipulate the exchange rate by frontrunning (before the transaction being attacked) a transaction to purchase one of the assets and make profits by backrunning (after the transaction being attacked) a transaction to sell the asset. The following functions are called without setting restrictions on slippage or minimum output amount, so transactions triggering these functions are vulnerable to sandwich attacks, especially when the input amount is large: - router.swapExactTokensForTokensSupportingFeeOnTransferTokens
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (1)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us