Aethra Info
Aethra began as a workforce solutions provider, successfully completing many projects across key industrial sites in the Benelux region. Within our first year, we successfully staffed more than 100 highly qualified professionals, showcasing our ability to swiftly meet urgent client demands while consistently upholding the highest standards of excellence and precision in workforce management.
TrustNet Score
The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.
Real-Time Threat Detection
Real-time threat detection, powered by Cyvers.io,
is currently not
activated
for this project.
This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks.
For more information, click here.
Summary and Final Words
No crucial issues found
The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.
Contract owner cannot mint
It is not possible to mint new tokens.
Contract owner cannot blacklist addresses.
It is not possible to lock user funds by blacklisting addresses.
Contract owner cannot set high fees
The fees, if applicable, can be a maximum of 25% or lower. The contract can therefore not be locked. Please take a look in the comment section for more details.
Contract cannot be locked
Owner cannot lock any user funds.
Token cannot be burned
There is no burning within the contract without any allowances
Ownership is not renounced
The owner retains significant control, which could potentially be used to modify key contract parameters.
Contract is not upgradeable
The contract does not use proxy patterns or other mechanisms to allow future upgrades. Its behavior is locked in its current state.
Scope of Work
This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.
The auditing process consists of the following systematic steps:
- Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
- Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
- Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
- Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
- Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
- Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
- Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.
A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.
Final Words
The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.
Ownership Privileges
- The owner can add a new staking pool.
- The owner can update the existing pool.
Note - This Audit report consists of a security analysis of the Aethra staking smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited one token contract for the Aethra team. Other contracts associated with the project were not audited by our team. We recommend investors do their own research before investing.
Files and details
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Findings and Audit result
medium Issues | 1 findings
Pending
#1 medium Issue
Missing check for user staked amount.
The pending reward calculation can cause a transaction to revert due to underflow when the user.staked == 0, as Solidity does not support negative values. If a new user deposits for the first time while accPointPerShare has increased, subtracting user.rewardDebt from zero triggers an error. To fix this, check if the user has staked before calculating rewards.
low Issues | 10 findings
Pending
#1 low Issue
Floating pragma solidity version
Adding the constant version of solidity is recommended, as this prevents the unintentional deployment of a contract with an outdated compiler that contains unresolved bugs.
Pending
#2 low Issue
Remove safemath library
The compiler version above 0.8.0 has the ability to control arithmetic overflow/underflow. It is recommended to remove the unwanted code in order to avoid high gas fees.
Pending
#3 low Issue
Missing checks for duration and emission
The addPool function lacks validation for _duration and _emission, allowing pools with 0 duration or rewards. A 0 duration means staking ends instantly, and a 0 emission makes the pool useless, wasting gas and confusing users. This can cause unexpected contract behavior and broken reward calculations. To fix this, add require(_duration > 0, "Duration must be greater than 0") and require(_emission > 0, "Emission must be greater than 0"). This ensures pools are functional, preventing wasted transactions and enhancing contract reliability. Proper validation improves security, usability, and prevents unintended errors in staking pools.
Pending
#4 low Issue
Missing events
It is recommended to emit all the critical parameter changes.
Pending
#5 low Issue
No Validation for _pid
The updatePool function lacks validation for _pid, allowing invalid pool IDs to cause contract reverts. If _pid exceeds the number of pools, accessing poolInfo[_pid] results in an “index out of bounds” error, disrupting transactions and UI functionality. This can break loops that update multiple pools, leading to wasted gas. To fix this, add require(_pid < poolLength, "Invalid pool ID") before accessing poolInfo. This ensures only valid pools are updated, preventing accidental failures, improving contract stability, and avoiding unnecessary transaction costs. Proper validation enhances security, prevents execution errors, and ensures smooth staking and reward distribution.
Pending
#6 low Issue
Missing cooldown period.
Adding a cooldown to updatePool() prevents excessive calls, reducing gas costs and spam attacks. Without it, bots or malicious actors can spam the function, increasing gas fees and network congestion without real benefits. A 10-minute cooldown ensures updates happen at proper intervals, preventing unfair advantage while keeping rewards fair. It also stops redundant updates, making staking more efficient. The cooldown saves gas, improves security, and prevents manipulation by limiting how often rewards are recalculated.
Pending
#7 low Issue
Missing zero check for _amount.
Check that the _amount should be greater than zero.
Pending
#8 low Issue
Missing balance check for rewards.
The deposit function lacks a balance check before transferring rewards, causing transactions to fail and revert if the contract lacks sufficient tokens. This disrupts staking, wastes gas, and prevents users from depositing. To fix this, verify the contract’s balance before sending rewards. This ensures smooth staking even if rewards run low, enhancing contract stability and efficiency.
Pending
#9 low Issue
Missing check for pending rewards.
The compound, withdraw function executes unnecessary steps when pendingReward == 0, leading to wasted gas. Even if there are no rewards, the function updates variables and emits events, consuming gas for no reason. To fix this, add a simple check: if (pendingReward == 0) return; This prevents unneeded executions, reducing gas costs and improving efficiency.
Pending
#10 low Issue
Missing balance check for rewards.
The withdraw function does not check if the contract has enough tokens before transferring the withdrawal amount to the user. If the contract’s balance is lower than the required amount, the transaction fails and reverts, preventing users from withdrawing. This issue occurs when multiple users withdraw simultaneously, draining the contract’s funds. To fix this, check the contract’s balance before transferring.