Halborn Logo

Cables RFQ - Shift Markets


Prepared by:

Halborn Logo

HALBORN

Last Updated 07/01/2024

Date of Engagement by: June 10th, 2024 - June 13th, 2024

Summary

100% of all REPORTED Findings have been addressed

All findings

10

Critical

0

High

0

Medium

1

Low

2

Informational

7


1. Introduction

The Shift Markets team engaged Halborn to conduct a security assessment on their smart contracts beginning on 06-10-2024 and ending on 06-13-2024. The security assessment was scoped to the smart contracts provided in the https://github.com/ShiftForex/cables_evm_rfq_contracts GitHub repository. Commit hashes and further details can be found in the Scope section of this report. The Cables RFQ codebase in scope mainly consists of a smart contract to support a hybrid RFQ trading system to allow users to settle market trades on Cables Finance in a single transaction.

2. Assessment Summary

Halborn was provided 4 days for the engagement and assigned 1 full-time security engineer to review the security of the smart contracts in scope. The engineer is a blockchain and smart contract security expert with advanced penetration testing and smart contract hacking skills, and deep knowledge of multiple blockchain protocols.

The purpose of the assessment is to:

    • Identify potential security issues within the smart contracts.

    • Ensure that smart contract functionality operates as intended.

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

    • Loss of funds due to missing verification for recipient.

    • Potential one-sided zero value swaps.

    • Centralization risks due to privileged access from swap signer.

3. SCOPE

Files and Repository
(a) Repository: cables_evm_rfq_contracts
(b) Assessed Commit ID: 91a1fa6
(c) Items in scope:
  • contracts/CablesRFQ.sol
Out-of-Scope:
Remediation Commit ID:
Out-of-Scope: New features/implementations after the remediation commit IDs.

4. Findings Overview

Security analysisRisk levelRemediation
Potential one-sided zero value swapsMediumSolved - 06/18/2024
Centralization risks due to privileged access from swapSignerLowRisk Accepted
Loss of funds due to missing verification for recipientLowSolved - 06/18/2024
Swap functions missing nonreentrant modifierInformationalSolved - 06/18/2024
Non-reentrant modifier orderingInformationalSolved - 06/18/2024
Commented codeInformationalSolved - 06/18/2024
Irrelevant variableInformationalSolved - 06/21/2024
Dispensable gas fees from use of revert strings over custom errorsInformationalSolved - 06/18/2024
Unused imports and import practicesInformationalSolved - 06/18/2024
Risk of EVM version incompatibility across chainsInformationalSolved - 06/28/2024

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.

// Download the full report

* Use Google Chrome for best results

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

© Halborn 2024. All rights reserved.