2024 Web3 Security ReportAccess control exploits account for nearly 80% of crypto hacks in 2024.
Discover report insights

Audit name:

[SCA] Sociogram / Curve-Launchpad / Jan2025

Date:

Feb 17, 2025

Table of Content

Introduction
Audit Summary
System Overview
Potential Risks
Findings
Appendix 1. Definitions
Appendix 2. Scope
Appendix 3. Additional Valuables
Disclaimer

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the Sociogram team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Sociogram is a token launch protocol on Solana that implements a bonding curve mechanism for predictable token distribution and price discovery. It provides a fully automated market maker (AMM) with virtual reserves for price calculation and real reserves for actual assets, allowing projects to launch tokens with guaranteed liquidity and controlled price movement. The protocol features a complete token lifecycle management system, from initial token creation and distribution through a bonding curve to final withdrawal phase when all tokens are sold.

Document

NameSmart Contract Code Review and Security Analysis Report for Sociogram
Audited ByJakub Heba
Approved ByGrzegorz Trawiński
Websitehttps://sociogram.org/
Changelog21/01/2025 - Preliminary Report
17/02/2025 - Final Report
PlatformSolana
LanguageRust
TagsAMM, Curve
Methodologyhttps://hackenio.cc/sc_methodology
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for Sociogram
    Audited By
    Jakub Heba
    Approved By
    Grzegorz Trawiński
    Changelog
    21/01/2025 - Preliminary Report
    17/02/2025 - Final Report
    Platform
    Solana
    Language
    Rust
    Tags
    AMM, Curve

Review Scope

Repositoryhttps://github.com/biswap-org/curve-launchpad
Commit05f59a60823a6b60ce706ee9dffd94e2837ca1a2

Audit Summary

5Total Findings
4Resolved
1Accepted
0Mitigated

The system users should acknowledge all the risks summed up in the risks section of the report

Documentation quality

  • Functional requirements are partially missed.

  • Technical description is not provided.

Code quality

  • Several template code patterns were found.

  • The development environment is configured.

Test coverage

Code coverage of the project is N/A.

The Score is N/A since there is no reliable tool to calculate Solana test coverage

  • Deployment and basic user interactions are covered with tests.

  • Negative cases coverage is missed.

  • Some of the tests were not working properly without adjustments.

  • More advanced buy/sell cases are not tested thoroughly.

System Overview

Sociogram is a bonding curve protocol on Solana that enables token launches through an automated market maker mechanism. The protocol consists of two core components:

  • Bonding curve - manages token distribution through a customizable bonding curve mechanism, handling buy and sell operations with separate virtual and real reserve tracking for predictable price discovery.

  • Global state - contains protocol configuration including fee parameters, reserve settings, and privileged addresses. It manages the overall protocol state and controls access to administrative functions.

Privileged roles

  • The authority can modify protocol parameters including:

    • Fee recipient and fee basis points

    • Initial virtual and real token reserves

    • Withdraw authority address

  • The withdraw authority has permission to withdraw remaining tokens and SOL from the bonding curve, but only after all tokens are sold and the curve reaches completion state. This role cannot interfere with active trading operations.

Potential Risks

Absence of time-lock mechanisms for critical operations - Without time-locks on critical operations, there is no buffer to review or revert potentially harmful actions, increasing the risk of rapid exploitation and irreversible changes.

Insufficient multi-signature controls for critical functions - The lack of multi-signature requirements for key operations centralizes decision-making power, increasing vulnerability to single points of failure or malicious insider actions, potentially leading to unauthorized transactions or configuration changes.

Single entity upgrade authority - The token ecosystem grants a single entity the authority to implement upgrades or changes. This centralization of power risks unilateral decisions that may not align with the community or stakeholders' interests, undermining trust and security, for example changing the fee to the enormous high value.

Findings

Code
Title
Status
Severity
F-2025-8332Lack of validation for set_fee edge values
fixed

Low
F-2025-8331Missing functionality to pause program operations
fixed

Low
F-2025-8330Lack of functionality for admin rotation
accepted

Low
F-2025-8334The MinSOLOutputExceeded error name is misleading
fixed

Observation
F-2025-8333Typo in the buy function
fixed

Observation
1-5 of 5 findings

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

Repositoryhttps://github.com/biswap-org/curve-launchpad
Commit05f59a60823a6b60ce706ee9dffd94e2837ca1a2
Whitepaperhttps://docs.biswap.org/biswap/core-products/biswap-v3/v3-whitepaper
Requirements-
Technical Requirements-

Assets in Scope

programs
curve-launchpad
src
amm
amm.rs - programs/curve-launchpad/src/amm/amm.rs
mod.rs - programs/curve-launchpad/src/amm/mod.rs
instructions
buy.rs - programs/curve-launchpad/src/instructions/buy.rs
constants.rs - programs/curve-launchpad/src/instructions/constants.rs
create.rs - programs/curve-launchpad/src/instructions/create.rs
errors.rs - programs/curve-launchpad/src/instructions/errors.rs
events.rs - programs/curve-launchpad/src/instructions/events.rs
initialize.rs - programs/curve-launchpad/src/instructions/initialize.rs
mod.rs - programs/curve-launchpad/src/instructions/mod.rs
sell.rs - programs/curve-launchpad/src/instructions/sell.rs
set_fee.rs - programs/curve-launchpad/src/instructions/set_fee.rs
instructions
set_params.rs - programs/curve-launchpad/instructions/set_params.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.

Disclaimer