EthereumCommonwealth / Auditing

Ethereum Commonwealth Security Department conducted over 400 security audits since 2018. Not even a single contract that we audited was hacked. You can access our audit reports in the ISSUES of this repo. We are accepting new audit requests.
https://audits.callisto.network/
GNU General Public License v3.0
131 stars 34 forks source link

AMO Project #162

Closed MillianoConti closed 5 years ago

MillianoConti commented 5 years ago

Audit request

AMO a security solution for connected cars, autonomous vehicles, and smart cars.

Source code

https://github.com/AMO-Project/AMO-Contracts/tree/master/contracts

Disclosure policy

support@amo.foundation

Platform

ETH

Number of lines:

399

yuriy77k commented 5 years ago

@MillianoConti I have no response from support@amo.foundation Please, check email.

MillianoConti commented 5 years ago

publish the audit results publicly

Пятница, 1 марта 2019, 16:23 +03:00 от Yuriy notifications@github.com:

@MillianoConti I have no response from support@amo.foundation Please, check email. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .

yuriy77k commented 5 years ago

Callisto Network provides security audits free of charge for smart-contract developers and development teams. And by our disclosure policy, we need to inform developers about found issues. Therefore we have to contact with them.

As far as we didn't receive confirmation from smart contract developer team, the request should be closed.

MrCrambo commented 5 years ago

Auditing time 2 days

yuriy77k commented 5 years ago

@MrCrambo assigned

danbogd commented 5 years ago

Auditing time 5 days.

yuriy77k commented 5 years ago

@danbogd assigned

RideSolo commented 5 years ago

Auditing time: 3 days.

yuriy77k commented 5 years ago

@RideSolo assigned

danbogd commented 5 years ago

My report is finished.

yuriy77k commented 5 years ago

AMO Project Security Audit Report

1. Summary

AMO Project smart contract security audit report performed by Callisto Security Audit Department

2. In scope

3. Findings

In total, 7 issues were reported including:

No critical security issues were found.

3.1. Multiple Token Transfers

Severity: medium

Description

When allocateTokens is called the tokenAmount to be transferred to to address is not subtracted from allocationList[to].allowedAmount, meaning that if the function is called again by the owner a higher amount than allocationList[to].allowedAmount can be transferred to the to.

Code snippet

https://github.com/AMO-Project/AMO-Contracts/blob/master/contracts/AMOCoinSale.sol#L463#L476

https://github.com/AMO-Project/AMO-Contracts/blob/master/contracts/AMOCoinSale.sol#L400#L407

3.2. Multiple Token Allocation

Severity: notes

Description

If Multiple allocations are made to user address using addToAllocationList function member of AMOCoinSale, the amount allocated is not cumulated in allocationList[user].allowedAmount. Please note that addToAllocationList is meant to be used when EarlyInvestment is set, meaning that real payment are done offchain and this can lead to major errors from the team since this function is only used by the owner.

Code snippet

https://github.com/AMO-Project/AMO-Contracts/blob/master/contracts/AMOCoinSale.sol#L400#L407

3.3. Owner Privileges

Severity: Owner privilege

Description

  1. AMO token owner privileges:
  1. AMO sale owner privileges:

3.4. Zero address

Severity: notes

Description

There is possibility of setting zero address as admin in function AMOCoin and as contract address in function setTokenSaleAmount.

Code snippet

https://github.com/AMO-Project/AMO-Contracts/blob/master/contracts/AMOCoin.sol#L85

https://github.com/AMO-Project/AMO-Contracts/blob/master/contracts/AMOCoin.sol#L101

3.5. Modifier will block correct working

Severity: low

Description

The modifier onlyValidDestination from AMOCoin contract will fail the function in case of transferring funds to sale address. For example in function setTokenSaleAmount there are approving funds for tokenSaleAddr. And after it should be transferred from to this address, but transferFrom function checks with using onlyValidDestination(to) modifier.

Code snippet

https://github.com/AMO-Project/AMO-Contracts/blob/master/contracts/AMOCoin.sol#L67

https://github.com/AMO-Project/AMO-Contracts/blob/master/contracts/AMOCoin.sol#L101

3.6. Known vulnerability of ERC-20 token

Severity: low

Description

It is possible to double withdrawal attack. More details here.

4. Conclusion

The audited smart contract must not be deployed. Reported issues must be fixed prior to the usage of this contract.

5. Revealing audit reports

https://gist.github.com/yuriy77k/2fc552fd10cb2f77139068f29cfdedb5

https://gist.github.com/yuriy77k/618cb51beedeebb119dd37991a77238f

https://gist.github.com/yuriy77k/23b820cc0dbcced4d173dcbd105b9464