← Back
Home › Systems › Blockchain and web3

amm-dex

AMM decentralized exchange

Uniswap

SystemTechniques · 8Primitives · 31 amm-dex Model checking and formal proofembedded · medium: Exhaustively explore a model's reachable states (or prove its invariants with a solver or proof assistant) to find rule violations with a shortest counterexample trace.›Automated market makerfinance · medium: LMSR and constant-product automated market makers that always quote prices from a cost functionConcentrated liquidityfinance · medium: AMM liquidity in price ranges: ticks, sqrt-price math, tick bitmaps, range positionsReorg safe chain indexingfinance · medium: Index blockchain events with confirmation depth, reorg rollback and finality trackingCDCL SAT solvingoptimization · medium: Search for a satisfying assignment, learn a new constraint from every dead end, and jump back past irrelevant choices; handles industrial formulas with millions of clauses.›Dpll toptimization · medium: SMT architecture: CDCL over boolean abstraction plus theory solvers, theory propagation, Nelson-OppenCongruence closurecompilers · medium: Union-find over terms with congruence propagation; decides equality with uninterpreted functionsBFS and DFSgraphs · low: The two basic graph traversals; BFS gives hop distances and levels, DFS gives discovery/finish order for cycles, components and topological order.›Reentrancy protectionfinance · low: Checks-effects-interactions and reentrancy locks against callback attacks in contractsTwap oraclefinance · low: Cumulative price accumulators giving manipulation-resistant time-weighted average pricesBig integer arithmeticnumerics · low: Multi-limb integer arithmetic (256-bit and up): carries, Karatsuba, Montgomery and Barrett reductionInstruction meteringcompilers · low: Charge a fuel budget per instruction or per basic block and trap at zero, so untrusted code is bounded by work done, deterministically.›Deterministic fixed-point mathgame-networking · low: Bit-identical simulation math across CPUs, compilers and builds: integer fixed-point formats, the float traps (FMA, x87, fast-math, libm), deterministic trig, sqrt and RNG.›Bellman ford negative cyclesgraphs · low: Bellman-Ford shortest paths with negative edges and negative-cycle (arbitrage) detectionSwiss tabledata-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.›Binary decision diagramsoptimization · low: A reduced ordered BDD stores a Boolean function as a shared DAG that is unique per variable order, so equivalence is one integer compare and counting is one pass.›Newton root findingnumerics · low: Linearize at the guess and jump to the tangent root; quadratic convergence near a simple root, made robust by brackets (1D) or line search.›Rank/select bitvectorsdata-structures · low: Bitvector plus small count tables: ones before position i and position of the k-th one in O(1); Elias-Fano builds compressed sorted lists on it.›Message sequence numbersdistributed · low: A per-stream counter on every message lets the receiver detect loss, duplicates and reordering, ack cheaply and resume after reconnect with "send from N".›Idempotency keysfinance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.›Journaled state revertstorage · low: Undo journal of state writes enabling nested checkpoints and cheap revertd-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Drat proof certificatesoptimization · low: DRAT and LRAT proofs emitted by SAT solvers and checked independently+ 1 more techniques+ 15 more primitives