If a project integrates with external Oracle smart contracts, it is necessary to approach them with limited trust and check that they do not introduce unexpected behavior into our system.
Ensure that a verified contract satisfies the following high-level requirements:
- Contract follows a tested and stable Oracle standard,
- The values transferred are additionally verified,
- Vulnerabilities identified in various Oracle implementations have been taken into account during implementation.
Category “I3” lists requirements related to the Oracle smart contract as one of the components with which the project integrates.
# | Description |
---|---|
I3.1 | Verify that, when using Uniswap TWAP as a price oracle, the period is long enough to make its manipulation unprofitable for the attacker (compared to the funds at potential risk). |
I3.2 | Verify that Oracle data is up-to-date. |
I3.3 | Verify that no spot oracle is used (e.g. spot price from Uniswap pool). |
I3.4 | Verify that, when using Uniswap V3 TWAP as price oracle, liquidity is high enough and is distributed widely across most of the price range. |
I3.5 | Verify that, the use a decentralized off-chain oracles unsusceptible to on-chain price manipulation attacks (e.g. Chainlink) is considered for low liquidity asset, ideally combining it with on-chain oracles to detect malicious values. |
I3.6 | Verify that the value you are using has had enough time to be reported as invalid and has not been. |
For more information, see also:
- The Dangers of Price Oracles in Smart Contracts
- TWAP Oracle Manipulation Risks, Mudit Gupta - DeFi Security Summit 2022
- TWAP Oracles After the Merge, Mark Toda - DeFi Security Summit 2022
- So you want to use a price oracle
- Pricing LP tokens | Warp Finance hack
- Uniswap V3 tick price manipulation
Request an audit of your project by SCSVS authors. Contact a specialist.