Summary
100% of all REPORTED Findings have been addressed
- 0Acknowledged
- 0Risk Accepted
- 10Solved
- 10All Findings
- Critical1
- 1Solved
- High0
- Medium1
- 1Solved
- Low4
- 4Solved
- Informational4
- 4Solved
Introduction#
This report was commissioned by THORChain, a leading decentralized liquidity network, to assess the security and robustness of the CALC Manager, Scheduler, and Strategy smart contracts. The assessment was performed by Halborn’s experienced security team, focusing on the code released at commit 632c63b. The review covered all functionality in manager.wasm, scheduler.wasm, and strategy.wasm between the 11th August 11, 2025, and 20th August 20, 2025. The primary objective of this engagement’s core purpose was to identify vulnerabilities, ensure protocol reliabilityand strengthen overall security.
Assessment Summary#
Halborn’s team of seasoned specialists performed a comprehensive security assessment over a 8-day period. The key goals included discovering critical vulnerabilities, evaluating strategic robustness, and improving protocol defenses.
The overall security posture showed ambitious protocols with substantial complexity; several impactful issues were identified. Noteworthy fixes include resolution of a severe rebate-stealing vulnerability in the Scheduler contract, along with remediation of other high- and medium-priority issues—such as input validation weaknesses, logic errors in price comparison, and insufficient robustness against market manipulation. Operational and configurability enhancements were also successfully implemented.
All findings have been addressed and remediated by the Calc team.
Test Approach and Methodology#
A hybrid methodology was used, balancing deep manual review with targeted automated analysis. The work began with codebase familiarization, design verification, and threat modeling. Manual inspection dissected business logic, access control, storage management, and validator relationships. Automated static analysis scanned for low-level errors and overlooked vulnerabilities. Simulated execution and scenario testing further stressed edge cases and protocol invariants. The rigorous sequencing of methods ensures that coverage was exhaustive, with no reliance on checklist-based auditing. Continuous collaboration with the development team enabled rapid triage and remediation of critical findings.
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 |
|---|---|---|---|---|
| Public trigger enumeration enables rebate theft via overwrite | Critical | 10.0 | Solved08/13/2025 | |
| Duplicate denoms are double-counted leading to over-allocation | Medium | 5.0 | Solved08/18/2025 | |
| RUNE incorrectly treated as non-secured in Distribution deposits | Low | 2.5 | Solved08/18/2025 | |
| LinearScalar compares inverse price metrics | Low | 2.5 | Solved08/18/2025 | |
| LinearScalar ignores available balance (Thor) | Low | 2.5 | Solved08/18/2025 | |
| Top-of-book reliance enables cheap price spoofing to influence strategy decisions | Low | 2.1 | Solved08/21/2025 | |
| Missing guards in FIN pricing paths | Informational | 1.7 | Solved08/20/2025 | |
| Withdraw policy on partial fills may cause unnecessary churn or exposure gaps | Informational | 0.0 | Solved08/20/2025 | |
| Over-fetching FIN Book levels (limit=10) while using only top-of-book | Informational | 0.0 | Solved08/21/2025 | |
| Strategy Balances query reports only limit-order positions, omitting other contract funds | Informational | 0.0 | Solved08/23/2025 |
Findings & Tech Details#
Description
Proof of Concept
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
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.
