Y reserveX reservepool spot priceprice the lender uses
Couldn't start the 3D scene.

Flash Loan Oracle Manipulation: AMM Price Impact and the TWAP Defence

This simulator recreates the core mechanic behind DeFi's most infamous exploits: a flash loan used to distort a constant-product AMM's spot price for one block, tricking a lending protocol's price oracle into over-valuing collateral. Watch reserves shift in the pool as the attacker's swap goes through, a lending vault release borrowed funds against the inflated price, and the pool settle back down after the repay swap โ€” then switch the oracle from raw spot price to a time-weighted average and see the same attack turn unprofitable, exactly why every major lending protocol now defends against single-block price spikes.

Made with ๐ŸŸ  Blender ยท Three.js