update: the full liquidation loop is live on devnet.
pyth streams sol mark price in real time. on startup, engine fetches all open positions from chain via getProgramAccounts. scanner wakes on every price tick and checks every position. when margin is breached, liquidator builds the transaction, signs it with ed25519 and submits it onchain. all in c.
raw rpc calls, manual tx serialization, openssl signing. 149 compute units to liquidate.
next: funding rates, websocket account subscription so the engine picks up new positions in real time without restart, and crank integration.
update: pyth price feed is live.
sol mark price streaming in real time, scanner wakes on every price update, liquidator fires automatically.
next up: funding rates, crank integration.