Is there a way of automatic discounting renewals based on referrals?
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.