UVToken-Audit 2

CertiK1 address on BNB Chain

CertiK reviewed UVToken (UVToken-Audit 2) on 24 Feb 2023: 8 findings, 0 critical; 4 marked fixed, 3 acknowledged, 1 open.

No open critical findings
Open the reportOpen UVToken’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings8

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High101
Medium012
Low021
HighFunction Calls User-Provided Addresses With No AcFixed

In the current implementation, function `InsertUVTPledge` will trigger an external call to a user provided address `_pledgeAddr`. ```solidity=422 function InsertUVTPledge( address _userAddr , uint256 _pledgeAmount, address _pledgeAddr ) external { IPledge IPledge_ = IPledge(_pledgeAddr); bool _isValid; (,,,_isValid) = IPledge_.getPledgeInfo(); require(_isValid,"noValid"); payToken(tokenAddress_, _userAddr, _pledgeAmount); IPledge_.insertUVTPledge(_userAddr, _pledgeAmount); } ``` Calling a user provided address is dangerous, especially in a public function with no access control restriction. An attacker could deploy a malicious contract and use the vulnerable function to trigger a call to the malicious contract. In this case, the attacker can bypass the `_isValid` check in L426 and he can transfer tokens hold by any user to the `IFinance_` account, if the user has approved the `UVTPledge` contract.

MediumIneffective `isNotContract()` CheckFixed

The implementation of the `isNotContract` check can not cover all scenarios. The check can be bypassed if the call is from the constructor of a smart contract or when the contract is destroyed. In that case, the codesize will also be zero. The "isContract" function in the OpenZeppelin "Address" library uses the similar implementation, but comments mention that "it's unsafe to rely on the check and it can be bypassed". Reference: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol Bypassing the `isNotContract()` check would introduce potential risks to the project.

MediumPotential lack of access control for "mint"Fixed

The "mint" function lacks access control, allowing any user to call it and transfer uvcToken to miner on a daily basis. The reason for allowing everyone to call the "mint" function is unclear to the auditor and we suggest this function should only be accessible from the contract owner. ```solidity=474 function mint() external CanMint isNotContract(msg.sender) returns(bool) { uint256 nDays = (block.timestamp - lastMint_)/CYCLE_; lastMint_ = lastMint_ + nDays * CYCLE_; uvcToken_.safeTransfer(miner_, nDays * numMint_); return true; } ```

LowDifferent Solidity VersionsFixed

Multiple Solidity versions are used in the codebase. Versions used: `^0.8.4`, `^0.8.7` `^0.8.4` is used in UVToken/uvcMine.sol file. ```solidity=305 pragma solidity ^0.8.4; ``` `^0.8.7` is used in UVToken/uvcMine.sol file. ```solidity=404 pragma solidity ^0.8.7; ```

Contracts in scope1

AddressChainSource code
0xa9bdd634725eab26ab297e969071fadc45118569Chain: BNB ChainSource code: Verified source

Part of UVToken’s security record

UVToken
Audits2 audits by 1 firmLast audit Feb 2023, by CertiK.
Critical findingsNo open critical findingsAcross the 2 reports, 1 critical finding was reported. It is marked fixed by the firm that reported it.
Open UVToken’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

See CertiK’s audits

Something 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