Optimize stake for biggest guaranteed profit. If both are selected it will optimize both stakes up to max liability.

Maximize profit on one side and 0 on the other. Say, you're playing odds bigger than 4 and you expect to win on lay side most of the time.