LogoLogo
  • Koi Overview
    • Overview
      • About
      • The Team
      • Resources
  • Protocol
    • Introduction
    • Liquidity Pools
      • Concentrated Liquidity Pools (v3)
      • Stable Pool (v2)
      • Normal Pool (v2)
      • Dynamic Fees
      • Governance
      • Protocol Fees
    • Koi Farming Pools
    • Koi Bonds
    • Limit Orders
    • Swap Widget
    • VWAP Oracles
    • Koi Paymaster Service
    • veRewards
  • Koi DAO
    • veKOI
    • Governor
  • Koi Contracts
    • Contracts
    • ABIs
    • Audits
  • Accessory
    • Locking v3 Positions
  • Project Information
    • Koi Website
    • Roadmap
    • KOI Tokenomics and Contracts
    • Social Media
    • Branding and Logos
    • Known Bugs
Powered by GitBook

2023 mute.io

On this page

Was this helpful?

  1. Protocol

VWAP Oracles

Integrate the Mute Switch LP Oracles into your dApp

PreviousSwap WidgetNextKoi Paymaster Service

Last updated 1 year ago

Was this helpful?

All LP pair contracts update and record their VWAP based on the cumulative trade volume over the last 30 minutes. You can use this information to access onchain oracle price fees by calling the specific pair with the function calls below.

Integration

The functions are available using the , and specifying the proper LP pair you are trying to fetch prices from, e.g. .

// returns the current VWAP over the last 30 minute window
function current(address tokenIn, uint amountIn) external view returns (uint amountOut)

// returns the VWAP over the granularity amount, 30 min increments
// e.g. granularity = 2 returns VWAP of the last 60 min window (2 sample points)
function quote(address tokenIn, uint amountIn, uint granularity) external view returns (uint amountOut)
pair abi
MUTE/ETH