In secret bases you can collect a flag of each new secret base you find. I've noticed some bases have different color flags, which I assume means a different rank. How many flags to you need to get a new rank (silver rank, etc.)?
I found the list of ranks by number of flags obtained on GameFAQs forums:
Secret Base Guild Rank Rewards:
Bronze Rank - 30 Flags - Blackboard
Silver Rank - 100 Flags - Jukebox
Gold Rank - 500 Flags - Mood Lighting
Platinum Rank - 1,000 Flags - Confetti and Garchompite