Know Your Market Info
KnowYourMarket.ai uses advanced AI tools to transform marketing strategies and reporting, giving businesses a competitive edge. By analysing market data and consumer behaviour, our platform delivers tailored insights that drive decision-making. Users can generate reports highlighting AI derived key performance indicators, empowering marketers to create innovative campaigns that resonate with their audience.
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.
Security Assessments
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 upgradeable
The contract uses a proxy pattern or similar mechanism, enabling future upgrades. This can introduce risks if the upgrade mechanism is not securely managed.
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.
Contract Analysis
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 functions
initializeandupdate_token_pricecan only be executed by the designated authority (owner), granting them control over the presale setup and parameter adjustments.
Note: The list of contract functionalities and ownership privileges is not exhaustive and may be added to or removed from based on project requirements.
The audited smart contract is a presale system built using Anchor on the Solana blockchain for KnowYourMarket.io. It facilitates token purchases using SOL and USDC, maintains presale state, and allows the owner to update token pricing. The contract follows standard Anchor practices, using PDAs for state management and associated token accounts to streamline token handling.
Throughout the review, the contract's overall structure and adherence to Anchor conventions have been found to be sound. The previously identified issues have been addressed as follows:
- On-Chain Verification: The
buy_tokensfunction now verifies thetokens_to_transferandusdc_valueparameters by performing on-chain calculations and allowing a reasonable 3% margin of error, preventing manipulation. - Input Validation and Safe Arithmetic: The token price in the
initializefunction is now validated with proper bounds and non-zero checks. All arithmetic operations use checked methods to prevent potential overflows. - Case-Insensitive Payment Method: Payment method strings are now normalized using
to_lowercase(), eliminating potential issues with case sensitivity. - Token Vault Balance Verification: The contract now verifies that the token vault has sufficient balance before attempting a token transfer, preventing failed transactions.
- Pre-Defined Claims: The contract does not implement functionalities for burning, locking, minting, fee adjustments (above 25%), blacklisting, or upgradeability.
The contract is functionally sound, with strong security measures in place to ensure that token distributions, fund transfers, and overall state management are secure and robust. The implemented fixes follow best practices for Solana smart contract development.
Note - This Audit report consists of a security analysis of the KnowYourMarket.io smart contract. This analysis did not include exhaustive functional or unit testing of the contract's logic. Moreover, we only audited one token contract for the KnowYourMarket.io 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
high Issues | 1 findings
Resolved
#1 high Issue
Unvalidated Off-Chain Computed Token Transfer Amount
In the buy_tokens function, the parameters tokens_to_transfer and usdc_value are provided by the caller without on-chain verification. This could allow a malicious buyer to claim more tokens than warranted by the actual payment.
medium Issues | 2 findings
Resolved
#1 medium Issue
Lack of Token Price Validation
The initialize function does not validate the token_price parameter, potentially allowing a zero or otherwise invalid price to be set.
Resolved
#2 medium Issue
Lack of Vault Balance Verification Before Token Transfer
Before transferring tokens from the vault to the buyer, there is no check to confirm that the vault contains a sufficient token balance.
low Issues | 2 findings
Resolved
#1 low Issue
Case-Sensitive Payment Method String Comparison
The payment method is compared directly against the strings "SOL" and "USDC", making the contract vulnerable to input errors due to case sensitivity.
Resolved
#2 low Issue
Potential Arithmetic Overflow in Accumulated Amounts
The contract updates cumulative amounts (e.g., sol_collected, usdc_collected, usdc_raised) without using checked arithmetic. In extreme cases, this could lead to overflows.