Open sneilan opened 11 months ago
what factors would the risk checks need to consider other than the user's balance? (I am interested in contributing to this project)
Totally! Here's some I thought of for a server like this that will eventually be public facing. They prevent DDOS attacks and out of memory crashes. There are other types of risk factors involving margin, options, total market activity but that is not on the roadmap yet.
1) How many trades a user has open. Is the user trading too much? (too many trades open = server runs out of memory) 2) How big is a trade relative to other trades in the market (a huge trade means a long time to fill it. potential DDOS attack) 3) How many trades are live across all users? (Should rate limit trades when too many trades open to prevent server crashing)
It may be hard to implement these features without user accounts.
When a user is first created, they should have a balance gifted to them by the administrator. Perform risk checks for every trade and make sure user has enough money in their wallet.