We have an offer for our existing members, that whenever any new member enrolls based on existing member's recommendation, that recommending member gets a fixed discount on his nearest membership fee. He can convinced as many new members, as he is able to do and by doing this he gets this discount for each of recommended new member and thus reduces his membership fee. Is it possible to calculate his discount every time he attempts to renew his membership? Any suggestions how to implement such functionality (CiviCRM 4.7 on WordPress)?
I think you'd need to write a custom extension to handle this.
I would create a custom field of type "contact reference" on your membership form so people could indicate their referring contact. Of course, this exposes some (or all) of your contact names to the public, but it's better than manually connecting the records.
Then you could write a simple extension that queries for the number of contacts that are referenced by this field on other contacts to calculate a discount. Optionally, you could also clear the fields after that to prevent the discount from being applied to a future renewal.