Introduction
We express our gratitude to the C8ntinuum team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Continuum is a multichain-powered protocol that thrives on the limitless possibilities created by connecting leading blockchain networks.
Document | |
---|---|
Name | Smart Contract Code Review and Security Analysis Report for C8ntinuum |
Audited By | Przemyslaw Swiatowiec, Kornel Światłowski |
Approved By | Ataberk Yavuzer |
Website | https://c8ntinuum.com→ |
Changelog | 26/03/2025 - Preliminary Report |
03/04/2025 - Final Report | |
Platform | Solana |
Language | Rust |
Tags | Raydium, Swaps, Signed Messages |
Methodology | https://hackenio.cc/sc_methodology→ |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for C8ntinuum
- Audited By
- Przemyslaw Swiatowiec, Kornel Światłowski
- Approved By
- Ataberk Yavuzer
- Website
- https://c8ntinuum.com→
- Changelog
- 26/03/2025 - Preliminary Report
- 03/04/2025 - Final Report
- Platform
- Solana
- Language
- Rust
- Tags
- Raydium, Swaps, Signed Messages
- Methodology
- https://hackenio.cc/sc_methodology→
Review Scope | |
---|---|
Repository | https://github.com/c8ntinuum/contracts-sol/→ |
Commit | 7ff01bf38219d3e40817d355855e99de2b2e7232 |
Remediation Commit | 0eaebaf00e2a206ee19e79680a7af68ed68a1fbb |
Review Scope
- Commit
- 7ff01bf38219d3e40817d355855e99de2b2e7232
- Remediation Commit
- 0eaebaf00e2a206ee19e79680a7af68ed68a1fbb
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
Documentation quality
Functional requirements are provided.
Technical description is provided.
Code quality
Several code quality issues were reported as issues in the previous chapter of this report.
Development environment is not configured.
Test coverage
End-to-end tests were provided. Tools are missing to calculate test coverage.
System Overview
The Solana-based smart contract within the Continuum Protocol is a core component of its multi-chain interoperability framework, enabling secure, efficient token generation, liquidity provisioning, and referral rewards. It relies on off-chain signed messages, on-chain token swaps, and admin-controlled configurations to manage user interactions.
Token Generation Process:
The backend (verifier) signs the transaction off-chain and the user submits it on-chain.
The program verifies the signature and processes the SOL transfer.
Liquidity is provided by swapping part of the SOL for c8nt tokens and then using the remaining WSOL and c8nt tokens as liquidity.
The remaining tokens are burned.
Referral Reward Distribution:
Main and second referral addresses receive a percentage of SOL.
If the second referral is empty, its portion is added to the main referral’s share.
Issue: Fails if the recipient is not rent-exempt; should use WSOL instead.
Funds Withdrawal:
Admin can withdraw accumulated SOL from the vault.
Blacklist Management:
Admin can add wallets to a blacklist to prevent participation.
Contract Pausing & Resuming:
Admin can pause/resume the contract.
Privileged roles
Admin
Contract Control: Can pause and resume the contract.
Fund Management: Can withdraw accumulated SOL from the vault.
Blacklist Management: Can add wallets to the blacklist, preventing participation.
Configuration Management: Can set referral percentages, liquidity allocation, and global token price.
Verifier
Signature Validation: Signs off-chain messages for token generation requests.
Potential Risks
Centralization risk in off-chain minting – The off-chain system responsible for minting tokens introduces a single point of failure and potential manipulation.
Verifier compromise risk – A compromised verifier key could result in unauthorized generation approvals, affecting protocol security.
Liquidity and availability risk in Raydium dependency – The protocol relies on Raydium for swaps, making it susceptible to liquidity shortages or platform outages.
Market manipulation risk in WSOL-USDT pricing – Using Raydium’s WSOL-USDT pool as the sole price source increases exposure to price manipulation.
Oracle accuracy risk – The protocol depends on its own SOL-USD oracle, which may produce incorrect prices, leading to unintended economic consequences.
Findings
Code ― | Title | Status | Severity | |
---|---|---|---|---|
F-2025-9438 | Incorrect Pool Deserialization Causing Program Failure | fixed | Critical | |
F-2025-9391 | Missing Nonce Allows Repeated Executions of the Same Signed Generation Request | accepted | Low | |
F-2025-9390 | WSOL Price Derived Solely from Raydium Pool May Be Manipulable | accepted | Low | |
F-2025-9279 | Missing State Check Before Toggling Pause Flag | fixed | Observation | |
F-2025-9278 | Use of msg! Instead of Anchor Events Impacts Performance | fixed | Observation | |
F-2025-9281 | Referral SOL Transfers May Fail if Recipients Are Not Rent-Exempt | mitigated | Observation | |
F-2025-9277 | No Mechanism to Remove Addresses from Blacklist | accepted | Observation | |
F-2025-9276 | Inefficient Blacklist Design | accepted | Observation |
Identify vulnerabilities in your smart contracts.
Appendix 1. Definitions
Severities
When auditing smart contracts, Hacken is using a risk-based approach that considers Likelihood, Impact, Exploitability and Complexity metrics to evaluate findings and score severities.
Reference on how risk scoring is done is available through the repository in our Github organization:
Severity | Description |
---|---|
Critical | Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation. |
High | High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation. |
Medium | Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category. |
Low | Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution. |
Severity
- Critical
Description
- Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.
Severity
- High
Description
- High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.
Severity
- Medium
Description
- Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.
Severity
- Low
Description
- Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution.
Potential Risks
The "Potential Risks" section identifies issues that are not direct security vulnerabilities but could still affect the project’s performance, reliability, or user trust. These risks arise from design choices, architectural decisions, or operational practices that, while not immediately exploitable, may lead to problems under certain conditions. Additionally, potential risks can impact the quality of the audit itself, as they may involve external factors or components beyond the scope of the audit, leading to incomplete assessments or oversight of key areas. This section aims to provide a broader perspective on factors that could affect the project's long-term security, functionality, and the comprehensiveness of the audit findings.
Appendix 2. Scope
The scope of the project includes the following smart contracts from the provided repository:
Scope Details | |
---|---|
Repository | https://github.com/c8ntinuum/contracts-sol/→ |
Commit | 7ff01bf38219d3e40817d355855e99de2b2e7232 |
Whitepaper | https://c8ntinuum.com/res/lightpaper.pdf→ |
Requirements | provided in separate document |
Technical Requirements | provided in separate document |
Scope Details
- Commit
- 7ff01bf38219d3e40817d355855e99de2b2e7232
- Requirements
- provided in separate document
- Technical Requirements
- provided in separate document
Assets in Scope
./constants.rs
./context.rs
./errors.rs
./instructions/add_to_black_list.rs
./instructions/generate.rs
./instructions/initialize.rs
./instructions/mod.rs
./instructions/pause.rs
./instructions/resume.rs
./instructions/set_admin.rs
./instructions/set_global_generation_price.rs
./instructions/set_percentages.rs
./instructions/set_verifier.rs
./instructions/withdraw.rs
./lib.rs
./state.rs
./utils.rs
Appendix 3. Additional Valuables
Additional Recommendations
The smart contracts in the scope of this audit could benefit from the introduction of automatic emergency actions for critical activities, such as unauthorized operations like ownership changes or proxy upgrades, as well as unexpected fund manipulations, including large withdrawals or minting events. Adding such mechanisms would enable the protocol to react automatically to unusual activity, ensuring that the contract remains secure and functions as intended.
To improve functionality, these emergency actions could be designed to trigger under specific conditions, such as:
Detecting changes to ownership or critical permissions.
Monitoring large or unexpected transactions and minting events.
Pausing operations when irregularities are identified.
These enhancements would provide an added layer of security, making the contract more robust and better equipped to handle unexpected situations while maintaining smooth operations.