The Hacken 2025 Yearly Security ReportCovers major Web3 breaches, their root causes, prevention insights, and key regulatory trends for 2026.
Learn more

Audit name:

[SCA] Yellow Network | Vault | Sept 2024

Date:

Sep 26, 2024

Table of Content

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

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the Openware (Yellow Network) team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Yellow Network is a decentralized Layer-3 peer-to-peer mesh network allowing brokers to communicate, trade, and aggregate the liquidity of connected nodes.

Document

NameSmart Contract Code Review and Security Analysis Report for Openware (Yellow Network)
Audited BySeher Saylik, Giovanni Franchi
Approved ByGrzegorz Trawinski
Websitehttps://www.yellow.org/
Changelog12/09/2024 - Preliminary Report
Changelog25/09/2024 - Final Report
PlatformEthereum, Polygon, Linea
LanguageSolidity
TagsVault, ERC20
Methodologyhttps://hackenio.cc/sc_methodology
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for Openware (Yellow Network)
    Audited By
    Seher Saylik, Giovanni Franchi
    Approved By
    Grzegorz Trawinski
    Changelog
    12/09/2024 - Preliminary Report
    Changelog
    25/09/2024 - Final Report
    Platform
    Ethereum, Polygon, Linea
    Language
    Solidity
    Tags
    Vault, ERC20

Review Scope

Repositoryhttps://github.com/layer-3/broker-contracts/tree/master
Commitfff15f5
Remediation commit9190fd8

Audit Summary

13Total Findings
11Resolved
1Accepted
1Mitigated

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

Documentation quality

  • Functional requirements are missed.

  • Technical description is not provided.

  • NatSpecs are insightful and complete.

Code quality

  • The code violates best practises in terms of data validation, readability and external interactions.

  • The code does not adhere to optimal standards regarding external dependencies handling and compilation directives.

  • The contracts present some gas inefficiency.

  • The development environment is configured.

Test coverage

Code coverage of the project is 91.67% (branch coverage).

  • Deployment and basic user interactions are covered with tests.

  • Negative cases coverage is covered.

  • Interactions by several users are not tested.

System Overview

Yellow Network is a vault design with the following contracts:

LiteVault  — a contract that allows users to deposit and withdraw ERC20 tokens or ETH, while maintaining user balances and requiring authorization for withdrawals. Authorization conditions, specified by an external authorization contract, must be met for withdrawals, and these conditions can be updated by the protocol owner at any time.

BrokerToken  — a utility token that is simple ERC20 token with permit functionality.

It has the following attributes:

  • Name: will be assigned during the deployment.

  • Symbol: will be assigned during the deployment.

  • Decimals: will be assigned during the deployment.

  • Total supply: will be assigned during the deployment.

TimeRangeAuthorizer — a contract that restricts actions based on a specified time range, allowing only those occurring outside the forbidden period. It validates the time range at initialization and implements the authorize() function to check if the current time is within or outside the forbidden range.

IAuthorize — Interface for an authorization contract that validates if certain actions are allowed.

IVault — interface for a vault contract that allows users to deposit, withdraw, and check balances of tokens and ETH.

Privileged roles

  • The owner of the LiteVault contract can set the authorizer address.

Potential Risks

The contract owner has the ability to set an invalid or malicious authorizer, potentially leading to scenarios where users' funds could become inaccessible, or the expected time-based restrictions can be altered at will. This introduces a centralization risk, as users may lose trust in the system if the authorizer is changed arbitrarily, resulting in disrupted functionality or locking of user funds.

The absence of a cap on the Broker token supply might expose users to inflation, dilution, and potential market instability, which can undermine the token's value and disrupt its ecosystem.

Findings

Code
Title
Status
Severity
F-2024-5999Use of transfer() Instead of call() to Send Native Tokens
fixed

Low
F-2024-6005Constructor Not Setting Authorizer and Missing Zero Address Check in setAuthorizer() Function
fixed

Low
F-2024-6004Lack of Token Whitelisting Check in deposit() Function
accepted

Low
F-2024-6002Potential Abuse by Owner in setAuthorizer() Function
fixed

Low
F-2024-6007Functions not Used Internally Can be Marked as External
fixed

Observation
F-2024-6001Missing Event Emitting
fixed

Observation
F-2024-6000Missing Zero Address Validation
fixed

Observation
F-2024-5997Floating Pragma
mitigated

Observation
F-2024-6016Variables Only Defined in the Constructor Should be Marked as Immutable
fixed

Observation
F-2024-6015Lack of Named Parameters in Mappings
fixed

Observation
1-10 of 13 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, do not affect security score but can affect code quality score.
  • 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, do not affect security score but can affect code quality score.

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/layer-3/broker-contracts/tree/master
Commitfff15f51b0e6c3963aeeb01b0f3ce661721c8c9b
Remediation commit9190fd813c33b33297906a96a41c14c9689852c6
Whitepaperhttps://docs.yellow.org/
RequirementsN/A
Technical RequirementsN/A

Contracts in Scope

src
BrokerToken.sol - src › BrokerToken.sol
vault
LiteVault.sol - src › vault › LiteVault.sol
TimeRangeAuthorizer.sol - src › vault › TimeRangeAuthorizer.sol
interfaces
IAuthorize.sol - src › interfaces › IAuthorize.sol
IVault.sol - src › interfaces › IVault.sol

Disclaimer