So I assume the yield you’re obtaining on the deposit_rewards+borrow_rewards is greater than the max_borrow_factor*borrow_rate – deposit_rate; otherwise such a strategy wouldn’t make sense in deploying.
So the first thing to establish is that the maximum you can borrow follows a convergent geometric infinite sum, if you recall from calculus the formula is a*max_borrow_factor/(1-max_borrow_factor) where max_borrow_factor is greater than or equal to 0 but less than 1 and a is your initial deposit. That means max deposit will be max_borrow_factor/(1-max_borrow_factor).
A ponzi scheme is one where old investors are paid off from inflows of new ones. The strategy you’ve laid out more closely resembles that of leveraged arbitrage.
Now the question is why would a platform like compound allow users to arb them? I can’t tell you exactly why, however my best guess is that they view this as an user acquisition cost. Market participants who engage in this strategy will also increase the project’s TVL. You will have users of varying levels of sophistication and risk preferences, so not everyone will go and arb them to the maximum.
If I had to speculate further, I’d guess that opportunities like this will be limited otherwise it’ll eventually lead to the devaluation of their token.