Introducing Sierra, a safe intermediate representation for Cairo and StarkNet aimed at improving contract safety and execution efficiency. Sierra serves as a middle layer between Cairo source code and Cairo assembly (Casm). It addresses safety issues by enabling proof of both successful and failed transactions. Sierra’s design prioritizes safety, performance, and simplicity, allowing compilers to produce efficient Casm code while preventing complex optimization processes.