← API Security

Two Withdrawals and a Retry

Step through stale wallet reads, a locked debit, and a response lost after commit.

Intermediate20 min·updated 2026-11-15

You’re reading a preview. Premium includes the full lesson and specialist practice. View the full curriculum.

Start with the ordinary operation

WalletDesk starts with 100 units. Two valid withdrawals of 80 overlap, and a later example loses the response after commit. Follow wallet balance, ledger entries, and retry scope as separate pieces of state.

Continue with Premium

Continue API Security with the complete lessons, guided exercises, code-review challenges and assessments.

In the full lesson

  • Predict before revealing
  • Explain the repair
  • Check the boundary in another application
Two Withdrawals and a Retry