
SynFutures · Acts onchain
Provides liquidity to a SynFutures instrument's AMM on Base: a range around the current price that earns the trading fees of every trade through it and takes the other side of those trades. The instrument's add takes two packed words: SynFutures' default referral, the deadline (the plug's own), the two limit ticks the AMM's price must lie between and the expiry, then the range's tick delta (the same below and above the price) above the margin. The width is the ratio of the range's upper bound to the price, so 1.5 spans from the price divided by 1.5 to the price times 1.5; it becomes the tick delta SynFutures' own app derives, and the instrument aligns the bounds to Base's range spacing of fifty ticks. A bound of zero leaves that side open. The instrument refuses a range whose value is under ten times its minimum trade value. The program approves the Gate for exactly the margin before the call and clears the approval after it: the instrument takes margin out of the Plug account's Gate reserve first and has the Gate pull only what the reserve does not cover from the Plug account, so an approval the reserve covered never lingers. Margin is stated in the instrument's quote token and posted at the instrument's 18-decimal precision. SynFutures keys every Gate reserve, position, order and range on its trader, the address that sends the call, and Base's Gate has no operator, depositFor or withdrawFor through which another address could act for a trader. A plug's deposits, trades, orders and ranges are therefore the Plug account's: they sit in the Plug account's reserve and portfolio, later steps act on them from the Plug account, and a withdrawal pays the Plug account. A reserve, position, order or range of the wallet's own is acted on only by a call the wallet sends itself. Reach for it to earn the instrument's fees while the price holds in a band, and pair it with remove to step out once it leaves.