The design of voluntary agreements in oligopolistic markets