So this is my liquidation bot from fall 2020 - its completely outdated and I removed my private key, relevant addrs, so you can stub in your own but it could be a good way to start thinking about how to do liquidations.
The bot also has lots of leftover ideas about uniswap arbitrage, etc.
Its not for you to run, but for you to learn from (you can't compile it because i removed the custom contracts bindings)
if you learned from this, or appreciate it - feel free to donate to my donation addr here:
0xb6368841DeB18FD7010EBfB8842d5fc2DFDEC272
thank you