aldrin-labs/abyssbook
first zig orderbook in history // benchmark prolly wrong its ai estimate
AbyssBook represents a quantum leap in DEX infrastructure, achieving performance metrics previously thought impossible in decentralized systems:
Metric | AbyssBook | Traditional DEX | CEX |
---|---|---|---|
Order Latency | 0.3ฮผs | 500ms | 50ฮผs |
Throughput | 1M+ orders/sec | 5K orders/sec | 100K orders/sec |
Price Levels | Unlimited | Limited | Limited |
Slippage | Near-Zero | High | Low |
๐ฏ New to AbyssBook? Start with our One-Page Thesis to understand the revolutionary approach, then explore detailed use cases and see how we compare to competitors.
// Time-Weighted Average Price (TWAP)
try book.placeTWAPOrder(
.Buy, price, total_amount,
num_intervals, interval_seconds
);
// Trailing Stop with Dynamic Adjustment
try book.placeTrailingStopOrder(
.Sell, price, amount,
trailing_distance
);
// Peg Orders with Multiple Reference Points
try book.placePegOrder(
.Buy, amount, .BestBid,
offset, limit_price
);
// Vectorized batch processing
const VECTOR_WIDTH = 8;
const PriceVector = @Vector(VECTOR_WIDTH, u64);
const matched = price_vec >= amount_vec;
// Initialize high-performance orderbook
var book = try ShardedOrderbook.init(
allocator,
32 // shard count
);
// Place order with automatic price-time priority
try book.placeOrder(
.Buy, // side
1000, // price
10, // amount
order_id, // unique ID
);
// Execute market order with optimal matching
const result = try book.executeMarketOrder(
.Sell, // side
5 // amount
);
Our development roadmap is continuously evolving based on community feedback and market needs. Here's our current focus:
Note: This roadmap is subject to change based on community feedback and market developments. For the most up-to-date information, please check our GitHub issues and discussions.
We welcome contributions in:
๐ Complete Documentation Hub - Interactive documentation with search
๐ Live Documentation: The documentation is fully configured for Netlify deployment with optimized performance, security headers, and global CDN delivery.
AbyssBook maintains the highest security standards with a comprehensive security framework:
# Run security-focused tests
zig build test-security
# Run all tests including security
zig build test-all
Run the comprehensive benchmark suite:
zig build bench
This will execute tests across:
Run the unit test suite:
zig build test
Run comprehensive end-to-end tests that simulate real-world trading scenarios:
zig build test-e2e
Run unit tests, end-to-end tests, and security tests:
zig build test-all
Run dedicated security tests for input validation and vulnerability prevention:
zig build test-security
Detailed documentation on the e2e tests is available at E2E Tests Documentation.
AbyssBook is licensed under the Apache License 2.0 - see the LICENSE file for details.