T09 · Insecure Skill Coding Practices
- Location
SKILL.md:43- Finding
Blind Signing of Server-Generated Financial Transactions
- Content
View full analysis
`. If `vaultCount > 0`, use `vaults[0].vault` and **skip step 4**. Creating a second vault is almost never what the user wants. 4. **Create your vault (once)** — `POST /v1/create-vault` body `{}` → `{to,data,value,chainId}`. Sign, broadcast, wait for the receipt, then re-run step 3 to get the vault address. 5. **Custom weights (optional)** — `POST /v1/set-weights` body `{"vault":"0x…","weightsBps":[4000,2000,2000,2000]}` → unsigned tx. Order is NVDA, META, AAPL, GOOGL. Each weight can move at most 2000 bps per call. Default is 2500 each. 6. **Buy** — two calls, one on-chain transaction: - `POST /v1/buy` body `{"vault":"0x…","usdc":"2000000","permit":true,"owner":"0xYourAddress"}` → `{typedData}`. - Sign `typedData` off-chain with `eth_signTypedData_v4` (free, no gas). - `POST /v1/buy` again with `{"vault":"0x…","usdc":"2000000","permit":{"deadline":,"signature":"0x…"}}` → ONE unsigned `depositWithPermit` tx. Sign and broadcast with gas limit ~3,000,000. - No `approve` step is needed. Omit `permit` entirely only if your wallet cannot sign typed data; then you get `{steps:[approve, deposit]}` to send in order. 7. **Check it** — `GET /v1/vault/` → `navUsdc`, current vs target `weightsBps`, `rebalanceNeeded`. 8. **Rebalance (optional)** — `POST /v1/rebalance` body `{"vault":"0x…"}` → unsigned tx. Only when `rebalanceNeeded` is true or after changing weights. 9. **Sell / cash out** — `POST /v1/redeem` body `{"vault":"0x…","shares":"","inKind":false}` → unsigned tx that burns shares and pays USDC. `inKind:true` returns the raw stock tokens instead and works even if pricing is unavailable. `shares` comes from step 3. 10. **Send / gift (optional)** — `POST /v1/send` b ...[truncated 2067 chars]- Remediation
View remediation
