If it costs the producer $10 to produce a ton of corn, any sale at above $10 is a profit, no matter where price goes after the agreement is reached.
If he doesn't sell the corn, its going to cost him additional money to the $10 production cost to deal with it..
So if he sells at £12, he always makes a gross $2 a ton / 20% profit. Even if corn goes to $100 a ton, he's still in the money.
The buyer is down $12 but has the corn. If corn goes up to $14, he's saved $2 a ton. If corn goes down he's paid more but he still has the corn. There is always the possibility that if corn prices fall, it gets bought up by bigger players or shipped out to other markets and our guy ends up with less corn than he wanted, so he has to use an alternative feed or source corn from another market, both adding to his costs.