openpredictionmarkets / socialpredict

Easy to Deploy Prediction Market Platform
https://github.com/openpredictionmarkets/socialpredict
MIT License
54 stars 10 forks source link

Test Race Condition Which Breaks Maximum Debt Constraint #297

Open pwdel opened 3 weeks ago

pwdel commented 3 weeks ago

From @ajlacey

Within bethandler...

🤔 I wonder if we can generate a race condition where the balance could drop below the maximum debt? Like if we made 2 simultaneous requests that wouldn't break it individually, but would together?