Building the betting contract