The system the US help setup in Iraq was that half the house was local represention, then the wasted votes (didn't get your candidate locally, your candidate votes over majority) are given to the party they represent to buy seats in the other half of the house.
So the second half should be proportional to the error in the local representation.
This is true with real world contracts too, that's why people hire lawyers - they understand the "code" of contract law.