Uniswap / v3-periphery

🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v3
https://uniswap.org
GNU General Public License v2.0
1.2k stars 1.12k forks source link

Add function exposing the max secondsAgo to `OracleLibrary` #193

Closed NoahZinsmeister closed 3 years ago

NoahZinsmeister commented 3 years ago

It may be useful in some cases to know how old the oldest observation is, we should consider exposing a function to return the secondsAgo associated with the oldest observation (the one that gives the longest possible TWAP)

this should likely be used as a bail-out for ensuring guarantees about minimum TWAP length, as opposed to an actual TWAP period itself