Part of the institution of voting is the idea that you can vote for anybody you want. Anyone at all. You can vote for yourself for every office. Nobody will blame you if you vote for Kodos. You can even vote for DraculaCunt.
Another part of the institution of voting is the secret ballot. A voter should not be able to prove that he voted in a particular way, because that allows voters to sell their votes. It is for exactly this reason that election laws (Minnesota is no exception) ban identifying marks on ballots, and provide that any signature, initials, SSN, or other identifying mark invalidates a ballot in its entirety.
The problem is that liberal write-in laws compromise the secret ballot. Suppose that Barack Obama wanted to pay me to vote for him. All I have to do is tell him, before Election Day, that I am going to write in “Lizard People” for State Comptroller. Because nobody else in my precinct is likely to do that, Barack can easily single out my ballot, check that I voted for him, and drop my check in the mail. For that matter, I could just write my own name in. A more subtle way to do it is to vote for Barack, and use the remaining bubbles on the ballot form to encode a message (e.g., in ASCII). This would work well in California, where elections average well over four thousand ballot initiatives each.
Are secret ballots and write-ins compatible? Maybe. Use of a shorter ballot can help avoid this attack. (The Short Ballot Assumption is not a new idea.) One way would be to cast every race separately. That is, instead of voting every race on the same piece of paper, and submitting it all at once, put the Presidential race, the Senate race, the House race, etc., each on their own slip of paper, and toss them all into the ballot box. (And stir regularly.) This effectively means that voters vote on multiple ballots of one race each, so the vote-selling from above doesn’t work.
Could you still sell a vote if there was only one race on the ballot? It’s a lot harder. Assuming the Lizard People Rule is still in effect (i.e., a name in the write-in blank counts as a write-in vote, even if the bubble isn’t filled in), there isn’t as much room to convey information. Specifically, it is no longer possible to both vote for a candidate on the ballot AND fill in the write-in blank.
Unusual markings are still a problem; Minnesota’s generous voter intent law means that ballots where the voter marks one bubble, crosses it out, and marks another are accepted, and more complicated markings are accepted as well. This could be mitigated by enforcement of a standard mark (perhaps a stamp, rather than a pen). Furthermore, a lot of the “strange” marking patterns are probably caused by voters making a mistake and attempting to correct it using X’s and arrows, rather than just going to get a clean ballot and starting over. Use of a separate ballot per race would help avoid this, as it means there is a much lower cost to starting over.
One potential complaint is that this scheme would require too much paper, and too much paper management. But I think it solves more problems than it creates.

That’s nice, in theory. But do you have any actual examples of someone selling their vote?
No, and I don’t have to have an example. This is a post about theory.
OK, I’ll elaborate a little more, now that I’m actually out of bed. (Well, I’m still sitting on the bed. But I have moved in the meantime, and I think that for Christmas
morningafternoon, that’s not a bad accomplishment.)The identifying-mark law is aimed at preventing vote-selling that may or may not occur. This is the same way. In addition, the goal is to avoid debates over whether or not a write-in is an identifying mark; such debates were a, if not the, main source of challenges during the MN-Sen recount. (I watched way too much of the feed at The Uptake.)
Most of the challenges were rejected (the votes were counted). That’s my preferred outcome—I’d rather err on the side of counting votes—but it does open the window for a potential vote-seller to use the write-in attack, knowing that there is solid precedent that would ensure the ballot is still accepted.
Cynic, while I can’t think of any specific examples of selling votes for cash, non-identifiable ballots are very important to prevent transactions of the form “I vote for you and write in Lizard People for the next race, in exchange for getting to keep both of my legs”. We’re lucky that in the US the positive feedback of (relatively) clean and trustworthy elections means we’re not as worried about secret ballot compromises, but it took many reforms to get us to this point.