Introduction
Ojo Network is an on-chain data-provision platform focused on price-oracle services for emerging DeFi primitives. Their Smart Oracle architecture (the subject of this review) targets derivative assets such as Pendle PT and Spectra PT tokens, supplying lending markets with manipulation-resistant prices by combining multiple feeds and selecting the safer, lower value.
Why Did They Need an Audit?
Before integrating the new Ojo PT Feed contract into partner lending protocols, Ojo wanted an external review to be sure the up-gradable clone was free of critical flaws that could corrupt prices or allow hostile re-configuration, risking user funds and partner liquidity.
Scope of the Engagement
What Was Audited: One Solidity file, src/OjoPTFeed.sol
(≈ 58 nSLOC). The contract:
- Stores two underlying Chainlink-style feeds (
FEED_1
, FEED_2
); - Exposes
latestRoundData
and getRoundData
that always return the lower of the two prices.
Key Objectives:
- Identify vulnerabilities that could alter or withhold price data.
- Confirm the two-feed decision mechanism is functionally correct.
- Benchmark gas usage and upgradeability patterns against best practice.
- Verify compliance with Chainlink AggregatorV3 interface expectations.
Audit Date: 2025-03-14
Language: Solidity
Type: Code Audit
Results and Findings
Key Critical Issue – Unprotected initialize()
The clone-pattern initializer could be called repeatedly, letting anyone swap the legitimate feeds for malicious ones. Guard added (require(FEED_1 == address(0))
).
Notable Suggestions Implemented
- Added optional staleness window to reject outdated prices.
- Removed duplicate variable declarations.
- Re-ordered storage writes in
initialize()
to avoid wasted gas on failing decimal checks. - Provided helper
activeOracle()
view so integrators can discover the currently selected feed.
In conclusion
We tailored our review to the specific challenges of Ojo’s Smart Oracle architecture—dynamic dual-feed pricing, up-gradable clones, and gas-critical execution paths. By zeroing in on the initialization flow, feed-selection logic, and integration touch-points, we ensured every new oracle instance ships on a rock-solid foundation. Beyond fixing the critical issues, we delivered best-practice guidance (guarded initializers, staleness windows, helper views) so the codebase will keep pace with Ojo’s long-term vision of safer, more capital-efficient lending markets.
If you’re building oracles, money-markets, or any dynamic, upgrade-ready DeFi primitive, we can help you launch with confidence. Contact us to see how Three Sigma can safeguard your protocol and reinforce community trust.