Ojo
  • The Ojo Network
  • Security & Delivery
  • Integrate
    • Pendle Token Risk Engine
    • Exchange Rate Risk Engines
    • Yield Risk Engine
  • Architecture
  • Networks
    • Agamotto
    • Ditto
    • Sauron
  • Links
    • Twitter / X
    • GitHub
Powered by GitBook
On this page
  • Integration steps
  • Deployments
  • Audit
  • Disclaimer
  • Integration notes
  • References
  1. Integrate

Pendle Token Risk Engine

PreviousIntegrateNextExchange Rate Risk Engines

Last updated 11 days ago

Ojo's Pendle Risk Engine are a risk-adjusted way to price Pendle PTs for lending. The design was and developed by the Ojo team.

Integration steps

  1. Deploy a linear expiration rate oracle

  2. Deploy a twap oracle

  3. Take both contract addresses and insert them as parameters into the createOjoPTFeed method

  4. Sign the transaction

Done! A new chainlink-interface-compatible contract will spawn and output a PT Risk Engine feed from the latestRoundDataquery.

Deployments

Network
Contract

Ethereum

Base

TBD

Audit

Auditor
PDF

Three Sigma

Disclaimer

As far as the law allows, this software comes as is, without any warranty or condition, and no contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim. DeFi is inherently risky and no system is perfect. Risk Curators and DeFi protocols make their own decisions and are independent organizations; they should be completely sure that this Risk Engine uses an appropriate design for their use case and risk frameworks.

Integration notes

  • This contract has a hardcoded staleness threshold of 1 day. Typically, Pendle Oracles either return 0 or the current block as their timestamp, but this should be noted when using the Risk Engine to make sure there isn't a market set up that will be frozen by an out-of date oracle.

  • The roundId may be non-monotonic, since the Risk Engine switches between two different oracle feeds. Most implementations just use latestRoundData, but if you are using the roundId, please make note of this.

  • The Risk Engine does not check that the two inputs are the same pendle token, and only is aware of the chainlink interfaces of the inputted feeds.

  • This risk engine outputs the lower of two oracles. Make sure that this design is good for your use case (e.g., don't set up a lending market for ETH and use the price of ETH/USD and BTC/USD as your inputs, make sure that one of these inputs can not be easily manipulated downwards and cause liquidations, etc).

References

commissioned by the Morpho DAO
Pendle PT Oracle
Morpho DAO Grant
Pendle PT Oracle Factory
Morpho Oracle Deployment
0x6dB4264fBABc4DD150B3204301f2B00a97c77567
Audit