Solutions

Company

Resources

Blog

Contact

Login

    • Assurance

      Smart Contract Assessment

      Securing code integrity, protecting digital assets

      Blockchain Layer 1 Assessment

      Assessing protocols, securing blockchain foundations

      Code Security Audit

      Uncovering flaws, strengthening software integrity

      Web Application Penetration Testing

      Exposing weaknesses, fortifying digital defenses

      Cloud Infrastructure Penetration Testing

      Securing configurations, protecting critical environments

      Red Team Exercise

      Simulating real-world attacks, strengthening defenses

      AI Red Teaming

      Testing AI systems against real threats

      AI Security Assessment

      Securing AI models, data, and pipelines

    • Advisory

      AI Advisory

      Guiding secure, strategic AI adoption forward

      Risk Assessment

      From unknown threats to actionable insights

      Blockchain Architecture Assessment

      Optimizing architecture for tomorrow’s networks

      Compliance Readiness

      Stay ready as regulations evolve

      Custody and Key Management Assessment

      Securing the heart of digital custody

      Technical Due Diligence

      See the risks before you invest

      Technical Training

      Empower your teams to secure what matters

    • Who We Are

      The best security engineers in the world

      Careers

      Work with the elite

      Who Trusts Us

      The trusted security advisor for blockchain and financial services industries

      Brand

      Access official logos, fonts, and guidelines

      Service Commitments

      Committed to Protecting Your Data

    • Audits

      In-depth evaluations of smart contracts and blockchain infrastructures

      BVSS

      Blockchain Vulnerability Scoring System

      Disclosures

      All the latest vulnerabilities discovered by Halborn

      Case Studies

      How Halborn’s solutions have empowered clients to overcome security issues

      Reports

      Comprehensive reports and data

  • Blog

  • Contact

  • Login

THIS WEBSITE USES COOKIES

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services. You consent to our cookies if you continue to use our website. Learn More.

STAY CURRENT WITH HALBORN

Subscribe to the monthly Halborn Digest for our top blogs and videos, major company announcements, new whitepapers, webinar and event invites, and one exclusive interview.

ADVISORY SERVICES

AI AdvisoryRisk AssessmentBlockchain Architecture AssessmentCompliance ReadinessCustody and Key Management AssessmentTechnical Due DiligenceTechnical Training

ASSURANCE SERVICES

AI Security AssessmentAI Red TeamingSmart Contract AssessmentBlockchain Layer 1 AssessmentCode Security AuditWeb Application Penetration TestingCloud Infrastructure Penetration TestingRed Team Exercise

COMPANY

Who We AreWho Trusts UsService CommitmentsCareersBrandBlogContact

RESOURCES

AuditsDisclosuresReportsBVSSCase Studies
Halborn Logo
Privacy PolicyTerms of UseVulnerability Disclosure Policy

© Halborn 2025. All rights reserved.

Background

// Security Assessment

01.06.2025 - 01.10.2025

BTC Hardfork - Enhancement / Update

Coredao

Halborn logotext
← Back to Audits

BTC Hardfork - Enhancement / Update - Coredao


Prepared by:

Halborn Logo

HALBORN

Last Updated Unknown date

Date of Engagement: January 6th, 2025 - January 10th, 2025

Summary

100% of all REPORTED Findings have been addressed

All findings

9

Critical

0

High

1

Medium

0

Low

3

Informational

5


Table of Contents

  • 1. Introduction
  • 2. Assessment summary
  • 3. Scope
  • 4. Findings overview

1. Introduction

CoreDAO engaged Halborn to conduct a comprehensive security assessment of their smart contracts from January 6th to January 10th, 2025, focusing on modifications to the codebase between the commit 551393b and the commit c439750. The review specifically targets changes introduced during these commits, assuming the validity of the pre-existing logic and excluding verification of its security, e.g., input validation of previously existing parameters.


The scope of the security assessment was confined to the smart contracts provided to Halborn, with specific commit hashes and additional details available in the Scope section of this report.

2. Assessment Summary

The team at Halborn assigned a full-time security engineer to assess the security of the smart contracts. The security engineer is a blockchain and smart-contract security expert with advanced penetration testing, smart-contract hacking, and deep knowledge of multiple blockchain protocols.

The purpose of this assessment is to:

    • Ensure that smart contract functions operate as intended.

    • Identify potential security issues with the smart contracts.


In summary, Halborn identified some improvements to reduce the likelihood and impact of risks, which were partially addressed by the CoreDAO team. The main ones were the following: 

    • Adjust the remain value when receiving rewards only after confirming that a transfer was successful.

    • Ensure that rewardMap entries are deleted whenever 'rewardUnclaimed' is non-zero, even if 'reward' and 'accStakedAmount' are zero.

    • Allow partial allocations in the receiveRewards function when 'remain' is less than 'toWhiteListValue'.

    • Integrate viewCollectReward function into BitcoinAgent contract if intended for use or remove it to improve code clarity and maintainability.

3. SCOPE

REPOSITORY
(a) Repository: core-genesis-contract
(b) Assessed Commit ID: c439750
(c) Items in scope:
  • contracts/BitcoinAgent.sol
  • contracts/BitcoinLSTStake.sol
  • contracts/BitcoinStake.sol
  • contracts/BtcLightClient.sol
  • contracts/Burn.sol
  • contracts/CandidateHub.sol
  • contracts/CoreAgent.sol
  • contracts/GovHub.sol
  • contracts/HashPowerAgent.sol
  • contracts/PledgeAgent.sol
  • contracts/StakeHub.sol
  • contracts/System.sol
  • contracts/SystemReward.sol
  • contracts/BitcoinAgent.sol
  • contracts/BitcoinLSTStake.sol
  • contracts/BitcoinStake.sol
↓ Expand ↓
Out-of-Scope: The review specifically targets changes introduced during the commit 551393b and the commit c439750, assuming the validity of the pre-existing logic and excluding verification of its security, e.g., input validation of previously existing parameters.
Out-of-Scope: New features/implementations after the remediation commit IDs.

4. Findings Overview

Security analysisRisk levelRemediation
Unaccounted funds in rewards distribution logicHighSolved - 01/13/2025
Incomplete reward map cleanupLowRisk Accepted - 02/26/2025
Skipping rewards allocation in fund distributionLowRisk Accepted - 01/13/2025
Unreachable function due to access restrictionLowRisk Accepted - 02/25/2025
Incomplete input validation in parameter updatesInformationalSolved - 01/13/2025
Potential inconsistent delegator data handlingInformationalSolved - 01/13/2025
Suboptimal gas usage due to post-increment in loopsInformationalAcknowledged - 01/13/2025
Unused and uncleared storage mappingInformationalAcknowledged - 01/13/2025
Duplicate functionsInformationalSolved - 01/13/2025

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.

Table of Contents

  • 1. Introduction
  • 2. Assessment summary
  • 3. Scope
  • 4. Findings overview

// Download the full report

BTC Hardfork - Enhancement / Update

* Use Google Chrome for best results

** Check "Background Graphics" in the print settings if needed