How to add another team for betting in smart contract?

This is the source of my contract:

1.)My concern are how can I add more teams for betting? My smart contract betting.sol compose of 2 teams only. Is there a way of add more teams?

2.)I also want to add a tax for betting, Example, when betting is over, the top 3 teams will receive the rewards deduct by the tax, which tax goes to a specific address or to the contract.

Pretty much the same, and you may want to find a more generic algorithm for dealing with more than two outcomes. This type of betting is called pari-mutuel betting. Not hard to find the math.

1 Like