I've been on management teams of software companies are am somewhat familiar with compensation of contract developers.

The most important question is who owns the rights of this advanced version? If he does, then I believe that 20% is more than fair and you should jump at it.

If you are the clear owner of the IP rights to the advanced version, which would probably depend on whether it uses source from the version written under contract, and also the specifics of your original contract with him, then 20% is too low.

If it is not clear who owns the IP, then you can open yourself to a nasty legal battle with him if you try to sell it yourself.

IMHO, you need to have a good understanding of who owns what. That probably means consulting a good intellectual property lawyer and a good contract lawyer (2 different lawyers). Then you'll know where you stand.

I know from my experience that if you used *any* source code or documentation from the version you wrote under contract, then it's almost certainly tainted unless you have a clause in your original contract where you retain some ownership (which, let's face it, he probably would never agreed to so you probably don't have this). That means he wouldn't need to give you *anything* most likely, and you want to come to an agreement -- in writing -- quickly and before he consults a lawyer that tells him he doesn't need to give you anything.

FWIW,

Jim