Build
Limit orders and DCA
Sell at a price you choose, or buy a fixed amount on a schedule, on Gully Core pools. Your tokens stay in a contract you can leave at any time.
Limit orders
A limit order rests at a price level on a CL pool and fills when the market trades through it. Your tokens sit in the pool as liquidity one tick spacing wide, just beyond the current price. When the price crosses the level, the pool itself converts them. The fill is the pool's own price, not a trade somebody else chose for you.
- Sell either token. Selling the pool's first token rests above the price. Selling the second rests below it. A level already in range is refused: it would fill at once, so it is a swap.
- Filled by anyone. Once the price has crossed, anyone may execute the level and is paid the tip you set, in the token you sell. A tip of zero is allowed. Your order then waits for someone to execute it without one.
- Partial fills. While the price sits inside your level the order is partly converted. You can wait, or cancel and take both tokens.
- Withdraw after the fill. The proceeds wait in the contract until you withdraw them. Nobody else can move them.
- CL pools only. There are no limit orders on Bin pools.
DCA
A DCA plan buys or sells a fixed amount every interval until its budget is spent. You fund the whole plan once. Each slice is an exact-input swap of the same amount through one Gully Core pool, fixed when you create the plan. An executor can only decide when to call inside the schedule, never how the slice trades.
| Setting | Rule |
|---|---|
| Pool and direction | One CL or Bin pool on Gully Core's core, fixed for the life of the plan |
| Amount per slice | The exact input of every slice. A slice must trade all of it or it does not run |
| Slices | 1 to 10,000 |
| Interval | at least 60 seconds between slices |
| Start and deadline | the first slice runs from the start. Nothing runs after the deadline |
| Least price | the least you accept per unit of input, after fees. A slice below it reverts |
| Recipient | where every slice's output goes |
| Tip per slice | paid in the input token to whoever executes the slice. Zero is allowed |
Cancel at any time
You can cancel an open limit order or a DCA plan whenever you like. A limit order returns what has not converted and what has, in both tokens. A plan returns its unspent budget and the unused tips. Only the order's maker or the plan's owner can cancel, and the tokens go where they choose.
The fee is charged only on what converted. An order cancelled before any fill pays nothing. One cancelled part-way pays the fee on the part that filled, so cancelling at 99% filled costs the same as waiting for the last 1%.
Fees
| Fee | How much | Rule |
|---|---|---|
| Protocol fee | a share of each fill or slice, read from the contract (protocolFeeBps()) | never above 0.5%. Frozen into each order and plan when it is placed |
| Site share | 0 to 0.1%, on top, set by the site you place it on | frozen per order and plan. Shown before you sign |
| Executor tip | the amount you set, in the token you sell | paid only for a fill or a slice that runs |
| Placing, cancelling, withdrawing | None | none |
The protocol fee moves only inside its immutable cap. An increase takes effect after a 7-day notice and applies only to orders and plans placed after it. A decrease applies at once. The protocol's part is paid only to the governance Safe.
The fee in force, its cap and its notice period are read from GullyCoreRangeOrders and GullyCoreDCA (protocolFeeBps(), maxProtocolFeeBps(), feeNoticeSeconds()). The trades themselves also pay the pool's fees as usual. See Fees.
What nobody can do
- No admin path reaches an order, a plan, its escrow, a tip or a credit. There is no pause and no upgrade.
- The owner's only powers are the protocol fee inside its cap and rescuing tokens sent to the contracts by mistake, above everything they owe.
- Neither contract is a hook, so they work on any pool they accept without changing it.
- Fee-on-transfer and rebasing tokens are not supported.
Where to use it
- Open the trading terminal and pick the Limit or DCA tab. Hosted Launchpads and DEXes show the same terminal on their pool and token pages.
- Your open orders and plans are listed under the form, with Cancel and Withdraw.
- From code, the SDK's
ordersmodule builds every call (orders.buildPlaceLimitOrder,orders.buildCreateDca, cancel, withdraw, execute) and reads orders and plans.
The addresses of GullyCoreRangeOrders and GullyCoreDCA on each chain are in Contracts. A chain shows none until they are deployed there. See Chains.
Wrong or missing? Tell us at @Gully_Labs.