Skip to content

Instantly share code, notes, and snippets.

@RideSolo
Last active March 3, 2020 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RideSolo/dee4dd5975dad8c0ca82deddfd5c5567 to your computer and use it in GitHub Desktop.
Save RideSolo/dee4dd5975dad8c0ca82deddfd5c5567 to your computer and use it in GitHub Desktop.

FriendsFingers Audit Report.

1. Summary

This document is a security audit report performed by RideSolo, where FriendsFingers has been reviewed.

2. In scope

3. Findings

5 issues was reported:

  • 1 Criticall severity issue.
  • 2 Low severity issues.
  • 3 Owner Privileges.

3.1. Crowdsale Finalization

Severity: Critical

Description

closeCrowdsale function member of FriendsFingersBuilder designed to finalize the crowdsale is only accessible by owner or the crowdsale creator, however finalize function member of FriendsFingersCrowdsale is public.

If any attacker calls finalize directly and all the condition to finalize the crowdsale are met, FriendsFingersBuilder's function closeCrowdsale won't execute since it calls finalize function that will throw since it was previously called. This will leave the token contract in a minting state since finishMinting can't be called anymore.

The Token contract is designed to block all transfers untill mintingFinished is set to true, meaning that an attacker can block the newly deployed token transfers for all users and makes the ICO fail.

Code snippet

https://github.com/FriendsFingers/friendsfingers-smartcontracts/blob/master/contracts/FriendsFingersBuilder.sol#L152

https://github.com/FriendsFingers/friendsfingers-smartcontracts/blob/master/contracts/crowdsale/FriendsFingersCrowdsale.sol#L133

https://github.com/FriendsFingers/friendsfingers-smartcontracts/blob/master/contracts/token/FriendsFingersToken.sol#L17

https://github.com/FriendsFingers/friendsfingers-smartcontracts/blob/master/contracts/token/FriendsFingersToken.sol#L33

3.2. FallBack Function

Severity: low

Description

The fallback function is used to donate ether to the project, however it can be missused by users. Developers should create a dedicated function for deposit with a unique name.

Code snippet

https://github.com/FriendsFingers/friendsfingers-smartcontracts/blob/master/contracts/FriendsFingersBuilder.sol#L42#L43

3.3. Owner Privileges

severity: medium

Description

FriendsFingers dapp is a tool for entrepreneur to deploy ICO without the need to deploy a dapp or develope it by themselves, however people using FriendsFingers should be aware that they have no control over the ICO, everything has to handled through FriendsFingers owner.

3.4. Known vulnerabilities of ERC-20 token

Severity: low

Description

  1. It is possible to double withdrawal attack. More details here
  2. 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

Conclusion

The audit contracts are not safe because of critical severity issue. Users intending to deploy their ICO through FriendsFingers Dapp should be aware that they won't be in charge of the ICO main mechanism leaving them without any privilege.

ICOs process should be completely automated without any external intervetion to gain the trust of the investors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment