Security specific features in Sway

Just off the top of my head:

  • Type safety everywhere. E.g. for Identities (contracts vs EOA addresses)
  • A rich, maintained standard library which does things once and does them right
  • Compile-time reentrancy checks
  • Explicit storage access annotation for functions
  • Namespaced storage variables (storage.myvar)
  • Zero-cost abstractions, meaning no need for obscure gas-golfing techniques that sacrifice readability and security for performance.
  • And many more :slight_smile:

The Fuel book gives a higher level overview of the design choices in the VM and the language, including some comments on safety and differences with Solidity.