How Flux brings off-chain data on-chain
Blockchain is a fantastic technology that enables us to bring transparency and disintermediate previously unthinkable processes without intermediaries. However, one big challenge remains when we rely on data that’s not on-chain.
A centralized solution to getting data such as prices or the tags for certain products (if you think about supply chain blockchain solutions) would be to rely on humans or sensors to input data. That’s not in the spirit of blockchain.
This is where oracles come in. Oracles bridge the gap between the off-chain world and the on-chain activities by bringing data into blockchain environments. One of the most prominent oracles in this space is Chainlink. However, that is running on Ethereum, and imagine having to pay gas fees for every data request you make.
A problem the team behind Flux protocol ran into as well. Flux is the brainchild of Peter Mitchell and Jasper de Gooijer. Both independently started working on blockchain projects, connected through Github, and eventually started building together.
When they first started working on a platform that’d bring data on-chain, they were using Ethereum. However, they quickly saw the high costs and security challenges associated with it and decided to switch to NEAR.
“Augur gets $1B in volume, and users burn $63,000,000 in gas fees. Flux gets $1B in volume, and users burn $10,000 in gas fees.” — Peter Mitchell, CEO of Flux.
So what exactly is Flux?
Flux is an innovative approach to solving the challenge of receiving data and ensuring its integrity. It consists of the flux Oracle, the FLX token, a flux DAO on each chain, and a requester registry. The registry is a community-curated list of all endpoints that can create data requests.
Whenever a dapp needs data, they will create a request. This is then resolved by the validators on the flux oracle. It can be done manually or via API. The flow of requests goes roughly like the below:
- creation: new request is started, and attached to it is a validity bond in the form of $FLX tokens
- resolution: validators stake FLX to vote on what the right outcome to the request is
- dispute: if someone disagrees with the outcome they can challenge it by triggering an escalation
- finalization: eventually, disputes are resolved, and outcomes finalized. The app receives its data, and everyone is happy.
So how does the system ensure that malicious actors can’t compromise the data?
After all, oracle attacks have been quite frequent attack vectors for DeFi protocols. Flux solves this using its native token and Staking. Every data requester has to attach some FLX token to their requests. Once submitted, validators stake FLX tokens for every data request on the correct outcome. In the end, the outcome with the highest staked amount of tokens is considered the right result.
While it doesn’t entirely rule out malicious attacks, it makes them a lot less probable, as any attacker would have to control a significant portion to attack; rendering an attack economically non-sensical.
Additionally, requesting a bond with every data request minimizes spam and therefore improves the user experience for all participants involved.
The flux DAO is made up of all token holders. It makes decisions over accepting, rejecting, and whitelisting applications for interfaces. It also has an influence on fee structures and protocol improvements.
The FLX token is a cross-chain utility token with the primary purpose of securing the networking and validating the on-chain data’s integrity.
Its supply is capped at $1 billion, and 5% of it is allocated for investment in projects using the Flux oracle service.
Overall, flux is a well-thought-through, reliable oracle platform with low fees, fast transaction times, and a host of integrations with other chains such as BNB chain and Ethereum L2s such as arbitrum and optimism.
As a user, you might have used a Dapp relying on flux data already; if you want to get involved more directly, you can get some FLX token or even set up a validator: