some things I should look/ask for as not to be ripped off?
Few things that come into my mind (legal note: please do mind that I write only from my experience as being a contractor specifically in EU, and you should thread this only as a advice what kind of information you should research further - especially the second part - about contracts):
protecting the product from unauthorized redistribution
- keeping the project as a service (e.g. service in a cloud). You do not distribute code at all, just allow to rent a service (e.g. google drive/calendar/docs). I think it is best advice but not always applicable.
- have clear license/EULA clearly stating what you sell is only a license (not that it technically prevents from re-distribution, but in case it will happen at least law is on your side).
- aforementioned code obfuscation (but that is not always desirable)
securing your intellectual property when contracting developers
- you need to have a contract (specifics are per country) - in general it must be clear contract that you employ/contract a person or consultancy company in order to execute programming/consultancy services, and that as a result you are given any code/documentation along with all copyrights of that code/documentation. Additional to that, contract should state that any materials/documents/designs given buy you/your company are owned by you/your company and are under the protection of nondisclosure agreement (probably best to have separate document for that).
- an hourly/daily payment must be specified for the services
- your payments should be documented (avoid paying in cash, wire transfer is OK)
Those three points should come together to secure your copyrights (in some cases of contracts - depending of their type and local law - copyrights might be implied to be on one side or the other, usually unless explicitly stated in contract).