You need to earn at least 15k gold to spend 50k gold
Selling an item back to the shop refunds 70% of its purchase price. You can also sell items purchased with refunded gold. That means you can spend X, then recover X*0.7, then spend that, then recover X*0.7*0.7, and so on, until you're buying pots. Mathematically, it's a geometric convergence, so if you could buy and sell items for infinitesimal fractions of a gold, you could spend 3 and 1/3 times as much as you earned (including starting gold).
∞ ∑ 0.7^n = 3 1/3 n=0
50k divided by 3 1/3 is 15k. This is doable in one or two matches, as long as you remember to return to the shop and do some buying and selling before the game finishes.