Onchain Oracle

General Strategy

The strategy behind the Liquid Vaults price feeds module is engineered to harness Chainlink's price feeds for determining accurate ratios of token pairs, such as ETH and USDC. This approach involves dynamically adjusting the pool's reserves to align with the ratios verified by Chainlink price feeds, which is crucial for the precise valuation of LP (CDT) tokens.

Upon retrieving reserve values from the liquidity pool, these figures initially mirror the existing state of the pool and are prone to manipulation. The primary aim is to recalibrate these reserves to a ratio that is both reliable and secured by Chainlink. This recalibration capitalizes on the exact exchange rates provided by Chainlink, establishing a solid foundation against potential manipulation of reserves. The target ratio, underpinned by the aggregated data from Chainlink's decentralized oracle network, which collects information from a multitude of sources, offers a stable and reliable metric for the ecosystem.

Recalibration Process

The recalibration process adopts a proactive stance, preemptively addressing potential distortions or inaccuracies in the observed reserve ratios, which may arise from market volatility or intentional data skewing. Consequently, a systematic adjustment aligns the reserves with the ETH x USDC ratio according to Chainlink's rates. This ratio serves as a benchmark reflecting true market conditions, free from the impacts of volatility or manipulation on individual data points.

The module executes real-time adjustments to the reserve ratios, ensuring LP token valuations remain in sync with actual asset values and market trends, thus maintaining the Liquid Vaults ecosystem's integrity.

By employing this thorough and forward-looking methodology, the Liquid Vaults price feeds module is designed to offer a secure, dependable, and manipulation-proof mechanism for valuing LP tokens, contributing to the system's overall stability and reliability amidst changing market scenarios.

Accessing the Price

The price feed contract is compatible with Chailink’s EACAggregatorProxy contract. The following interface can be used to read from the price feed contract:

interface IPriceFeed {
function latestRoundData()
  external
     view
     returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
     );
function latestAnswer()
  external
     view
     returns (uint256);
}

Tech Process

Last updated