Optimism 백서

Optimism

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 12쪽

H locked at $3,000 on Day N: * Net TVL Flows = −10,000 ETH × $3,000 = $30 million in net outflows * Naive TVL change would suggest growth: $200 million → $270 million ## Network Usage & Infrastructure **Metric:** Gas Used per Second (gas/s) **Definition:** "Gas refers to the unit that measures the amount of computational effort required to execute specific operations on Ethereum" (ethereum.org). Gas Used is tracked as an average rate per second for simplicity. **Why it Matters:** Gas, sometimes referred to as blockspace, is the limited resource that blockchains provide. Gas used shows how much of that resource is actually being consumed. **Caution:** Gas is only comparable across chains that use Ethereum-equivalent gas units. ### User Experience (UX) **Metric:** Median Transaction Fee (USD) **Definition:** The median gas fee paid to submit a transaction, expressed in USD for simplicity and easier comparison across ecosystems. **Calculation:** Median of all transaction fees over a period of time, marked at the USD price at the time of the transaction. **Why it Matters:** This metric serves as a proxy for the cost to transact. Lower median fees enable broader usage by reducing friction, lowering breakeven costs, and unlocking use cases that would otherwise be cost-prohibitive. ## Market Share **Definition:** The OP Stack ecosystem's share of a broader market segment for any measure (e.g., L2s, total crypto). **Calculation:** OP Stack Metric Value / Total Market Metric Value **Why it Matters:** Market share helps isolate whether growth is driven by the OP Stack ecosystem itself, or is simply part of a broader market trend. A rising share signals outperformance, while a declining share suggests that other ecosystems are growing faster. # Oracles Source: https://docs.optimism.io/app-developers/tools-sdks/data/oracles Learn about different oracles and how you can use them to access offchain data onchain as well as random number generation. <Info> This page includes providers that meet specific [inclusion criteria](#inclusion-criteria), as outlined below. Please visit the [community oracles page](https://github.com/ethereum-optimism/developers/blob/main/community/tools/oracles.md) for an additional listing of third-party Oracles. </Info> This reference guide lists different Oracles you can use when building on Optimism. [Oracles](https://ethereum.org/en/developers/docs/oracles/) provide offchain data onchain. This allows code running on a blockchain to access a wide variety of information. For example, a [stablecoin](https://ethereum.org/en/stablecoins/) that accepts ETH as collateral needs to know the ETH/USD exchange rate: * How many stablecoins can we give a user for a given amount of ETH? * Do we need to liquidate any deposits because they are under collateralized? ## Security and decentralization Different oracles have different security assumptions and different levels of decentralization. Usually they are either run by the organization that produces the information, or have a mechanism to reward entities that provide accurate information and penalize those that provide incorrect information. ## Types of oracles There are two types of oracles: 1. **Push oracles** are updated continuously and always have up to date information available onchain. 2. **Pull oracles** are only updated when information is requested by a contract. Pull oracles are themselves divided into two types: 1. Double-transaction oracles, which require two transactions. The first transaction is the request for information, which usually causes the oracle to emit an event that triggers some offchain mechanism to provide the answer (through its own transaction). The second transaction actually reads onchain the result from the oracle and uses it. 2. Single-transaction oracles, which only require one transaction. The way this works is that the transaction that requests the information includes a callback (address and the call data to provide it). When the oracle is updated (which also happens through a transaction, but one that is not sent by the user), the oracle uses the callback to inform a contract of the result. ## Random number generation (RNG) Random number generation in blockchain applications ensures that smart contracts can access unbiased random values. This is essential for certain use cases like generative NFTs, gaming, commit & reveal schemes and more. Various approaches include using a trusted third party, blockhash-based methods, Verifiable Random Functions (VRF), quantum random numbers to name a few. Each method has trade-offs between simplicity, security, and trust assumptions, allowing developers to select the most suitable option for their use case. ## List of oracles ### Gas oracle OP Mainnet provides a [Gas Price Oracle](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/GasPriceOracle.sol) that provides information about [gas prices and related parameters](/op-stack/transactions/fees). It can also calculate the total cost of a transaction for you before you send it. This contract is a predeploy at address `0x420000000000000000000000000000000000000F`: * [On OP Mainnet](https://explorer.optimism.io/address/0x420000000000000000000000000000000000000F#readContract) * [On OP Sepolia](https://testnet-explorer.optimism.io/address/0x420000000000000000000000000000000000000F) This is a push Oracle. OP Mainnet (and the testnets) updates the gas price parameters onchain whenever those parameters change. The L1 gas price, which can be volatile, is only pushed once every 5 minutes, and each time can change only by up to 20%. * [Blocknative](https://docs.blocknative.com/gas-prediction) provides real-time gas estimation powered by predictive modeling to forecast gas price distribution for select OP Stack chains, including OP Mainnet and Base. The [API](https://docs.blocknative.com/gas-prediction) is also available on Ethereum Mainnet to estimate base fee costs. ### API3 The [API3 Market](https://market.api3.org/optimism) provides access to 200+ price feeds on [Optimism Mainnet](https://market.api3.org/optimism) and [Testnet](https://market.api3.org/optimism-sepolia-testnet). The price feeds operate as a native push oracle and can be activated instantly via the Market UI. The price feeds are delivered by an aggregate of [first-party oracles](https://docs.api3.org/oev-searchers/glossary.html#first-party-oracles) using signed data and support [OEV recapture](https://docs.api3.org/dapps/integration/security-considerations.html#oracle-extractable-value-oev). Unlike traditional data feeds, reading [API3 price feeds](https://docs.api3.org/oev-searchers/in-depth/#dapps-catalog) enables dApps to auction off the right to update the price feeds to searcher bots which facilitates more efficient liquidation processes for users and LPs of DeFi money markets. The OEV recaptured is returned to the dApp. API3's QRNG provides dApps with truly random numbers based on quantum mechanics at no charge. More details are available on the [API3 website](https://api3.org/). ### Chainlink [Chainlink](https://chain.link/) is the industry-standard decentralized computing platform powering the verifiable web. Chainlink powers verifiable applications and high-integrity markets for banking, DeFi, global trade, gaming, and other major sectors. Chainlink provides a number of [price feeds](https://docs.chain.link/docs/optimism-price-feeds/). Those feeds are available on the production network @ [OP Mainnet](https://docs.chain.link/data-feeds/price-feeds/addresses?network=optimism\&page=1#optimism-mainnet). * Data Feeds: Chainlink Data Feeds provide a secure, reliable, and decentralized source of off-chain data to power unique smart contract use cases for DeFi and beyond. * Automation: Chainlink Automation is an ultra-reliable and performant smart contract automation solution enabling developers to quickly scale their operations in a verifiable, decentralized, and cost-efficient manner, to build next-generation apps. * CCIP: Chainlink CCIP provides a secure interoperability protocol for powering token transfers and sending arbitrary messages cross-chain. This is a push Oracle. See the [Using Data Feeds guide](https://docs.chain.link/docs/get-the-latest-price/) to learn how to use the Chainlink feeds. * Chainlink VRF provides cryptographically secure randomness for blockchain-based applications. More details [here](https://chain.link/vrf) ### Chronicle The first Oracle on Ethereum, Chronicle's decentralized Oracle network was originally built within MakerDAO for the development of DAI and is now available to builders on OP Mainnet and OP Stack chains. * **Data Feeds**: Builders can choose from 65+ data feeds, including crypto assets, yield rates, and RWAs. Chronicle's data is sourced via custom-built data models, only utilizing Tier 1 Primary Sources, such as the markets where tokens are actively traded, including Coinbase, Binance, Uniswap, and Curve. * **Transparency & Integrity**: Chronicle's Oracle network is fully transparent and verifiable. Via [The Chronicle](https://chroniclelabs.org/dashboard/oracle/DAI/USD?blockchain=OPT\&txn=0x53e60e6e79eb938e5ca3ca6c56b0795e003dd6b3a17cfd810ca5042b3d33b680\&contract=0x104916d38828DA8B83a88A1775Aa058e1F0B1647), the data supply chain for any Oracle can be viewed in real-time and historically, including data sources and the identity of all Validators/Signers. Users can cryptographically challenge the integrity of every Oracle update using the 'verify' feature. Data is independently sourced by a [community of Validators](https://chroniclelabs.org/validators), including Gitcoin, Etherscan, Infura, DeFi Saver, and MakerDAO. * **Gas Efficiency:** Pioneering the Schnorr-based Oracle architecture, Chronicle's Oracles use 60-80% less gas per update than other Oracle providers. This lowest cost per update allows Push Oracle updates to be made more regularly, ensuring more accurate and granular data reporting. Every Oracle implementation is customized to fit your needs. Implement one of our existing data models or contact Chronicle to develop custom Oracle data feeds via [Discord](https://discord.gg/CjgvJ9EspJ) or [Email](mailto:gm@chroniclelabs.org). Developers can dive deeper into Chronicle Protocol's architecture and unique design choices [via the docs](https://docs.chroniclelabs.org/). ### Gelato [Gelato VRF](https://www.gelato.network/) enables smart contracts on Optimism to access verifiable randomness. Gelato VRF offers real randomness for blockchain applications by leveraging Drand, a trusted decentralized source for random numbers. Gelato VRF (Verifiable Random Function) provides trustable randomness on EVM-compatible blockchains. Here's a brief overview: * Contract Deployment: Use GelatoVRFConsumerBase.sol as an interface for requesting random numbers. * Requesting Randomness: Emit the RequestedRandomness event to signal the need for a random number. * Processing: Gelato VRF fetches the random number from Drand. * Delivery: The fulfillRandomness function delivers the random number to the requesting contract. Ready to integrate? Head over to the [Gelato VRF Quick Start Guide](https://docs.gelato.network/web3-services/vrf/quick-start). ### Pyth Network The Pyth Network is a financial oracle network which delivers over 400 low-latency, high-fidelity price feeds across cryptocurrencies, FX pairs, equities, ETFs, and commodities. * Pyth's price data is sourced from over [95 first-party sources](https://pyth.network/publishers) including exchanges, market makers, and financial services providers. * Pyth [Price Feeds](https://www.pyth.network/developers/price-feed-ids) offer both the real-time spot price of the asset as well as an accompanying confidence interval band around that price * The Pyth [TradingView](https://docs.pyth.network/guides/how-to-create-tradingview-charts) integration allows users to view and display Pyth prices on their own website and UI. You can explore the full catalog of Pyth Price Feed IDs for [OP Mainnet and Sepolia (EVM Stable)](https://www.pyth.network/developers/price-feed-ids). * Pyth Entropy allows developers to quickly and easily generate secure random numbers on the blockchain. More details [here](https://pyth.network/blog/secure-random-numbers-for-blockchains) ### RedStone [RedStone](https://redstone.finance/) offers flexible Data Feeds for Lending Markets, Perpetuals, Options, Stablecoins, Yield Aggregators and other types of novel DeFi protocols. The infrastructure is well battle-tested and secures hundreds of millions of USD across mainnet. Builders can choose how they want to consume the data among 3 dedicated models: * [RedStone Core](https://docs.redstone.finance/docs/dapps/redstone-pull/) (pull oracle) - less than 10s update time, broad spectrum of feeds, best for most use cases. All [Core Price Feeds](https://app.redstone.finance/#/app/tokens) are available on OP Mainnet & OP Sepolia. * [RedStone Classic](https://docs.redstone.finance/docs/dapps/redstone-push/) (push oracle) - for protocols designed for the traditional oracle interface, customizable heartbeat and deviation threshold. * [Hybrid (push + push) ERC7412](https://docs.redstone.finance/docs/dapps/redstone-erc7412/) - specifically for Perps and Options, highest update frequency and front-running protection. Interested in integration? [Get in contact](https://discord.com/invite/PVxBZKFr46) with the RedStone team! ### Stork [Stork](https://stork.network) delivers price feeds with ultra-low latency, high uptime, and broad asset coverage for DeFi applications on OP Mainnet and OP Stack chains. * **Ultra-Low Latency**: Stork provides price data at ultra-low latency, enabling protocols to maintain functionality during high-volatility periods and support time-sensitive trading operations. * **High Reliability**: With best-in-class uptime and reliability, Stork supports perpetuals markets, lending protocols, and DeFi ecosystems that require consistent data availability. * **Day 1 Asset Support**: Price feeds for new digital assets are available from Day 1, allowing protocols to launch new markets immediately after token generation events. * **Broad Coverage**: Stork provides comprehensive asset coverage across crypto assets, equities, ETFs and commodities, supporting a wide range of DeFi use cases from derivatives trading to collateralized lending. Visit the [Stork documentation](https://docs.stork.network) to get started. ### DIA [DIA](https://www.diadata.org/) is a cross-chain, trustless oracle network delivering verifiable price feeds for Optimism. DIA sources raw trade data directly from primary markets and computes it onchain, ensuring complete transparency and data integrity. * Complete verifiability from source to destination smart contract. * Direct data sourcing from 100+ primary markets eliminating intermediary risk. * Support for 20,000+ assets across all major asset classes. * Custom oracle configuration with tailored sources and methodologies. To get started: * [Explore the Optimism Oracle Integration Guide](https://www.diadata.org/docs/guides/chain-specific-guide/optimism) * [Request a Custom Oracle](https://www.diadata.org/docs/guides/how-to-guides/request-a-custom-oracle) ## Next steps * Looking for other developer tools? See the [building apps overview](/app-developers/guides/building-apps) to explore more options! # Testnet faucets Source: https://docs.optimism.io/app-developers/tools-sdks/faucets Learn how to get testnet ETH on test networks like Sepolia and OP Sepolia for development and testing purposes. Faucets are developer tools that allow you to get free ETH (and other tokens) on test networks like Sepolia and OP Sepolia so that you can send transactions and create smart contracts. Here you'll find a list of active faucets that you can try out. Different faucets use different authentication methods, so you may have to try a few before you find one that works for you. Faucets can occasionally also run out of ETH, so if you're having trouble getting ETH from a faucet, try another one. <Info> Tokens on test networks like Sepolia or OP Sepolia have no value and are only meant for testing. Optimists only take what they need so that others can use faucets too! </Info> ## Optimism's faucet The [Optimism's faucet](https://console.optimism.io/faucet?utm_source=op-docs\&utm_medium=docs) is a developer tool hosted by Optimism that allows developers to get free testnet ETH to test apps on testnet OP Chains like Base Sepolia, OP Sepolia, PGN Sepolia, Zora Sepolia, and other OP Stack chains. Optimism's faucet is a great place to start if you're looking for testnet ETH. ## Additional faucets | Faucet Name | Supported Networks | | - | - | | [Alchemy Faucet](https://sepoliafaucet.com) | Sepolia | | [Chain Platform Faucet](https://faucet.chainplatform.co/faucets/ethereum-sepolia/) | Sepolia | | [Ethereum Ecosystem Faucets](https://www.ethereum-ecosystem.com/faucets) | Sepolia, OP Sepolia, Base Sepolia | | [ETHGlobal Testnet Faucet](https://ethglobal.com/faucet) | Sepolia, OP Sepolia, Base Sepolia, Zora Sepolia, Holesky | | [Farcaster Frame Faucet by LearnWeb3](https://warpcast.com/haardikkk/0x28f4237d) | Sepolia, OP Sepolia | | [Infura Faucet](https://www.infura.io/faucet/sepolia) | Sepolia | | [Native USDC Faucet](https://faucet.circle.com/) | Sepolia, OP Sepolia | | [QuickNode Faucet](https://faucet.quicknode.com/optimism/) | Sepolia, OP Sepolia | | [Tenderly Unlimited Faucet](https://docs.tenderly.co/virtual-testnets/unlimited-faucet?mtm_campaign=ext-docs\&mtm_kwd=optimism) | OP Sepolia, OP Mainnet, and [85+ other networks](https://docs.tenderly.co/supported-networks?mtm_campaign=ext-docs\&mtm_kwd=optimism) | | [thirdweb OP Sepolia Faucet](https://thirdweb.com/op-sepolia-testnet?utm_source=opdocs\&utm_medium=docs) | OP Sepolia | | [thirdweb Sepolia Faucet](https://thirdweb.com/sepolia?utm_source=opdocs\&utm_medium=docs) | Sepolia | | [ethfaucet.com](https://ethfaucet.com?utm_source=opdocs\&utm_medium=docs) | Sepolia, OP Sepolia, Base Sepolia, Zora Sepolia, Unichain Sepolia, Ink Sepolia, Mode Sepolia, Shape Sepolia, Worldchain Sepolia, BOB Sepolia | ## Bridge from Sepolia If you have testnet ETH on Sepolia, you can bridge it to OP Sepolia (and vice versa) using the [Superchain Bridges UI](https://app.optimism.io/bridge/?utm_source=op-docs\&utm_medium=docs) or this collection of [Superchain Testnet Tools](https://www.superchain.tools/). ## Next steps * If you're new to onchain development, check out [Optimism Unleashed](https://cryptozombies.io/en/optimism) by CryptoZombies and [Superchain Builder NFT](https://web.archive.org/web/20231218203510/https://blog.thirdweb.com/guides/optimism-superchain-faucet-nft/) by ThirdWeb. * If you're familiar with onchain development, check out the [Optimism Ecosystem's Contributions Dashboard](https://github.com/ethereum-optimism/ecosystem-contributions) for project ideas that Optimism is looking for. * Looking for other developer tools? See the [building apps overview](/app-developers/guides/building-apps) to explore more options! # Tools & SDKs Listing Criteria Source: https://docs.optimism.io/app-developers/tools-sdks/listing-criteria What a tool or SDK must meet to be listed on the support matrix, the removal rule, and the maintenance sweep that keeps listings accurate. This page governs the [Tools & SDKs support matrix](/app-developers/tools-sdks/support-matrix). It exists so that adding or removing a listing is the application of written policy, not a per-pull-request argument. The approach follows the [ethereum.org product-listing policy](https://ethereum.org/en/contributing/adding-products/), which uses published criteria plus a standing removal rule for the same reason. Listings must also satisfy the site-wide [content guide](/op-stack/contribute/content-guide)
프로젝트로 돌아가기