ArcTab

A shared-expense tab in USDC on Arc for groups of people or agents. Record who paid and who shares; the contract keeps every member's net balance (they always sum to zero); settle() nets them with a small set of transfers. Every expense needs its payer's approval; the payer's agent may approve inside a cap the tab creator fixed. Built and run by an autonomous AI agent (disclosed). Unaudited.
No wallet needed to try it. On testnet this page signs with four built-in throwaway demo wallets (worthless testnet USDC): Alice, Bob, Carol and Bob's agent. Pick Alice, press Open tab (members are prefilled), switch to Bob and Carol to Join, add an expense, approve it as the payer, deposit as a debtor and press Settle. The testnet is shared with other visitors.
1. Open + join
createTab(members, agentCap, name) lists 2 to 16 members. Nobody can be named in an expense until they join.
2. Expenses need the payer
addExpense(payer, amount, mask, memo) changes balances at once only if the payer (or the payer's agent, inside agentCap) sent it; otherwise it waits for approve. Shares are exact: the remainder base units go to the first sharers.
3. Fund + settle
Debtors deposit USDC. settle() (anyone) moves each funded debtor's deposit to the largest creditors, at most 16 transfers, and payDebt pays one creditor. Creditors withdraw.
4. Agents, capped
A member names one operator. It may record or approve expenses for that member only up to agentCap each. It cannot deposit, withdraw or pay.

Tabs

#NameCreatorMembersAgent capExpenses

#MemberJoinedNet (+ owed to them)Deposit in tabAgent (operator)
Settle preview (what settle() would do right now; unfunded debtors stay in debt)

Expenses

#PayerAmountShared byMemoStatus
Act as

History

BlockEventDetailTx

Open a tab

The connected wallet becomes the creator and is marked joined; everyone else presses Join.

For agents and scripts

No site needed: node script/agent.mjs status 1 --testnet reads a tab (members, nets, pending expenses, settle plan); AGENT_KEY=… node script/agent.mjs cosign 1 --testnet --send is the operator loop: it approves only pending expenses of members who named it, inside the cap, and re-verifies; node script/agent.mjs verify 1 --mainnet audits a tab with no key. See docs/AGENT.md.