Part 3: What is the State Connector System?
The State Connector is a smart contract system running on Flare blockchain that can retrieve off-chain information on demand. It works like an on-demand oracle. It only answers yes/no questions which are objectively verifiable. It can retrieve the state of other blockchains and whether real-world transactions have happened or not. The State Connector provides Web3 attestations with Web2 scalability.
What are the key performance criterias of the State Connector?
- Open-membership – anyone is permitted to run a state-connector.
- Consistency – the recorded external state should be consistent between nodes on the Flare Network over time
- Independent verification – a state-connector should be able to independently verify an external state before it gets finalised on the Flare Network state. This means if a state-connector’s independent verification fails, then its proposed external system state will not be applied to its local Flare Network node.
- No reliance on economic incentives for safety –
Some examples of supported Attestation types:
- Payment (transaction)
- Chess Match (results)
- NFT transfer (transaction)
- Bloomberg (stock price)
- Balance decreasing (transaction)
- Block height (confirmation)
- Referenced payment (nonexistence)
What is the basic mechanism of how the State Connector system works?
User requests and Attestation Provider answers happen in a 3-phase protocol (RCR):
- Request: Users (dApps) send their requests to the State Connector and is forwarded to all Attestation Providers (APs)
- Commit: Attestation Providers fetch the information off-chain and send their hidden vote to the State Connector. The State Connector runs consensus on the replies and produces an agreed-upon answer.
- Reveal: Attestation Providers send the deobfuscation key
The State Connector branching protocol protects Flare against incorrect interpretation of real-world events such that there are never any rollbacks on the Flare blockchain state. If a Flare node’s locally-defined set of Attestation Providers disagrees with the vote made by the default set, then the Flare node will automatically create a backup (branch off) of the blockchain state at the last point that it had in common with the default set.
Digesting Data through the State Connector System
The Flare Network is designed to securely observe and interpret changes to the state of any integrated blockchain determined by governance for F-Assets. The first four blockchains to be integrated with the State Connector System are the XRP Ledger, Litecoin, Dogecoin, and Stellar and Algorand. There are a couple of issues in the industry regarding the digesting of state changes to other blockchain networks. Many blockchains either require one to trust third parties or conform to their standards in order to digest the data. However, the Flare Network does not require any trust except for to the validators of the integrated blockchains. Furthermore, validators on the underlying blockchains do not even need to know about the existence of the Flare Network. This allows the Flare Network to freely digest all state changes on the integrated blockchains in regards to the existence, validity, and ordering of transactions.
Design of the State Connector System
The threat model design of the State Connector System is crucial to maintaining the accurate digesting of integrated blockchain state changes. This design requires attackers to alter the view of integrated blockchains through their own Flare Network validator and a quorum of other Flare Network validators. Additionally, this attack would have to last longer than the number of block confirmations required by a Flare Network application to digest state changes. The threat model design is established by requiring all Flare Network validators to independently observe the state changes to all integrated blockchains.
The first stage in digesting state changes to integrated blockchains requires a defined count of the number of blocks that are globally accessible to all Flare Network validators. All validators from integrated blockchains are able to compete in this process by delivering data availability proof transactions to the Flare Network over time. This process of tracking state change availability occurs via a smart contract on the Ethereum Virtual Machine (EVM) level. The integrated blockchain validators can submit a valid claim availability proof in a competition to be first, but only allows them to do so again after the timeout period has ended since the last valid claim availability proof. Additionally, a fee to submit the availability proofs is required to prevent attacking and spamming. The timeout period, fee, and count of finalized blocks from the integrated blockchains can all be changed via governance.
Once a validator submits a valid claim availability proof, then this proof must be verified by validators on the Flare Network. The verification process is handled using an EVM state transition call function that operates before and after a state transition. On top of this, the Flare Network validators must continually check to see if the new state information is available through their integrated blockchain validators. Each Flare Network validators’ EVM state will not be transitioned until the correct hash is retrieved from their integrated blockchain validator. Therefore, no proof can force anyone to assume an inaccurate state as long as the integrated blockchain validator is not compromised. The first integrated blockchain validator to successfully and accurately submit a verified availability proof is then awarded for doing so. The State Connector System contract will also receive information regarding the successful verification of a data availability proof.
The next stage in digesting state changes requires the Flare Network validators to prove the transaction. This requires some criteria to be met in order to prove that the transaction is valid before recording it to the State Connector System contract storage. Once these criteria are met and that data is available, then the stored transactions in the storage contract are now available to be referenced by any other contract on the Flare Network.
Advantages of the State Connector System
Transaction validity references back to an underlying chain’s genesis block
Safety depends on an underlying chain’s validators
No cooperation needed from an underlying chain’s validators
Can read the state of any blockchains
No encoding of the current validators in control of an underlying chain to a smart contract on Flare
Every Flare validator independently verifies an underlying chain’s state
The State Connector System provides the Flare Network with flexibility to integrate other blockchains to the Flare Network. Data observed from these integrated blockchains is written into smart contracts on the Flare Network for use by any application on the network. This allows for the use of F-Assets throughout a multitude of applications.
Rewarding Integrated Blockchain Validators
A unique component of the Flare Network is its use of the validator ecosystems on its integrated blockchains. This means that control in the consensus of the Flare Network is proportionately doled out to the validators of all the integrated blockchains on the Flare Network, which are simply termed F-Assets. The proportions of control are weighted by market capitalization of each integrated blockchain. In short, the Flare Network is taking a unique approach to its consensus, which includes bootstrapping off the decentralization of previously formed blockchain networks. As the Flare Network integrations grow with other blockchains, so to can the robustness of the Flare Network’s own consensus protocol.
What are the incentives for becoming an Attestation provider?
Running nodes can be expensive to run on the State Connector system due to each AP needing to run a node on all the blockchains/attestation types. Attestation providers are compensated with Flare inflationary rewards.
The default sets of Attestation providers likely will be the top 20-30% of FTSO providers (AMA call)
Flare Foundation plans to give grants for private Attestation Providers (AMA call)