Back when prices spiked in 2008, I asked a gas station owner about that, he said that the contract he signed with the oil company provider essentially gave them the right to set his prices- and they processed his credit card transactions so they could enforce the deal. If he charged more than they wanted him to, his next set of tankers were priced even higher than everyone else's. If he charged less, they would keep the price for his next set of tankers the same and make him eat the difference. So he pretty much always charged the prices that they told him to. Their prices were set "by a computer" in ways that he didn't understand at all, but he carried them out, because that's what the contract said.