Closed yuriy77k closed 5 years ago
Auditing time 1 day
Auditing time 2 days
Auditing time 3 days
@danbogd @MrCrambo assigned
@mobilipia assigned
My report is finished.
@mobilipia where is your audit report? Please, send it to yuri@callisto.network
Need an auditor to complete this task.
Estimated auditing time is 3 days.
@gorbunovperm assigned
My report is finished.
The contract contains a high severity security issue. The developer informed about it.
OMNIS smart contract security audit report performed by Callisto Security Audit Department
OMNIS is the ERC20 token that brings everyone closer to the cryptocurrencies' world with its services.
https://etherscan.io/address/0x82b9eb75d6e8e6b4a296cf8fde9a7c23ee4b89ec#contracts
In total, 10 issues were reported including:
1 high severity issues.
3 medium severity issues.
1 low severity issues.
3 notes.
2 owner privileges (the ability of an owner to manipulate contract, may be risky for investors).
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) );
Functions doesn't initialize return value. As result default value will be returned. This can break the logic of the Dapp.
Lines 669, 678.
The setLevel
function is available to admins of 2nd level. But it does not check the level of the administrator being changed. Therefore, administrators have the option to reset owner rights to level 0. And there is no way to restore the rights, the contract will remain without the owner.
The contract can remain locked, for example, if the owner loses rights after calling the ownerFreeze
function.
setLevel()
, line 151
The attacker can approve
his tokens balance to himself and make transferFrom
from and to himself. Thus, he will receive a double amount in his stake-account.
Look to the comments at this example:
// transferFrom("0x31337", "0x31337", 1000);
uint256 _allowance = allowed[_from][msg.sender]; // 1000
balances[_from] = balances[_from].sub(_value); // 1000 - 1000 = 0
balances[_to] = balances[_to].add(_value); // 0 + 1000 = 1000
allowed[_from][msg.sender] = _allowance.sub(_value); = 1000 - 1000 = 0
emit Transfer(_from, _to, _value);
//STAKING RELATED//////////////////////////////////////////////
if (transferIns[_from].length > 0) delete transferIns[_from];
uint64 _now = uint64(now);
transferIns[_from].push(transferInStruct(uint128(balances[_from]), _now)); // transferIns["0x31337"] = [ {"amount" => 1000, "time" => 1560088849} ]
transferIns[_to].push(transferInStruct(uint128(_value), _now)); // transferIns["0x31337"] = [ {"amount" => 1000, "time" => 1560088849}, {"amount" => 1000, "time" => 1560088849} ]
transferFrom()
, lines 420-421
maxTotalSupply
Condition require(totalSupply < maxTotalSupply, 'Max supply reached')
occurs before new tokens are issued. In this case it is possible to release more tokens than maxTotalSupply
lines 286 and 452
Interest rate for the 5th year is (11 * 1e1)
. It looks like a typo but could lead to serious consequences.
line 530
transfer
, transferFrom
). Line 676escrowFeePercent
when he want and how he want, up to 100 %. Line 357.refund
functionEven if the refund is approved (line 842) the provider has a choice to get refund(line 807) or to release the payment(line 761). But there is no restrictions for refund()
function and anyone call this and make the choice for the provider.
refund()
, line 807
An attacker can make mass transfers to the victim in the amount of 1 "wei"(minimum token amount). Because of this, a large array of stake records will be created:
transferIns[_to].push(transferInStruct(uint128(_value), _now)); // large number of pushes.
And since the calculation of rewards occurs in a cycle, in the end, there not be enough gas to get a reward. And the reward of the victim will be unavailable.
This dangerous vulnerability can lead to large losses with large balances.
The audited smart contract must not be deployed. Reported issues must be fixed prior to the usage of this contract.
https://gist.github.com/yuriy77k/f25eeb000406c68f67bc577423a18a30
https://gist.github.com/yuriy77k/5751bcd95349737543f64df841d1c998
https://gist.github.com/yuriy77k/235be19c48cc9dde23d1baa6a435f5c1
Audit request
OMNIS is the ERC20 token that brings everyone closer to the cryptocurrencies' world with its services.
https://www.omnis-bit.com
The full description is here: https://docs.google.com/file/d/1zf7fxZPK4zMRsm-xwQ5zvs3k_ncv1MBi/edit?usp=docslist_api&filetype=msword
Source code
https://etherscan.io/address/0x82b9eb75d6e8e6b4a296cf8fde9a7c23ee4b89ec#code
Disclosure policy
bitomnisbit@gmail.com
Platform
ETH
Number of lines:
447