Uniquote, Unihedge, and UniswapV2Oracle


We recently wrote about MetaWallet, a gasless wallet for Ethereum apps. Which is made possible thanks to the Keep3r Network, a coordination and incentivization layer for third party execution.

The second system made possible by Keep3r Network is Unihedge, an impermanent loss mitigation system, however this post is not to introduce Unihedge, instead it is to introduce two building blocks required for Unihedge to function; UniswapV2Oracle, and Uniquote.


Uniquote, is a simple liquidity provider (LP) pricing system, it denominates your liquidity into one of the two pairs. So you can quote ETH-WBTC LP tokens as ETH denominated or WBTC denominated. This is an important building block to pricing LP tokens, as we believe LP tokens will be used as collateral in many more subsystems (Unihedge and Uniloan, just to name two).

UniswapV2Oracle is an on-chain oracle for UniswapV2 pairs. It allows any pair to be added in a permissionless fashion.

UniswapV2Oracles are sliding window oracles that uses observations collected over a window to provide moving price averages in the past windowSize with a precision of windowSize / granularity.

The windowSize was set to 4 hours. Funding rates on major perpetual platforms are updated roughly every 8 hours, for this reason 4 hours was selected. The granularity is set to 4, translating to roughly 1 reading every hour.


UniswapV2Oracle is an oracle of last resort and should be used for pairs not normally supported by other oracles. The cost to attack these readings is to manipulate the 4 readings in a given window, while this is costly and not guaranteed, it is possible, and as such we recommend this as a fallback mechanism or to be used for pairs not well supported by core oracle providers.

Read more






Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why the 2020s is the decade of Blockchain technology

Top 10 Blockchain Lawyers & Firms You Need to Know

NnsDAO Protocol airdrop activity description

🔰MaxxCapital Ventures x Dragon Ventures🔰

Announcing the API3 partnership and integration with MobiFi

Blockchains, Networks, Protocols or Fantasies in Security Tokens Part II: Consensus, Identity and…

BIKI& BIUT Dark Horse Public Chain

Voting with EGLs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andre Cronje

Andre Cronje

More from Medium

The Temple Flywheel: Part I

🚀 stMATIC: Shard Labs Launches First Balancer MetaStable Pool on Polygon

People of Yearn : Marco Worms