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

Top 4 Reasons to Get Yourself Warena NFTs

Kyber’s Blockchain Infrastructure Provider: Alchemy

How IOTA solves Blockchains scalability problem

Blockchain technology firm ANET.Inc

Airdrop Celebration: Defina Finance has Reached a Strategic Partnership with TheForce.Trade

How Will rDEX Improve Liquid Staking?

Kyber: Long Term Objectives & 2019 Plans

Bar Daily: Osmosis Founder Sunny Aggarwal on DeFi Innovation, Cosmos, & More

The Osmosis home page

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

Solidly: preparation for launch

VOLT & real yield

Yearn Finance heads to ETHDubai

It’s election time for THALES stakers: Thales Council & Oracle Council