Summary
In parseExecutionIntent() (src/lib/execution.ts), the amount defaults to "100" when none is detected:
const amount = extractAmount(normalized) ?? "100";
A user typing something like execute bridge from arbitrum to base (forgetting the amount) would get a quote and execute a $100 USDC bridge without ever stating the amount.
Impact
This is a fund-moving agent; silently picking a default amount removes the need for explicit confirmation and can result in unintended transfers of real funds.
Suggested fix
- Require an explicit amount and throw a clear error when missing (e.g. "Execution command needs an amount, e.g. execute bridge 25 usdc from arbitrum to base"), or
- Return the default only in a clearly-labeled preview/dry-run mode, never in the execution path.
Files
src/lib/execution.ts (line ~376)
src/lib/chat.ts (check whether the same default exists in chat-triggered execution)
Summary
In
parseExecutionIntent()(src/lib/execution.ts), the amount defaults to"100"when none is detected:A user typing something like
execute bridge from arbitrum to base(forgetting the amount) would get a quote and execute a $100 USDC bridge without ever stating the amount.Impact
This is a fund-moving agent; silently picking a default amount removes the need for explicit confirmation and can result in unintended transfers of real funds.
Suggested fix
Files
src/lib/execution.ts(line ~376)src/lib/chat.ts(check whether the same default exists in chat-triggered execution)