Regardless though, something feels very wrong about working very hard on something that can provide a huge monetary gain for your superiors, with the very real risk that you might not get anything in return. I operate (and have always operated, due to the horror stories I've heard) the same way you seem to do now: Do nothing but what's expected of you for the company, and only do more than what you're paid for if you've got leverage to actually be compensated for the real effort that you put in.
Computer people are, by and large, way too weak in exerting their rights. Whenever I hear a story of a nerd getting screwed over in a negotiation or liquidity event, I think of a small, weak kid getting his lunch money taken by a bully and not having any power to do anything about it. We're grownups and we have a lot of tools at our disposal to push back against injustices like these. It's like Nassim Nicholas Taleb said - sometimes you just need to sue someone. It's a matter of respect.
With my current manager it took me some time to understand that his promises were written on water. Add to that a daughter, a mortgage and the crisis, and he probably felt it safe enough to screw me. I hope to prove him wrong soon enough ;)
The flip side is that the project did succeed, this success brought a lot more money than originally expected to my firm, and I didn't get a fair bonus. Now I only work (serious) overtime if they agree to pay me beforehand, and I'm working on my startup(s) on the side.