What Is the Concept of ‘Revert’ in Smart Contract Execution?
A 'Revert' is a function that, when executed within a smart contract, immediately stops the contract's execution and undoes all state changes that occurred during that transaction. This is often triggered by an error, a security check failure, or a condition specified in the contract (e.g. insufficient funds).
While the state changes are undone, the consumed Gas is still paid.