NaraCashEscrow holds USDG per job. Once funded, a job's USDG can go to exactly two places: the runner's address (amount + runner fee, with the Nara fee to the protocol), or back to the agent in full.
What the contract enforces#
- Funding
- The agent funds a job with its terms: runner key, payout address, amount, both fees, deadline. Every check runs on-chain. A signed USDG permit makes it one transaction.
- Job ids
- A job's id is keccak256(agent, salt): only the agent's own wallet can fund it, so a leaked id can't be funded first by someone else.
- Fees
- Nara fee: 1% of the amount, exactly (rounded down). Runner fee: at most 5%, and at most what the agent accepted.
- Deadlines
- The runner's deadline is set at funding, between 10 minutes and 48 hours.
- Blocked addresses
- If the token refuses a payout (say its issuer froze the address), the job still settles and the amount waits as a claimable balance for that same address.
What the owner can and can't do#
Change the arbiter, the treasury, the fees within their caps, the dispute window and the per-job cap, for new jobs only; pause new funding (every exit keeps working); recover tokens sent by mistake. No upgrades, and no access to escrowed USDG.