At the outset of an audit, your primary mission is to grasp the inner workings of the protocol at a high level. With the aid of GPT, you possess a powerful tool to streamline complex code, clarify variable names, remove unnecessary comments or events, reduce the code by substituting certain arguments. All of this accelerates your immersion into the protocol.
Let’s embark on this with a practical example – simplifying the liquidate_extended()
functions from crvUSD [→see code]
The code of these functions is fed into GPT-4, and prompts are employed one by one, watching the result: