Q1 2025 Web3 Security ReportAccess control failures led to $1.63 billion in losses
Discover report insights
  • Hacken
  • Audits
  • redstone
  • [SCA] RedStone Finance / Solana Patch / May2025

RedStone

Audit name:

[SCA] RedStone Finance / Solana Patch / May2025

Date:

May 27, 2025

Table of Content

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

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the RedStone team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

RedStone is a decentralized oracle protocol that aggregates on-chain and off-chain data (such as asset price feeds) and delivers it on-chain with cryptographic proofs to ensure data integrity and authenticity to provide reliable, low-latency data for smart contracts and decentralized applications.

The scope of the audit is update of solana connector from revision 713b2df04ec81cb3d4ba7e1336b17ba2631a2cd4 to revision 2046ac07e94003e1f2bde5f21ad138115595dec6.

Document

NameSmart Contract Code Review and Security Analysis Report for RedStone
Audited ByBartosz Barwikowski
Approved ByBartosz Barwikowski
Websitehttps://redstone.finance/
Changelog27/05/2025 - Final Report
PlatformSolana
LanguageRust
TagsOracle
Methodologyhttps://hackenio.cc/sc_methodology

Review Scope

Repositoryhttps://github.com/redstone-finance/redstone-oracles-monorepo
Commit2046ac07e94003e1f2bde5f21ad138115595dec6

Audit Summary

0Total Findings
0Resolved
0Accepted
0Mitigated

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

System Overview

The provided patch introduces several modifications to the RedStone Solana Price Adapter. The key changes are:

  1. Enhanced **PriceData** Account: The on-chain PriceData structure in state.rs was augmented with new fields: write_slot_number (to record the slot of the update), decimals (to store the price's decimal exponent, defaulting to 8), and a _reserved byte array for future upgrades. The write_price instruction in write_price.rs was updated to populate these fields.

  2. Modified Update Interval for Non-Trusted Updaters: The min_interval_between_updates_ms configuration in config.rs was significantly increased from 40 seconds to 2 days. This primarily restricts the update frequency for non-trusted updaters, unless they provide a data package with a more recent timestamp than the existing on-chain data.

  3. Adjusted Time-Based Configurations & Trusted Updater: The max_timestamp_ahead_ms in config.rs was reduced from 3 minutes to 1 minute, tightening the validation for future-dated data packages. Additionally, one of the public keys in the TRUSTED_UPDATERS list was changed.

  4. Naming Convention Update: The program and package names in lib.rs and Cargo.toml were changed from price-adapter to redstone-solana-price-adapter for better clarity and consistency.

  5. RedStone SDK Dependency Update: The redstone Rust SDK dependency specified in Cargo.toml was updated from tag 2.0.0 to 2.0.1.

Findings

no findingsNo vulnerabilities were found

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.
  • 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.

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.

Disclaimer