Charmiy Info

Charmiy App aims to disrupt the social networking sector, boasting support for over 117 languages and planned availability across more than 175 countries and territories before widespread Martian adoption. Born from a 2022 napkin sketch, Charmiy is an innovative video-centric social platform meticulously designed and developed to address a critical need: assisting users in discovering more compatible connections through lifestyle preferences, video profiles, advanced AI, and an intuitive user experience

Charmiy Logo

Team and KYC Verification

The team has securely submitted their personal information to SolidProof.io for verification.

In the event of any fraudulent activities, this information will be promptly reported to the relevant authorities to ensure accountability and compliance.

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.

96.00
Poor Excellent

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

"Static Analysis Dynamic Analysis Symbolic Execution SWC Check Manual Review"
Contract address
N/A
Network N/A
License N/A
Compiler N/A
Type N/A
Language Rust / Solana
Onboard date 2025/04/21
Revision date 2025/04/21

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:

  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
  • The owner can mark the ICO as completed only once.

Note - This audit report consists of a security analysis of the locker contract. This analysis did not include functional testing (or unit testing) of the token’s logic. Furthermore, we only audited the mentioned contract associated with this project. Other contracts related to this project were not audited by our team. We recommend investors conduct their own research before engaging with the token.

Files and details

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Findings and Audit result

medium Issues | 3 findings

Resolved

#1 medium Issue
Missing Mint Account Validation in set_ico_completed Function.
lib.rs
L48-80
Description

The set_ico_completed function performs token burning without explicitly verifying that the mint account provided in the context matches the mint address stored in the contract's state. Unlike the claim_threshold function which includes the check require!(state.mint == ctx.accounts.mint.key(), CustomError::UnIdentifiedMint), this validation is absent in set_ico_completed. Without this check, if the account validation struct doesn't properly constrain the mint, it would be possible to burn tokens from an incorrect or unauthorized mint while still updating the contract state as if the correct tokens were burned, potentially leading to inconsistent state and security issues. To mitigate this issue, Add an explicit validation check at the beginning of the function to ensure the mint being used matches the one stored in state: require!(ctx.accounts.mint.key() == state.mint, CustomError::UnIdentifiedMint);. Alternatively, ensure that the SetICOCompleted struct includes proper constraints to validate that the provided mint account matches the one stored in the contract's state.

Resolved

#2 medium Issue
Insufficient Validation of User Token Account in claim_tokens Function
lib.rs
L141-192
Description

The claim_tokens function transfers tokens to a user's token account without proper validation of that account's properties. While the function verifies the backend signer, user wallet identity, and ICO completion status, it fails to validate that the user_token_account is associated with the correct mint and actually owned by the claiming user. This oversight could lead to tokens being transferred to incorrect accounts, failed transactions with unclear error messages, or potential security exploitations where tokens are sent to attacker-controlled accounts, all while marking the user's claim as processed in the contract state. To mitigate this, Implement explicit validation before performing the token transfer by adding checks to verify that the token account is associated with the correct mint (require!(ctx.accounts.user_token_account.mint == ctx.accounts.mint.key(), CustomError::InvalidTokenAccountMint)) and owned by the claiming user (require!(ctx.accounts.user_token_account.owner == ctx.accounts.initializer.key(), CustomError::InvalidTokenAccountOwner)). Alternatively, ensure these constraints are properly defined in the ClaimToken account validation struct using Anchor's constraint system.

Resolved

#3 medium Issue
Hardcoded Authority Public Keys with Invalid Placeholder Values.
lib.rs
L395
L396
Description

The contract uses hardcoded authority public keys for critical permissions (DEPLOYER_PUBKEY and BACKEND_PUBKEY), but these are currently set to invalid placeholder values ("<deployer_public_key>" and "<backend_public_key>") that fail base58 decoding. These keys control critical functions like contract initialization and user token claims. This approach creates a deployment blocker as the contract cannot compile with invalid keys, introduces centralization risks by relying on specific wallet addresses for authority, and makes testing across different environments challenging. To mitigate this, Replace the placeholder values with valid Solana public keys in base58 format. For better design, consider refactoring to allow these authority addresses to be set during initialization or through a governance mechanism, which would provide greater flexibility and reduce centralization risks. Additionally, document these central authority points clearly for stakeholders to understand the security model of the contract.

low Issues | 3 findings

Resolved

#1 low Issue
No Validation of Mint Address
lib.rs
L14-46
Description

The function accepts any Pubkey as the mint parameter without verifying it's a valid SPL token mint. There's no check to ensure this address actually points to a real token mint account, which could lead to the contract being initialized with an invalid or non-existent mint.

Resolved

#2 low Issue
Unchecked Total Threshold Amounts in Initialization Function
lib.rs
L14-46
Description

The initialize function validates individual threshold configurations for positive amounts, valid destinations, and sequential timing, but fails to verify that the sum of all threshold amounts doesn't exceed the maximum ICO amount (max_ico_amount). This oversight could lead to a situation where the contract promises more tokens through vesting schedules than what will actually be available after the ICO completes, potentially resulting in failed transfers in later stages when threshold claims exceed the remaining token balance. To mitigate this, Implement a validation check that sums all threshold amounts and verifies that the total doesn't exceed the max_ico_amount. This could be added to the initialization function after the individual threshold validations.

Resolved

#3 low Issue
Insufficient Validation of Destination Token Account
lib.rs
L82-139
Description

The claim_threshold function performs a token transfer to a destination token account without comprehensive validation of that account's properties. While the function verifies the account's owner through require!(ctx.accounts.destination_token_account.owner == ctx.accounts.destination.key()), it fails to validate that the token account is properly initialized and associated with the correct mint. This oversight could lead to transaction failures with unclear error messages when attempting to transfer tokens to improperly configured accounts, negatively impacting user experience and potentially introducing security risks in complex scenarios. To mitigate this, Implement additional validation checks before performing the token transfer, specifically verifying that the destination token account is associated with the correct mint: require!(ctx.accounts.destination_token_account.mint == ctx.accounts.mint.key(), CustomError::InvalidTokenAccountMint);. Alternatively, enhance the account constraints in the ClaimThreshold struct definition to include proper token account validation, ensuring all necessary properties are verified before the function executes.

informational Issues | 2 findings

Resolved

#1 informational Issue
Indiscriminate Import with use super::*;
lib.rs
L12
Description

The contract uses the wildcard import statement use super::*; which imports all items from the parent module indiscriminately. This practice pollutes the namespace, reduces code clarity, and makes it difficult to track dependencies. It can lead to subtle bugs when parent modules change, as well as name conflicts that might only emerge at runtime. To mitigate this, Replace the wildcard import with explicit, targeted imports that specify exactly which items are needed from the parent module (e.g., use super::{State, ThresholdConfig, CustomError};). This enhances code readability, maintainability, and makes dependencies clear and traceable, allowing for better refactoring and reducing the risk of namespace conflicts.

Resolved

#2 informational Issue
Lack of event emission
lib.rs
L14-46
L48-80
L82-139
L141-192
Description

The contract completely lacks event emission throughout all of its core functions, which is a significant oversight in modern smart contract design.