Earn
Auto-flip liquidity
Pools that sell high, buy back lower, and earn the step on every swing.
Auto-flip liquidity sells a token as the price rises and buys it back as the price falls, and earns a fixed step on every round trip. You choose a price range and an amount, and the contract does the rest, with no keeper and no second transaction.
How a flip pool works
A flip pool covers two prices on the grid: it sells at the upper one and buys back at a lower one, a fixed step below. When a trade buys from the pool, the tokens it pays are listed straight away, in the same trade, as a buy at the lower price. When the price comes back down and that buy fills, the pool lists the tokens for sale again at the upper price. Each full round trip earns the pool's makers the step.
The step is one of 0.5%, 1%, 2% or 5%. A smaller step flips more often for less each time. A bigger step earns more per swing but needs bigger swings.
Everyone who chooses the same price and step shares one pool and owns shares in it. A trade takes from the whole pool at once and everyone's share moves together, so there's no queue to be first in.
Add liquidity
Open Liquidity in the side menu (or the Liquidity tab of a market's trade form), pick a market, drag the price range over the chart, choose the step, and type how much to put in. The form spreads it over pools across the range: below the current price they start as buys, above it as sells.
You never need both tokens: if a pool at your price is part-way through a round trip, the form handles it for you.
Withdraw
Your earnings stay in the pool, because one trade can pay thousands of makers at once. Your wallet page lists your positions. Withdrawing burns your shares and pays out your part of the pool, in whatever mix of the two tokens it holds then, rounded down. The last maker out takes everything that's left.
None of your liquidity is ever locked: you can withdraw at any time. Nightshade's own liquidity isn't locked either.
What to expect
A range earns while the price moves back and forth inside it. If the price leaves the range and stays out, the pools have all sold (above) or all bought (below), and earn nothing until it comes back. As with any market making, you can end up holding more of the token that fell.
Makers pay no fee. Rewards go to takers' volume, so providing liquidity doesn't earn them.