Obviously, a contract to ship drugs to one another is illegal on it's face, but for example a law that stated same sex people can not engage in a contract to sell ice cream to one another would be struck down without blushing.
I do believe there does need to be a constitutional amendment on this one.
Let's just forget the ceremony. If two guys or two gals write a contract that states, I agree to reside with you forever. I agree to provide for you no matter what circumstances befall you. If you or I engage in sexual relations with somebody other than within this contract, we both have the option to void this contract. We are also free to void this contract at a penalty of 50% of the joint assets that we have amassed since it's date of existence if we so choose.
Ok, these two gals sign this contract. One with better legal and stylistic language of course. One of these gals hits the lottery, and decides, hey I don't want to share, the country doesn't recognize our relationship, so I will take a skate here.
The other partner petitions the court for the terms of this agreement to be upheld, the defendent uses the argument that since they are lesbians and this is a quasi marriage contract, it is void because of the illegality of gay marriage.
That is how it is going to be decided by the courts I believe. Something along these lines will bring it to the Supremes. Legally, I don't see how they can uphold the Unequal treatment. It is all fine and good to say that this country has moral values, and history in that regard, so you can skip gay marriage, but this is a contract, entered in good faith at the time it was signed.