RedStone Quick Guide
  • Guide
    • 让我们一起更好了解RedStone
    • Selected materials for learning RedStone
    • How to earn RSG points in a correct way
    • Places to Check data & facts on RedStone
    • Let's try to know how to run a RedStone Node
    • Getting Started with RedStone X
    • Getting Started with Redstone Core
    • Getting Started with Redstone Classic
    • 2 quick ways to check your RSG points
    • 两种快速查询RSG积分的方法
    • RedStone再质押报告核心观点导读
  • Articles
    • Liquid Staking Unveiled: A Simple Guide:TL;DR for RedStone's LstFi report
    • TL;DR for RedStone's great 2023 Market Overview on Stablecoins
    • The Emergence of Real World Assets in DeFi
    • Introducing RedStone's New Tokenomics Model for Data Sharing
    • RedStone's other parts:aggregation & safety and others
    • The Pillars of RedStone's Data Ecosystem
    • RedStone - A Short intro to the New Era of Oracles for Modern DeFi
    • RedStone: Innovating DeFi Data Flow Through Modular Design
    • TL;DR for RedStone Miners Ambassador Program
    • An interesting short Case Study:RedStone Integrates with Venus Protocol
    • An interesting short Case Study-2:RedStone Integrates with Lido
    • An interesting short Case Study-3:RedStone Integrates with Fuel to Unlock New DeFi Capabilities
    • An interesting short Case Study-4:RedStone Integrates withFortifies Premia Blue
    • An interesting short Case Study-5:RedStone Integrates Angle
    • An interesting short Case Study-6:CIAN Transforms Automation with RedStone Oracles Integration
    • An interesting short Case Study 7:RedStone Oracles ✖️ Avalanche Evergreen & Spruce Testnet
    • An interesting short Case Study-8:RedStone Oracles & Vesta Finance's
    • An interesting short Case Study-9:RedStone Oracles X Voltz
    • An interesting short Case Study-10:RedStone Oracles X Mento
    • An interesting short Case Study-11:RedStone Oracles X Yield Yak
    • RedStone X StakeWise Case Study: A Simplified Overview
    • Why did Google report wrong pice-A simplified explanation for non-tech readers
    • RedStone X Ton: An interesting short Case Study-12
    • RedStone X Manta: An interesting Short Case Study 14
    • A quick case study for how Oracle Projects(RedStone) integrates with DeFi projects
    • TL:DR for RedStone's Restaking Reports
    • A tale of two RedStones-Coexist Confirmed
    • RedStone X zkLink:A quick case study
    • RedStone X Ether.fi: A case to explore
Powered by GitBook
On this page
  1. Articles

RedStone's other parts:aggregation & safety and others

PreviousIntroducing RedStone's New Tokenomics Model for Data SharingNextThe Pillars of RedStone's Data Ecosystem

Last updated 1 year ago

The RedStone oracle system utilizes an on-chain aggregation mechanism to enhance the security of data feeds. This on-chain aggregation requires that a minimum threshold of signatures from different authorized data providers must be passed before a data feed can be returned to a consumer contract.

The way it works is that the values from all of the authorized providers for a particular data feed are aggregated together before being returned to the consuming contract. Typically, a median value calculation is used to aggregate the values. By aggregating from multiple providers, even if a small subset of providers submit corrupt data, it will not significantly impact the aggregated value.

There are several key on-chain aggregation parameters configured in the RedStone consumer base contract:

  • getUniqueSignersThreshold function - This sets the minimum number of unique signer signatures required before a data feed can be returned.

  • getAuthorizedSignerIndex function - This whitelist contains the indexes of the authorized data providers.

  • aggregateValues function - Used to aggregate numeric 256-bit values. Computes the median of all values.

  • aggregateByteValues function - Used to aggregate dynamic byte arrays. Concatenates the byte arrays.

RedStone supports two data types that can be returned in the data feeds:

  • 256-bit Numeric Values - This is the default data type, used for numeric data.

  • Dynamic Byte Arrays - Used when binary data needs to be returned.

Some security considerations when using RedStone:

  • Do not override the getUniqueSignersThreshold unless certain the new value is secure.

  • Pay close attention to timestamp validation logic to avoid arbitrage attacks.

  • Enable secure upgradability for consumer contracts through multi-sig or DAO.

  • Monitor the data provider registry for changes and update authorizations.

(actually it seems that all could be well-handled IMAO so no worries really lol)

Recommendations when using RedStone:

  • Design contracts to minimize data feeds per transaction.

  • Use approximately 10 required unique signers for a good balance of security and efficiency.

  • Cache latest values in storage to avoid having to retrieve duplicate feeds.