FTSO

Proposals

The beating heart of the Flare network.

Before we get into specifics around the FTSO, let's start by first taking a look at blockchain oracles in general, how they operate and what problem they are trying to solve.

Blockchains are isolated networks that are unable to natively access information from external systems. As the majority of use cases built around blockchain technology require access to real-world information, a solution is needed. This is where oracles come in.

Blockchain oracles are entities that can supply external information to the blockchain. They can come in many different shapes and sizes, with some being centralised than others, however they are all inherently designed to solve this same problem; the Oracle Problem.

​Flare's native oracle is called the Flare Time Series Oracle, or FTSO for short. It relies on a set of independent data providers, who gather data from external sources and submit to the blockchain what they deem to be an accurate representation of the requested data. Both Flare and Songbird networks currently supports up to 100 data providers, who compete for rewards from an inflation pool, by providing accurate information. Token holders can delegate vote power to data providers to receive a share of the available rewards.

Read on to learn more about how the FTSO operates.

Epochs
What is an epoch?

If you're new to Flare, you may have heard the term epoch used and be a little unsure what it means. An epoch simply refers to a period of time. In the context of the FTSO, an epoch is used to define two distinct time periods; price epoch and reward epoch.

Price epoch

​Every three minutes, data providers gather their interpretation of all required time-series data and submit it to the FTSO.​ Each of these three-minute windows is called a price epoch. They run continuously, 24/7/365, with each one given it's own unique and consecutive number.

Reward epoch

Price epochs are grouped together in what are referred to as a reward epoch. Each reward epoch lasts 3.5 days on Flare and 7 days on Songbird, consisting of 1,680 and 3,360 price epochs, respectively.

As with price epochs, reward epochs run continuously without pause; a new one starting immediately after the previous one has ended. 

”When the FTSO was initially designed, it supported only cryptocurrency price pairs. Now, it supports all types of data, however smart contract names and methods still refer to prices, as does some of the terminology used.”
Prices
Submissions

A data provider can submit data to the FTSO at any point during a price epoch, although to ensure their data is as current and accurate as possible, most will typically submit sometime within the final 30 seconds of the epoch.​

When submissions have been made, they are initially hidden from view, to avoid providers copying and submitting data sourced by another provider.

All submissions are then published on-chain within the following 90 seconds. The overarching process is called commit-and-reveal

Results

Each data provider carries a weight, based on its allocated vote power. For each piece of time-series submission, the FTSO system takes the data providers weight, along with the submitted price from all providers and determines a single price, using a weighted median calculation. 

​This finalised price is subsequently published and made available for use by on-chain applications (called dApps) for a period of five price epochs (15 minutes). 

"All data produced by the FTSO is publicly available on the Flare and Songbird networks."
Rewards
Inflation Pool

70% of the total network inflation is allocated to the FTSO rewards pool, which is shared between data providers and their delegators, whose submissions meet the reward criteria. 

Rewards can be distributed in the respective chains native token; $FLR / $SGB or it's wrapped equivalent.

Reward Criteria

Any submission that falls within a 50% range of the calculated median is considered to be accurate and eligible for rewards; however, each price epoch, only one price series is selected (at random) to be actually rewarded.

Therefore, rewards will only be earned if the data provider your votes are delegated to send accurate prices for the specific piece of data that is selected, regardless of how accurate the others were.

Influence

There are a number of factors that will determine the amount of rewards you earn.

This includes the performance of the data provider you delegated to, their system availability, what fee they charge and whether or not they are above the vote cap.

"A vote-power cap limits the influence of individual data providers to 2.5% of the total vote power on both Flare and Songbird. Any vote power above this cap is ignored."
Additional resources
Select category
Role

A data provider's role is to gather information from real-world sources and submit it to the FTSO.

​If the FTSO deems this information accurate, in relation to other submissions, then the provider is rewarded, along with any token holders who have delegated votes to them.

Data sourcing

Data providers can obtain the required data from any source they wish. With regards to crypto price data, typical sources would be exchanges, price aggregators and other oracles.​

It's important to have access to many different sources, as the data obtained may differ considerably.

Infrastructure

Building out reliable and resilient infrastructure is critical to the success of any data provider. 

​Often providers choose to run their infrastructure using a cloud based solution, such as AWS, or Google Cloud.​

A typical provider setup can include dedicated nodes, a price submitter tool, a database to organise and an application to process the data.

Algorithms

Once data has been gathered, it needs to be analysed and processed in some way before being submitted to the FTSO.​

The data needs to validated and checks made to ensure any 'bad' data is excluded. This can all be done automatically, based on pre-defined conditions.​

Each provider should create their own unique algorithms, that process the data in a way that ensures the final output represents what they themselves deem to be accurate.

Algorithms

Once data has been gathered, it needs to be analysed and processed in some way before being submitted to the FTSO.​

The data needs to validated and checks made to ensure any 'bad' data is excluded. This can all be done automatically, of course, based on pre-defined conditions.​

Each provider should create their own unique algorithms, that process the data in a way that ensures the final output represents what they themselves deem to be accurate.

Delegations

Accurate submissions lead to more rewards, which in turn should lead to a provider gaining more vote power.​

There is a cap on the maximum vote power any one provider can obtain, before the rewards their delegators receive are diluted.

​Some providers also offer other incentives to gain additional vote power. This includes building useful tools for the community and NFT giveaways, amongst other things. 

Service fees

Data providers charge a fee for the service they offer. It's how they are able to fund the operation of their service.

​The FTSO system gives a provider the freedom to set any fee they choose; however the higher the fee they charge, the less rewards their delegators will receive, which could drive them to delegate to a alternative provider.