Uniswap + Ampleforth is Kinda Magical

Brandon Iles
Jul 19, 2019 · 3 min read
Image for post
Image for post

Did you know there’s a guaranteed AMPL arbitrage opportunity every 24 hours on Uniswap?

Here’s how it works.

Uniswap

Uniswap is a protocol for automated token exchange. It’s similar to a DEX, but it doesn’t use any order book.

Image for post
Image for post
Uniswap’s Ridiculously Simple UI

Instead of trades being transactions between makers and takers, a single user simply exchanges tokens in Uniswap’s token reserve pools. Every ERC20 token market on Uniswap contains a pool of that token and also a pool of ETH, the default trading pair.

The quoted exchange rate is just a formula based on the relative sizes of these two pools.

As demand for a token increases and people buy out of that pool, it gets increasingly expensive to exchange out from it and increasingly cheap to exchange into it. So the exchange rate naturally adjusts based on relative demand of the two tokens, represented by the size of the two pools.

Ampleforth

Ampleforth is a self-billed “Smart Commodity Money” initially deployed on Ethereum as an ERC20 token. Founded with a mission to create fair, politically independent money, the creators noticed that commodity-monies like gold and silver are naturally fair and independent.

But unfortunately, these commodity-monies can’t efficiently respond to changes in demand, making them a poor substitute for central-bank-money.

Ampleforth’s token AMPL is somewhat like Bitcoin, gold, or silver but with a unique elastic supply that constantly seeks price-supply equilibrium. When AMPL price changes, the system seeks a new equilibrium point by universally expanding to, or contracting from all holders.

Image for post
Image for post
Snapshot of Ampleforth Dashboard

The operation that adjusts supply happens once every 24hrs.

(This is a simple explanation. You can learn more about Ampleforth or the broader economic context behind it in the Whitepaper or Red Book)

Uniswap + AMPL

When the Ampleforth supply policy executes its rebase, all holders’ AMPL balances potentially increase or decrease together in a single transaction. This also includes contracts which hold AMPL balances.

So what happens on Uniswap? The AMPL reserve automatically adjusts, changing the relative size of the AMPL and ETH pools, causing a new exchange rate to be immediately available upon rebase.

So, every 24 hours there’s a potential arbitrage opportunity between Uniswap and Bitfinex/Ethfinex — the two currently supported centralized exchanges.

How would you make use of it?

Buy low at one place, sell high at the other, every 24hrs at 8PM UTC.

Of course, deposits and withdrawals take time on centralized exchanges. So if you have existing balances on-chain and on-exchange, you can do these two buy and sell ops at the same time. You’d just need to periodically rebalance your holdings, but you can do this at your leisure.

How else could you benefit?

If you’re not confident enough to try this arbitrage yourself, you can at least profit from the trade volume that naturally comes out of it.

Uniswap allows anyone to supply liquidity into the exchange pools. Active traders pay a small fee of 0.3% and this is added directly back into the pools so the combined reserve balance increases with every trade.

When you decide to pull your funds out, you get your initial tokens plus the aggregated fees.

On top of this, since the AMPL reserve scales up and down with rebases, you never lose your exposure to rebase adjustments. Pretty cool!

Neither Uniswap nor Ampleforth have any secondary token or extractive platform fees. ❤

Λ + 🦄 = 🌈

Where to go

https://www.ampleforth.org/live/ has links to both the Uniswap exchange and the Bitfinex/Ethfinex exchanges.

You can also see market activity at uniswap.info

If you want to keep following Ampleforth, the best way to join the conversation is through the Telegram, twitter, github, or email.

Ampleforth Blog

ampleforth.org

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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