Organizations that have fair compensation practices succeed in retaining talented employees. You do not have to overpay talented employees, nor do you have to make compensation the most important value of the organization. Fairness in terms of equity, based on market conditions, results in long-term retention of talent. When individuals are compensated unfairly, it is inevitable that you will lose people. This applies at both ends of the compensation spectrum.
Underpaid employees leave very quickly.
Paint an engaging company vision, and show employees how they benefit from that vision. It is very important that the employee's contribution and reward in relation to the overall vision of the organization are clear. Just having a clear company vision without showing the benefits of that vision to the employee is a fairly common mistake. Give regular feedback. Feedback and the recognition of excelling and growing talent are very powerful retention tools.