Pendle Token Risk Engine
Last updated
Last updated
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.
Deploy a linear expiration rate oracle
Deploy a twap oracle
Take both contract addresses and insert them as parameters into the createOjoPTFeed
method
Sign the transaction
Done! A new chainlink-interface-compatible contract will spawn and output a PT Risk Engine feed from the latestRoundData
query.
Ethereum
Base
TBD
Three Sigma
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.
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).