ChainLinkGod Podcast - Exploring the Chainlink 2.0 Whitepaper With ChainLinkGod
Primer: ChainLinkGod takes listeners through the Chainlink 2.0 Whitepaper. He highlights and discusses the major points brought up in the whitepaper, weaving his personal insights into his sharing.
Introduction
Chainlink is a decentralized oracle network that connects smart contracts and blockchain networks to external data resources
Definition of an oracle expanded in the new Chainlink 2.0 Whitepaper. Oracles are not just used for data delivery but also for off-chain computation. Specifically, trust-minimized off-chain computation to create hybrid smart contracts
Hybrid smart contracts combine on-chain and off-chain infrastructure
Hybrid smart contracts are more advanced than generic smart contracts which are just on-chain code
Paper discusses decentralized oracle networks (DONs) which are fundamentally different from oracle networks like Chainlink
7 Foundational Goals Of Decentralized Oracle Networks (DONs)
Hybrid Smart Contracts
Abstracting away complexity
Scalability
Confidentiality
Order fairness for transactions
Trust minimization
Incentive-based cryptoeconomic security
Hybrid Smart Contracts
An application that consists of both on chain and off chain infrastructure.
Blockchain is used as immutable storage for definitive state transitions
Oracle is used for connectivity, privacy, scalability, and everything else that the blockchain doesn't do
Examples: Aave and Synthetix. On-chain code but relies on price data delivered by oracles
Whitepaper describes a compiler where developers could run their code through and it would automatically generate the code required to be deployed on-chain and off-chain
Achieves hybrid smart contracts and abstracting away complexity
Architectural Overview
DONs come to a consensus using a Byzantine fault tolerance consensus protocol
DONs have a ledger. It is not a standalone ledger, like a blockchain. It's a ledger that is specifically anchored to a main chain like Ethereum or any other smart contract blockchain
"They're [DONs] going to enhance the data feeds, the verifiable randomness, the keepers, all of the other services, all of the services that chainlink provides, DONs enhance it." - ChainLinkGod
It's more a layer 2 than its own standalone chain
DONs are flexible. Could be a predefined group of nodes or a permissionless protocol. It's up to whatever that works for the particular use case
Fundamental Components Of DONs
DONs have 3 fundamental components:
Networking (send and receive messages from any system)
Computation (DON nodes can initiate and automatically execute contracts)
Storage (can store data on a DON ledger or anywhere else)
DONs have their own ledger, so it can store data about the performance of each node
Could even have a DON of DONs to track the reputations of the nodes in each DON
Potential Use Cases
Whitepaper expands on the use cases
Proof of Reserves
Proof of Reserves for TUSD stable coin, PAXG gold-backed coin, and WBTC backed by actual bitcoin. DONs not only can prove that the collateral exists but could hold those assets as well
Can have a threshold signature of some kind where a majority of the nodes need to sign off a transaction. This increases security while providing Proof of Reserves
Enterprise Use
Providing enterprises with a blockchain abstraction layer
Will end up in a multichain world. DONs provide enterprises with a single interface to connect to any blockchain network
Decentralized Identity
Committee of DONs can run a protocol for decentralized identity
Can provide privacy-preserving KYC and credit score for an undercollateralized loan
Fair Sequencing Services
Miner Extractable Value: A blockchain miner can arbitrarily reorder, include, or exclude transactions in a block they create
With Fair Sequencing Services (FSS), DONs are able to order transactions on behalf of a smart contract and reduce MEV
Many ways to achieve FSS using DONs, each with their own strengths and weaknesses
DONs also relay transactions for users, lowering fees for users
Another unique way to use FSS is to prioritize oracle price feed updates as the 1st transaction in a block to prevent frontrunning oracle updates
Transaction Execution Framework
Involves syncing data from a DON to a main chain
Brings Ethereum's 15 TPS to hundreds or thousands of TPS depending on the syncing mechanism
Withdraws will not be instantaneous as it requires the DON to sync first
Considerations For Syncing Mechanisms
Data availability (whether the state is stored on-chain or off-chain)
Correctness assumptions (how is the state actually verified to be valid)
Latency (how long does it take to generally withdraw from a DON)
Methods Of Syncing
ZK Rollups - ideal scaling solution but takes a while to generate the proof
Validium - flavour of ZK Rollups, but transaction data stored off-chain
Optimistic Rollups - Uses fraud proofs and optimistically assumes any state transitions are correct
Threshold signing by DONs - Uses a threshold of nodes to sign what is the correct state
Trusted Execution Environments (TEEs) - Data availability is flexible (can be on-chain or off-chain) and hardware attestations are used to validate that the state is correct
Additional Points
TEEs do not have to be used alone; they could be used together with threshold signing
DONs are not competing with existing layer 2s, but provide a kind of cross-layer 2 solution
Trust Minimization
Impossible for a DON or any nodes to manipulate the data as tampering with the data results in the change of the cryptographic signature
Chainlink nodes not only deliver data, but cryptographically signs the transactions
Chainlink 2.0 Whitepaper introduces authenticated data origination, where data providers can sign their APIs and have their data forwarded by DONs
Also introduces the concept of functional signatures, where a signer can delegate signing capabilities to other entities
Failover clients: If one client fails, it falls back to the previous client (e.g. Off-chain reporting [OCR] client —> flux monitor feed). Reduces the amount of trust in a single client version
Circuit breakers to prevent a contract from ingesting data that could be potentially incorrect
Escape hatches: Under adverse circumstances, shutting down the DON and allowing users to withdraw their funds
Trust Minimized Governance
Evolutionary governance: non-mission critical performance upgrades
Emergency governance: decentralized multisig of entities fixing any vulnerabilities as and when they appear
Each DON network can have its own governance scheme
DON Deployment Considerations
Pre-built adapters and executables available for deploying DONs
Will roll out more adapters and executables as they are proven reliable and secure
Eventually, it will become entirely permissionless for people to deploy adapters and executables
Cryptoeconomics
Implicit staking: Exposure to the LINK token and future revenue
Chainlink 2.0 Whitepaper introduces implicit incentive framework to quantify security:
Extrapolating the amount of fees a node would earn and its opportunity cost
Performance history (uptime, accuracy, and latency)
DON participation (a node would be incentivized to be honest if it's in a highly reputable DON network that continues to earn income)
Speculative future fee opportunity (FFO): joining DONs in order to take advantage of new opportunities to run new jobs and join new DON networks
Explicit Staking is different from staking in Proof of Stake blockchains
An oracle network may use good cryptography but it does not matter if the external data they are signing is manipulated from outside
"So essentially, a blockchain is trying to ensure internal consistency, while an oracle network is trying to ensure external consistency." - ChainLinkGod
Chainlink's implementation of explicit staking focuses on two dynamics:
Resisting a powerful adversary who uses advanced bribing methods
To achieve a super-linear staking impact, where an adversary requires a budget that is quadratically larger than the sum of all the positive stake
Key Ideas
Each oracle report by a DON is an aggregation of data from all responding nodes
To achieve cryptoeconomic security, the staking mechanism uses a watchdog priority system
In each reporting round where a new oracle report is created, each node can act as a watchdog and raise an alert if it believes the report is incorrect.
Each node will also be randomly assigned a public priority number in each reporting round. If an alert is raised and the reported result is incorrect, the node with the highest priority will get their stake slashed
Oracle networks have two tiers. The first tier is the default oracle network that continuously produces reports. The second tier oracle network is a backup and will be used only when an alert is raised
Nodes in the second tier are economically incentivized to raise an alert because if they are the highest priority node, they will stand to win the slashed stake from a malicious node in the first tier
The watchdog priority results in the superlinear staking impact. For example, a DON of 100 nodes staking $20,000 in LINK. An attacker would require a budget of $100,000,000 to attack the network. Every addition of a node leads to a quadratic increase in cryptoeconomic security
Outcomes In Each Reporting Round
All nodes agree that the aggregated report is correct and each node is paid a fee for their service
Partial agreement where the majority of nodes are honest and no alerts are raised. For those nodes which are offline or disagreed, they will be slashed only modestly
An alert is raised and the alert was deemed correct by the second tier/first tier is wrong. The highest priority alerting watchdog receives the slashed stake from the malicious majority of tier 1 nodes
An alert is raised and the second tier agrees with the first tier. This means that the alert was incorrect and the nodes in the second tier will be slashed for creating a false alert
What If An Incorrect Report Goes Through?
Such a situation would be rare as it means that both the first and second tier allowed an incorrect report to go through
Solution for such cases would be misreporting insurance. Underwriters could provide collateral in a smart contract that pays out to users when an incorrect report is sent
Cost of insurance could be kept low as Chainlink generates a lot of data about its nodes and performance. Still profitable for underwriters to underwrite insurance
Conclusion
"The Chainlink network is not a static protocol, it's not going to stay the way it is today, four years into the future, it's going to evolve according to user needs, what users are actually going to need, and with price feeds, those exists because users needed price feeds. That's what created DeFi, you know, if the next Oracle Service is going to be something entirely different in a different model, then Chainlink can evolve to support that model." - ChainLinkGod
All information presented above is for educational purposes only and should not be taken as investment advice. Summaries are prepared by The Reading Ape. While reasonable efforts are made to provide accurate content, any errors in interpreting and summarizing the source material are ours alone. We disclaim any liability associated with the use of our content.