Opening an account
The factory deploys a minimal clone of OtsukaiAccount at an address derived from your wallet and a salt. The app uses salt zero, so your account address is known before it exists. createAndFund creates it and moves your first deposit in the same transaction, with a USDG permit you sign in the wallet.
Funding and withdrawing
deposit(amount) and depositWithPermit(...) add USDG; anyone can top up an account. withdraw(to, amount) is for the owner only and works at any time, paused or not, for any amount up to the whole balance. Nobody else can move the principal: not the agent, not the factory owner, not Otsukai.
Daily limit and per-call cap
Each key carries two numbers in USDG (6 decimals):
| Limit | Checked as | When it fails |
|---|---|---|
| Per-call cap | amount <= perCallMax | OverPerCallCap |
| Daily limit | spentToday + amount <= dailyLimit | OverDailyLimit |
The day is the UTC day, block.timestamp / 1 days. The counter belongs to the key, so two keys on the same account have separate budgets.
research-bot
DAILY LIMIT $0.10 · CAP $0.02
Pause
pause() stops every key on the account at once; unpause() brings them back. Use it when you are not sure which key leaked.