Skip to content

Instantly share code, notes, and snippets.

@MitchPierias
Last active December 21, 2018 13:24
Show Gist options
  • Save MitchPierias/486c8d0dc3818ed0e144deb41ce5f3b1 to your computer and use it in GitHub Desktop.
Save MitchPierias/486c8d0dc3818ed0e144deb41ce5f3b1 to your computer and use it in GitHub Desktop.
Order of Operations in Distributed Application Actions

OOO in Distributed Applications

For security reasons, it's important to remember the order of which you perform operations within the actions of your distrubuted application.

  1. Checks
  2. Effects
  3. Interactions

Performing operations in this order will prevent the vulnerability seen in the infamous DAO hack (Google it), where an attacker opened a series of withdrawals, and transfered funds before the contract could update it's balance data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment