What is thr race condition in this protocol?
1-insert debit card into debit machine
2-debitcard machine determine current value of card in dollars which is stored in value x
3-user insert dollars into debit card machine ,and the value of inserted dollars vstored in value y
4-user press enter
5- machine write value x+y
where is race condition?
how an attack might exploite it?
how to modify this protocol to prevent or make race condition difficult