Summary
95% of all REPORTED Findings have been addressed
- 1Not Solved
- 1Partially Solved
- 11Acknowledged
- 1Risk Accepted
- 6Solved
- 20All Findings
- Critical0
- High2
- 2Solved
- Medium0
- Low5
- 1Risk A.
- 2Solved
- 1P. Solved
- 1Not Solved
- Informational13
- 11Ack.
- 2Solved
Introduction#
Casper Association engaged Halborn to conduct a security assessment of the DAO contracts, beginning on July 4th, 2025 and ending on August 8th, 2025. This security assessment was scoped to the smart contracts in the csprfun-core contracts GitHub repository.
The engagement involved a detailed, line-by-line security review of all smart contracts within the Friendly Casper Token Minter ecosystem. This included analysis of the contract code, entry point implementations, bonding curve mechanics, DEX integration, and related administrative controls.
Assessment Summary#
Halborn's team of blockchain security specialists conducted a rigorous smart contract audit on the Friendly Casper Token Minter ecosystem. The review involved a cross-functional team of experts working over a 4 week period to uncover deeply embedded logic flaws, economic design risks, and practical implementation bugs. The primary goal was to stress-test the security posture for token issuance and trading.
The overall architecture demonstrates robust on-chain controls and correct use of Casper primitives. Most critical business logic passed all functional test cases, supporting safe minting, trading, and graduation to DEX liquidity.
However, the audit identified important areas for improvement, which have been partially addressed:
Insufficient input validation. Some functions accept parameters (like tax or fee rates) that can break economic incentives or degrade product safety.Unexposed getter/setter functions and excessive token approvals—potentially reducing transparency and exposing contracts to privilege escalation or attack in edge cases.Lack of event emissions, inconsistent error handling, and documentation gaps—reducing upgrade transparency and maintainability.Numerous minor code hygiene issues: debug code, commented/dead code, naming mismatches.
Test Approach and Methodology#
Halborn employs a combined approach of manual code review and automated security testing to ensure a balanced assessment of efficiency, thoroughness, and practicality within the scope of the smart contract review. Manual testing is essential for uncovering logical flaws, process weaknesses, and implementation issues, while automated techniques expand coverage and rapidly identify security best practice violations. The following phases and tools were utilized throughout the assessment:
Research into the architecture, purpose, and usage of the platform.
Manual code review and walkthrough.
Manual assessment of critical Rust variables and functions to evaluate their use and safety, focusing on identifying potential arithmeticrelated vulnerabilities.
Verification of cross-contract call controls.
Review of architecture-related logical controls.
Scanning Rust files for vulnerabilities using
cargo audit)Analysis and review of unit tests and integration tests.
Deployment to testnet via
casper-client.
Risk Methodology#
4.1 EXPLOITABILITY
Attack Origin (AO):
Attack Cost (AC):
Attack Complexity (AX):
Metrics:
| EXPLOITABILITY METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Attack Origin (AO) | Arbitrary (AO:A) | 1 |
| Specific (AO:S) | 0.2 | |
| Attack Cost (AC) | Low (AC:L) | 1 |
| Medium (AC:M) | 0.67 | |
| High (AC:H) | 0.33 | |
| Attack Complexity (AX) | Low (AX:L) | 1 |
| Medium (AX:M) | 0.67 | |
| High (AX:H) | 0.33 |
4.2 IMPACT
Confidentiality (C):
Integrity (I):
Availability (A):
Deposit (D):
Yield (Y):
Metrics:
| IMPACT METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Confidentiality (C) | None (C:N) | 0 |
| Low (C:L) | 0.25 | |
| Medium (C:M) | 0.5 | |
| High (C:H) | 0.75 | |
| Critical (C:C) | 1 | |
| Integrity (I) | None (I:N) | 0 |
| Low (I:L) | 0.25 | |
| Medium (I:M) | 0.5 | |
| High (I:H) | 0.75 | |
| Critical (I:C) | 1 | |
| Availability (A) | None (A:N) | 0 |
| Low (A:L) | 0.25 | |
| Medium (A:M) | 0.5 | |
| High (A:H) | 0.75 | |
| Critical (A:C) | 1 | |
| Deposit (D) | None (D:N) | 0 |
| Low (D:L) | 0.25 | |
| Medium (D:M) | 0.5 | |
| High (D:H) | 0.75 | |
| Critical (D:C) | 1 | |
| Yield (Y) | None (Y:N) | 0 |
| Low (Y:L) | 0.25 | |
| Medium (Y:M) | 0.5 | |
| High (Y:H) | 0.75 | |
| Critical (Y:C) | 1 |
4.3 SEVERITY COEFFICIENT
Reversibility (R):
Scope (S):
Metrics:
| SEVERITY COEFFICIENT () | COEFFICIENT VALUE | NUMERICAL VALUE |
|---|---|---|
| Reversibility () | None (R:N) | 1 |
| Partial (R:P) | 0.5 | |
| Full (R:F) | 0.25 | |
| Scope () | Changed (S:C) | 1.25 |
| Unchanged (S:U) | 1 |
| Critical | High | Medium | Low | Informational |
| 9 - 10 | 7 - 8.9 | 4.5 - 6.9 | 2 - 4.4 | 0 - 1.9 |
Scope#
Assessment Summary & Findings Overview#
# | Title | Severity | Score | Status |
|---|---|---|---|---|
| Missing Contract Address Update Functions Break Protocol When External Contracts Upgrade | High | 8.8 | Solved07/16/2025 | |
| Incorrect Tax Calculation in Bonding Curve Leads to Reduced Output Amount, Protocol Fee Loss and Reserve Imbalances | High | 8.4 | Solved07/16/2025 | |
| Malicious Tax Configuration Enables DEX Pool Drainage and Blocks WCSPR Returns | Low | 4.1 | Risk Accepted07/16/2025 | |
| Missing Getter Functions Lead to Blind Trading | Low | 3.8 | Solved07/16/2025 | |
| Excessive Token Approvals in DEX Liquidity Addition | Low | 3.3 | Partially Solved07/16/2025 | |
| Missing Getter Function for Token Metadata | Low | 2.5 | Solved07/16/2025 | |
| Missing Upper Limit Validation for Protocol Fee Configuration | Low | 2.4 | Not Solved | |
| Missing Zero Amount Validation in Trade Function | Informational | 1.7 | Acknowledged | |
| Lacking Event Emissions for Critical Parameter Changes | Informational | 1.7 | Acknowledged | |
| Missing Input Validation For Graduation Parameters | Informational | 0.3 | Acknowledged | |
| Mismatch Between EntryPoint Type Signatures and Their Implementations | Informational | 0.0 | Solved07/17/2025 | |
| Unused Contract Installation Function | Informational | 0.0 | Acknowledged | |
| Unnecessary Runtime Arguments in CEP18 Initialization | Informational | 0.0 | Acknowledged | |
| Unnecessary Type Conversion in Return Statement | Informational | 0.0 | Acknowledged | |
| Unnecessary Wrapper Function Adds Code Bloat | Informational | 0.0 | Acknowledged | |
| Commented Out Code and Dead Code Indicates Code Quality Issues | Informational | 0.0 | Acknowledged | |
| Documentation Inconsistencies | Informational | 0.0 | Acknowledged | |
| Inconsistent Error Handling Patterns | Informational | 0.0 | Acknowledged | |
| Debug Code Present in Production | Informational | 0.0 | Solved07/16/2025 | |
| Inconsistent Naming Conventions For Fee and Tax Parameters | Informational | 0.0 | Acknowledged |
Findings & Tech Details#
Description
Proof of Concept
Recommendation
Description
Proof of Concept
Recommendation
Description
Proof of Concept
Recommendation
Remediation Comment
Description
Proof of Concept
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Description
Recommendation
Remediation Comment
Disclaimer#
Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.
