Oracles
Securely providing on chain pricing data for over 100+ tokens
Oracles are third-party services that connect decentralized applications to external data sources. They are key parts of the Web3 tech stack that enable dApps to access both on-chain data from other blockchains as well as off-chain data from other applications and services.
Oracles solve a fundamental restriction of smart contracts - they cannot inherently interact with data and systems existing outside their native blockchain environment. Resources external to the blockchain are considered “off-chain,” while data already stored on the blockchain is considered on-chain. Securely interoperating with off-chain systems from a blockchain requires an additional piece of infrastructure known as an oracle to bridge the two environments.
Why does Tren use Oracles?
Tren's stability is intricately tied to oracles furnishing real-time price data for collateral assets, with direct or indirect connections to pools. Their primary functions include determining collateral market values, assessing loan market values, and enforcing over-collateralization rules as a protective measure for lenders.
While our pools are isolated, ensuring that the risk associated with one asset doesn't pose a threat to the entire protocol, it's essential to acknowledge that risk persists within each market. Read about Oracle Risk here.
Oracles used in Tren
Tren Finance remains oracle agnostic, emphasizing adaptability in oracle selection for each pool. Our approach involves a careful evaluation on a case-by-case basis, determining the oracle that offers the utmost security to ensure the robustness of each pool. Below we will highlight the most popular choices
Chainlink
Recognized as the leading oracle, Chainlink excels not only in pricing real-world assets but also in furnishing crucial off-chain data. Its multifaceted utility extends beyond pricing oracles, making it a sound choice.
In our decision-making process, we take into account the cost involved in manipulating Chainlink, requiring the disruption of nodes and manipulation of exchange prices. This cost consideration is integral to defining the allowable amount of trenUSD that can be minted into the pool.
UniV3
Solely providing on-chain pricing data, this oracle consistently updates prices with each Uniswap transaction, emphasizing pools with the highest liquidity as trustworthy price sources.
A notable benefit is its ability to offer price feeds for a wider range of assets than Chainlink, making it the predominant oracle in our usage.
However, it is crucial to acknowledge the inherent risks associated with the oracle as we define the allowable amount of minted trenUSD in the pool. We meticulously consider the cost of manipulating Uniswap's TWAP oracle, which involves controlling the average token price over a specified time frame.
UniV4
Uniswap V4's oracle hooks prioritize flexibility by employing specific price calculation methods tailored to an asset's volume and liquidity, steering away from a one-size-fits-all approach. In alignment with our Uniswap V4 strategy, we are actively developing custom oracle hooks while also incorporating existing v4 hooks.
An initial v4 oracle in the pipeline is the truncated oracle, employing the geometric mean formula to record on-chain asset prices in Uniswap liquidity pools. Price adjustments are constrained to a predetermined maximum within a single block, effectively smoothing the impact of substantial trades over time, whether legitimate or malicious. This approach increases the cost of manipulation, benefiting Tren.Finance users by allowing more trenUSD to be minted into the pool without compromising security.
Other
Flexibility is at the core of our capabilities as we can create custom oracles that employ unique logic to calculate the market value of an asset, especially beneficial for rebasing assets and specific LSTs.
Embracing oracle agnosticism, we empower governance to propose the incorporation of new oracles or modifications to the oracles of existing pools. This commitment underscores our dedication to sustaining the protocol by adapting to evolving needs.
Last updated