Depends on the state, In California they can’t be be paid below minimum wage.
So, a waiter should always earn at least minimum wage, but can earn more if tips are good.
However, in practice, there are problems with this system. First, waiters who don't earn lots of tips usually get the bad shifts, then fired. Second, lots of room for wage theft.