Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

doc.gno

1.20 Kb · 23 lines
 1// Package limit is the GnoSwap limit order realm.
 2//
 3// Users escrow makingAmount of tokenIn for takingAmount of tokenOut before
 4// expiresAt. Authorized keepers fill orders on a whitelisted direct pool,
 5// without the router, choosing the pool fee tier and swap price limit for
 6// each fill. Partial fills leave unsold input in escrow; each fill pays the
 7// owner immediately after deducting the order's snapshotted execution fee,
 8// while enforcing the order's slippage-adjusted owner-net exchange ratio.
 9// Owners can cancel for the remaining input, and anyone can refund expired
10// orders through bounded cleanup. Settled orders are removed from the indexes.
11//
12// This package is the permanent entry point. It owns the escrow address, the
13// KV store shared by every version, and the upgrade switch; the business
14// logic lives in a registered implementation (impl/v0).
15//
16// Files:
17//   - proxy.gno: state-changing entry points
18//   - getter.gno: read-only queries
19//   - store.gno: KV store and store keys
20//   - state.gno: realm state and the active implementation
21//   - upgrade.gno: implementation registration and upgrades
22//   - swap_callback.gno: authenticated pool callback paying escrowed input
23package limit