The question likely says it all, but, in the treasure room in the Sanctuary is a key up high. As you gather money, the pile grows and you can climb on it. I’m wondering exactly how much gold you are required to accumulate to be able to reach the key. I assume the key opens the chest in the same room at the bottom of the pile.
I believe the number is 5 Million. But here is the thing. Once you have that much the chest will be covered in gold and inaccessible.
To get rid of it all you have to give your money to the royal treasury which you can do if you are the king. If you aren’t there yet keep playing.