@TermMax
I figured leveraging up on a lending protocol meant doing the looping myself, borrow, swap, deposit, borrow again, four or five separate transactions. Turns out that's not how TermMax does it.

When i first looked at this I literally thought the flash loan was mainly there for speed, just a way to skip a few steps and save time. The timing risk problem is underneath it was more interesting.

Manual looping means you're Exposed between every step, price cAn move on you mid loop and there's nothing you can do until the next transaction confirms. TermMax had to remove that gap entirely, not improve it.

So it uses the flash loan inside the same transaction. You put in your starting amount, the protocol borrows the rest of instantly, buys the collateral, locks everything into one GT, all before the transaction even settles. Either the full position executes at the price you saw, or none of it happens.

Ironic part is the same protocol that builds you a leveraged position also has a feature called Smart Unwind that closes it for you automatically once your target hits, no input from you at that point either.

Only thing I can't figure out is what happens if price jumps straight past to your target between blocks, does Smart Unwind still execute at your number or just whatever price lands when it finally fires.

#TermMax $GRVT #Alphanetwork $EDGE