Source on GitHub
Smart Contract Address
Testing and Issues
You can test this entry and submit issues during the testing period of the Blockchain Contest, Stage 2 contest.
Entries with serious issues will not be able to win the contest, but even minor issues might be important for overall results.
Another thing to remember are transaction fees that will eat referral cut. I think a better approach would be to implement standard wallet, but also reserve a small fee with each transaction that can only be withdrawn by referrer address or key.