That indemnification clause is utterly ridiculous in this context. Our company works with a lot of governments, and indemnification clauses of this type are extremely common any time there is software involved. What's crazy about this circumstance is that the participants aren't contractors writing code for the city... Or are they? Based on the indemnification requirement, it seems that's how the city views it.
It appears un-enforcable to me (IANAL, but I do deal with this shit a lot). However, just because a contract can't be enforced doesn't mean it won't cause you trouble. I'd walk before I signed a contract like this at a hackathon. No "chance" at a prize is worth this kind of exposure.
No matter how the city of Detroit wants to spin their terms contract, they owe the people who decline to sign it a refund on their entry fee.
$20, exclusive IP ownership, indemnification, etc
and the participant gets:
to do work (and one person gets $5k, and two people get gift cards)
Where's the quid pro quo? Seems like there's no consideration for one side.
Edit: the contract says that providing a place to work (which will be done at their direction, supervision, and for their sole benefit) and the 3 prizes are the only things they'll provide. Is that enough for this to be considered a fair/enforceable contract?