The backend for the online betting