It would give you the best value purchase based on how much coins you have. And it would always end with 5 or 0. Example:
Sword lvl 421
Use smart buy
Sword lvl 450
Use smart buy
Sword lvl 500
Arrow lvl 489
Smart buy
Arrow lvl 500
Axe lvl 444
Smart buy
Axe lvl 450
Something like that. You can switch between smart buy and buy max clicking the Buy Max button
