Autogas Info

Autogas is a platform where you can create unique digital items, earn rewards generated by the treasury, and with a built in router, you can manage your ETH rewards easily. With Autogas, you get a 5% crypto back when using a referral code, and when your friends use your referral code, you earn another 5% from their transactions. It's all about making your digital management simple and rewarding.

Autogas Logo

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.

45.58
PoorExcellent

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.

Security Assessments

Select the audit
"Static AnalysisDynamic AnalysisSymbolic ExecutionSWC CheckManual Review"
Contract address
N/A
Network N/A
License N/A
Compiler N/A
Type N/A
Language Solidity
Onboard date 2025/01/28
Revision date In progress

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

Contract can be manipulated by owner functions.

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:

  1. Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
  2. Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
  3. Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
  4. Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
  5. Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
  6. Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
  7. 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
Autogas2.sol
  • The owner or treasury address can set the payout shares.
  • The team wallet can withdraw the balance from the contract.
  • The owner can initiate the strategic purchase.
  • The owner can execute the strategic purchase.
  • The owner can set the treasury and liquidation contract address.
  • The owner can update the team wallet address.
  • The team wallet can withdraw the balance from the contract.

Note - This Audit report consists of a security analysis of the Autogas smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited the mentioned contracts for the Autogas 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

Findings and Audit result

medium Issues | 5 findings

Pending

#1 medium Issue
Missing 'isContract' check.
Autogas2.sol
L416-420
L422-426
Description

The contract lacks a validation check to ensure that specific parameters are contract addresses. Without this check, there is a risk that non-contract addresses (such as externally owned accounts, or EOAs) could be mistakenly set for parameters intended to reference other contracts. This could lead to failures in executing critical interactions within the contract, as EOAs do not support contract-specific functions. To mitigate this, Implement a validation check to ensure that parameters designated as contract addresses are verified as such. This can be done using Solidity’s Address library function isContract, which checks if an address has associated contract code.

Pending

#2 medium Issue
Missing Non-reentrant check.
Autogas2.sol
L86-150
Description

The function has a reentrancy vulnerability due to external calls (payable(msg.sender).transfer and payable(teamWallet).transfer) being made before state updates. If msg.sender is a malicious contract, it can re-enter the function via its fallback or receive function before critical state variables, like userTokens or tokenIdCounter, are updated. This allows the attacker to mint additional NFTs or manipulate the state. To fix this, apply the Checks-Effects-Interactions pattern by updating the state before external calls or implement a reentrancy guard, such as OpenZeppelin’s ReentrancyGuard, to block reentrant calls and prevent exploitation.

Pending

#3 medium Issue
Missing check for referrer
Autogas2.sol
L86-150
Description

The logic does not prevent duplicate referral code generation or ensure uniqueness. If generateReferralCode has a bug, conflicts may occur. Ensure generateReferralCode produces unique codes and validate against existing codes. Also, The logic does not check if the referrer is valid or distinct from msg.sender. This can lead to users self-referring and abusing the system for cashback or rewards. Add a check: require(referrer != msg.sender, "Self-referral is not allowed");.

Pending

#4 medium Issue
Missing access control.
Autogas2.sol
L152-160
Description

The function lets any NFT owner set the payout address without admin approval, posing a security risk. If payouts are meant for specific addresses, a user could maliciously or accidentally redirect funds elsewhere. The function only checks ownership but lacks role-based access control, making unauthorized changes possible. This can lead to financial losses or exploitation. To fix this, restrict access using onlyOwner or hasRole(ADMIN_ROLE, msg.sender), require multi-signature approval, or enforce whitelisted addresses for modifications. Proper access control ensures payout addresses remain secure and prevent unintended fund redirections by unauthorized users.

Pending

#5 medium Issue
Incorrect Ownership Check
Autogas2.sol
L209-232
Description

The revokeDelegation function checks if msg.sender owns the NFT before revoking delegation, but this is flawed. If the original owner delegates the token and later transfers it, they can still revoke delegation, even though they no longer own it. This creates a security risk where a past owner can interfere, while the new owner lacks control. The fix is to allow either the current NFT owner or the original delegator to revoke delegation, ensuring proper authorization. Updating the ownership check prevents unauthorized actions and secures delegation management, preventing past owners from manipulating token delegation.

low Issues | 11 findings

Pending

#1 low Issue
Floating pragma solidity version
Autogas2.sol
L2
Description

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.

Resolved

#2 low Issue
Unused function parameter
AutogasNft.sol
L69
Description

It is recommended to remove the unused code from the contract.

Pending

#3 low Issue
Unused function parameter
Autogas2.sol
L394
Description

It is recommended to remove the unused code from the contract.

Resolved

#4 low Issue
Unused state variable
AutogasNft.sol
L35
Description

It is recommended to remove the unused code from the contract.

Resolved

#5 low Issue
Floating pragma solidity version
AutogasNft.sol
L2
Description

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.

Resolved

#6 low Issue
Local variables shadowing (shadowing-local)
AutogasNft.sol
L115
L118
L138
L139
L142
L143
Description

Rename the component that shadows another component.

Pending

#7 low Issue
Missing events arithmetic
Autogas2.sol
L459-462
Description

Emit all the critical parameter changes.

Pending

#8 low Issue
Duplicate Calls to setNFTPayoutAddress
Autogas2.sol
L152-160
Description

The function calls ILiquidation.setNFTPayoutAddress(tokenId, payoutAddress); twice, which is redundant and wastes gas. Each external contract call incurs gas costs, and since both calls set the same value, the second one does nothing new. This inefficiency increases transaction fees for users. Remove the duplicate call and keep only one instance of it. This ensures the function executes optimally, reducing gas consumption while maintaining correctness.

Pending

#9 low Issue
Lack of Delegate Overwrite Mechanism
Autogas2.sol
L191-207
Description

If a user wants to delegate the same token to a new address, they cannot do so without first revoking the previous delegation. This increases the number of transactions needed to update a delegate, leading to inefficiency. Since require(!isTokenDelegated[msg.sender][tokenId], "Token already delegated"); prevents redelegation, users must first revoke delegation and then re-delegate, causing unnecessary steps. Allow re-delegation by updating the tokenDelegations mapping without first requiring explicit revocation. Alternatively, add a function to update the delegate in one step.

Pending

#10 low Issue
Unused functionality
Autogas2.sol
L320-336
Description

The _distributeDelegationRewards function appears unused in the contract since no other function calls it. It’s marked internal, but there’s no reference to it, making it redundant. Additionally, tokenIdCounter is undefined in the provided code, raising concerns about tracking NFTs correctly. If a token has no delegate, rewards go to msg.sender, which may not be the correct recipient. This suggests improper reward distribution. The function might be outdated or replaced by another method, making it unnecessary unless properly integrated. Removing or refactoring it can help optimize the contract and prevent unintended behavior.

Pending

#11 low Issue
Unintended Behavior if _executePurchaseStage Fails
Autogas2.sol
L393-417
Description

The issue arises when _executePurchaseStage fails after updating the contract’s internal state (e.g., marking a purchase as complete) but before completing the external transaction (e.g., token swap via Uniswap). If the external call fails, the contract’s state becomes inconsistent, as it thinks the purchase was completed, but no action was actually taken. This can break future logic. The solution is to follow the checks-effects-interactions pattern: first, check all conditions, then update the contract’s state, and only after that interact with external contracts. This ensures consistent contract state even if the external call fails.

informational Issues | 1 findings

Pending

#1 informational Issue
Missing require error message
Autogas2.sol
L172
Description

It is recommended to add the error message while using the require check inside the function or a modifier in the contract.