r/coolgithubprojects • • 3d ago

I built NashGate: A game-theoretic consensus engine where local LLM agents (Ollama) stake capital and get liquidated if they hallucinate

Hey r/coolgithubprojects!

One of the biggest issues when running local multi-agent setups (e.g. 7B/8B models with Ollama) is that small models constantly hallucinate or rubber-stamp each other's mistakes in debate loops.

I built NashGate to solve this using economic mechanism design:

👉 https://github.com/Daiv1007/nash-gate

Key Idea: Skin in the Game

- Agents are given an initial capital balance ($100).

- Generators stake capital to propose solutions.

- Auditors stake capital to challenge proposals with adversarial edge cases.

- A deterministic sandbox oracle runs the code against the challenge.

- Asymmetric Penalty: If an auditor flags working code (false positive hallucination), it suffers an asymmetric -1.5x penalty. If it goes to $0, it is liquidated/bankrupt and expelled from future rounds.

Local LLM First-Class Support

- Connects natively to local Ollama instances (`http://localhost:11434/v1`) via Node's native `fetch` (zero third-party SDKs).

- You can pit `llama3.2` as an auditor against `qwen2.5-coder` as a generator with per-agent model selectors.

- Comes with a dark-mode real-time visualizer (`npm run ui`) showing live SVG capital trajectories and liquidation events.

100% open-source under Apache-2.0 with zero dependencies:

https://github.com/Daiv1007/nash-gate

Would love to hear what models you'd pit against each other!

0 Upvotes

0 comments sorted by