888BitsStaking

Smart Contract Audit Report


Executive Summary

This report presents the outcomes of our collaborative engagement with the 888Bits team, focusing on the comprehensive evaluation of the 888BitsStaking contract. We previously reviewed the project team's S8B token here.

Our team conducted an initial security assessment from June 12th to June 14th, 2024.

888Bits Staking is a new contract which allows users to stake S8B in exchange for various rewards.


Audit Scope

Name

Source Code

Visualized

888BitsStaking

​Code provided by project team​

Inheritance Chart.  Function Graph.

Name/Source Code

Visualized

888BitsStaking
Code provided by project team​

Inheritance Chart.
Function Graph.


Audit Findings

No findings were identified, though some centralized aspects are present.

System Overview

STAKING & REWARD ACCRUAL

The staking mechanism offers users three options for stake durations: 7 days, 14 days, or 30 days. Each duration corresponds to distinct reward accrual settings, influencing how users earn rewards. Specifically, a 7-day stake earns S8B rewards solely for the duration of the stake, while a 14-day stake continues to accrue S8B rewards post the initial 14 days. Additionally, a 30-day stake not only continuously earns S8B rewards but also qualifies for USDC dividend rewards.

STAKE MANAGEMENT

Each user stake is treated independently, ensuring that creating a new stake does not impact existing stakes' rewards or unlock time. Users have the flexibility to unstake at any time after a stake's duration has passed. Any of the Stake's pending S8B rewards are automatically harvested upon unstaking, but pending S8B or dividend rewards can be claimed manually at any time. When manually claiming rewards, users can choose to compound their rewards, which adds them back into their existing Stake. A user's cumulative S8B rewards are all harvested at once; USDC rewards can be either cumulatively harvested or harvested for individual Stakes. 7 Day Stakes are not compounded if their end date has passed. When USDC rewards are compounded, they are first swapped for S8B tokens before being added back into the Stake. The user must provide a mininmum accepted S8B to receive from the swap to protect against front running.

REWARD ACCRUAL AND DISTRIBUTION

Rewards are accrued on a daily basis, with reward pool updates automatically triggered by any stake, unstake, reward injection, or claim. Pool updates can also be manually triggered by any address at any time. Rewards for multiple days are processed at once if more than one day has passed since the last update. Any address can supply S8B or USDC rewards for distribution, with S8B rewards offering the additional feature of being distributed evenly across a specified number of days in the future. The project team cannot supply USDC rewards while there are no active 30-day stakers.


Vulnerability Analysis

Vulnerability Category Notes Result
Arbitrary Jump/Storage Write N/A PASS
Centralization of Control N/A PASS
Compiler Issues N/A PASS
Delegate Call to Untrusted Contract N/A PASS
Dependence on Predictable Variables N/A PASS
Ether/Token Theft N/A PASS
Flash Loans N/A PASS
Front Running N/A PASS
Improper Events N/A PASS
Improper Authorization Scheme N/A PASS
Integer Over/Underflow N/A PASS
Logical Issues N/A PASS
Oracle Issues N/A PASS
Outdated Compiler Version N/A PASS
Race Conditions N/A PASS
Reentrancy N/A PASS
Signature Issues N/A PASS
Sybil Attack N/A PASS
Unbounded Loops N/A PASS
Unused Code N/A PASS
Overall Contract Safety   PASS

About SourceHat

SourceHat has quickly grown to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1800+ solidity smart contract audits covering all major project types and protocols, securing a total of over $50 billion U.S. dollars in on-chain value!
Our firm is well-reputed in the community and is trusted as a top smart contract auditing company for the review of solidity code, no matter how complex. Our team of experienced solidity smart contract auditors performs audits for tokens, NFTs, crowdsales, marketplaces, gambling games, financial protocols, and more!

Contact us today to get a free quote for a smart contract audit of your project!

What is a SourceHat Audit?

Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A SourceHat Audit takes this a step further by verifying economic logic to ensure the stability of smart contracts and highlighting privileged functionality to create a report that is easy to understand for developers and community members alike.

How Do I Interpret the Findings?

Each of our Findings will be labeled with a Severity level. We always recommend the team resolve High, Medium, and Low severity findings prior to deploying the code to the mainnet. Here is a breakdown on what each Severity level means for the project:

  • High severity indicates that the issue puts a large number of users' funds at risk and has a high probability of exploitation, or the smart contract contains serious logical issues which can prevent the code from operating as intended.
  • Medium severity issues are those which place at least some users' funds at risk and has a medium to high probability of exploitation.
  • Low severity issues have a relatively minor risk association; these issues have a low probability of occurring or may have a minimal impact.
  • Informational issues pose no immediate risk, but inform the project team of opportunities for gas optimizations and following smart contract security best practices.