You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README with accurate feature list, installation instructions,
environment setup, and links to sibling SDKs. Add CONTRIBUTING.md
with dev commands and code style guide. Add CHANGELOG.md with
initial 0.1.0 release entry.
High-performance, low-level Zig SDK for the PerpCity perpetual futures protocol. Built for HFT bots and latency-sensitive trading systems.
3
+
High-performance, low-level Zig SDK for the PerpCity perpetual futures protocol on Base. Built for HFT bots and latency-sensitive trading systems.
4
4
5
5
## Why Zig?
6
6
@@ -11,7 +11,7 @@ This SDK is designed for use cases where nanoseconds matter. Zig gives us:
11
11
-**Comptime ABI encoding** -- function selectors computed at compile time, zero runtime cost
12
12
-**Direct hardware control** -- atomic nonce management, lock-free data structures
13
13
14
-
If you're building a trading bot in Python or TypeScript, this is not the SDK for you. This is for systems that need sub-millisecond transaction construction and direct EVM interaction with no abstraction tax.
14
+
If you're building a trading bot in Python or TypeScript, use [perpcity-sdk](https://github.com/StrobeLabs/perpcity-sdk) or [perpcity-python-sdk](https://github.com/StrobeLabs/perpcity-python-sdk) instead. This SDK is for systems that need sub-millisecond transaction construction and direct EVM interaction with no abstraction tax.
15
15
16
16
## Features
17
17
@@ -20,15 +20,37 @@ If you're building a trading bot in Python or TypeScript, this is not the SDK fo
20
20
-**HFT nonce manager** -- Lock-free atomic nonce acquisition, no RPC round-trip per transaction
21
21
-**Gas cache** -- Pre-computed gas limits and fee caching to skip `estimateGas` calls
22
22
-**Transaction pipeline** -- Combines nonce manager + gas cache for fire-and-forget submission
23
-
-**Multi-RPC failover** -- Automatic failover across multiple RPC endpoints
23
+
-**Multi-RPC failover** -- Automatic failover across multiple RPC endpoints with latency tracking
The pure math layer has zero external dependencies and can be used standalone for off-chain calculations (mark price conversions, PnL estimation, liquidation checks).
95
+
The pure math and HFT infrastructure layers have zero external dependencies and can be used standalone for off-chain calculations (mark price conversions, PnL estimation, liquidation checks) and trading infrastructure (nonce management, gas caching, latency tracking).
96
+
97
+
## Development
94
98
95
-
##Testing
99
+
### Build
96
100
97
101
```bash
98
-
# Unit tests (pure math, no network)
102
+
zig build
103
+
```
104
+
105
+
### Test
106
+
107
+
```bash
108
+
# Unit tests (pure math + HFT infrastructure, no network)
0 commit comments