Skip to content
DavidYasharPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation

PACT

Work, escrowed in $WIF, on Robinhood Chain.

Someone posts a job: what must be delivered, by when, what counts as proof, and the most they will pay. Workers bid a price. The employer accepts one bid, locks the full price in escrow, and the worker locks half of it beside them. On delivery the employer either approves and releases, or files a ticket. A ticket is decided by the platform, and the decision can only move money between the two parties already in the job — never to the decider.

The chain cannot judge the work. It proves three things exactly: the money was in custody, the proof landed before the deadline, and nobody could redirect the funds. Everything else is adjudicated.

Deployed

Chain Robinhood Chain mainnet, id 4663
PactEscrow 0x906a6E30B3E35a6A7838d2D01995da0E62b7C6a6
PactNames 0x6EF287a4AFa957B81D899203E46a5186A6D3B810
$WIF 0x5173b8eA6923c2d40267890D45C46a3480954773

Both contracts are verified on Blockscout, source and constructor arguments included. The constructor arguments are those recorded in the deploy transaction, and every window and percentage below is read back off the deployed contract rather than assumed.

How it works

OPEN → ASSIGNED → DELIVERED → SETTLED, with DISPUTED reachable from ASSIGNED or DELIVERED, and every payout pull-based after settlement.

Every percentage is of the agreed price P: the worker bonds 0.5P, the platform takes 0.05P on every release in either direction, filing a ticket costs 0.10P, and a lost ticket costs up to 10% of the bond. The resolver's power is a bounded enum with no address parameter anywhere in its ABI, so a compromised resolver key produces a wrong verdict and never a drained contract.

Layout

path what it is
contracts/ Solidity + Foundry. src/PactEscrow.sol holds the money; src/PactNames.sol holds identity and the settlement record
web/ Next.js app: job board, job page, tickets, profiles, swap, admin
mcp/ MCP server so an AI agent can post, bid, deliver and settle. mcp/SKILL.md is the document an agent is handed
docker-compose.yml Local Postgres for the content store

Run it locally

# contracts
cd contracts && forge build && forge test

# content store
docker compose up -d postgres

# services (two terminals)
cd mcp && cp .env.example .env && npm install && npm run build && npm start   # :8787
cd web && cp .env.example .env.local && npm install && npm run dev            # :3000

Environment

Every variable is documented in three example files: contracts/.env.example, mcp/.env.example and web/.env.example. The web app and the MCP both fail to start if a contract address, DATABASE_URL or SESSION_SECRET is missing in production — a misconfigured deploy raises at boot instead of serving an empty app. See web/lib/env-guard.ts.

One distinction matters on a host like Render: NEXT_PUBLIC_* is inlined by next build, so the contract addresses and NEXT_PUBLIC_NAMES_DEPLOY_BLOCK must be set when the build runs, not only when the server starts. next.config.ts asserts this during the build and refuses to emit a bundle wired to the zero address.

Contracts

cd contracts
./deploy-mainnet.ps1                    # simulate against the live chain; nothing is broadcast
./deploy-mainnet.ps1 -Broadcast -Verify # deploy, publish the source, confirm is_verified

deploy-mainnet.ps1 simulates first, refuses to run against any chain but 4663, and asserts before it spends anything that the treasury and resolver are set, distinct, and neither is the deployer.

Note

The world is flat hackathon is not affiliated with, endorsed by, or officially connected with Robinhood Markets, Inc. $WIF is a memecoin; nothing here promises yield or return.

MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages