Smart Contract Engineer
JibX
Apr 2024 - Jul 2024 (4 months)
Perpetual DEX — A fully on-chain perpetual DEX with a central limit order book backed by a red-black tree. Handles order matching, position management, and liquidations entirely in Solidity.
- Built a fully on-chain central limit order book using a red-black tree, enabling O(1) order insertion via price-level grouping and O(1) cancellation via swap-and-pop optimizations.
- Implemented the matching engine in Solidity, handling order execution, position management, and liquidations entirely on-chain.
- Optimized contract gas usage and bytecode size through storage packing, inline assembly, and efficient data structures.
- Developed comprehensive unit, fuzz, and invariant test suites covering the order book and matchi