Add notes on reentrancy

This commit is contained in:
bt3gl 2022-06-21 17:08:54 -07:00 committed by GitHub
parent 3598da0b0c
commit 5d26b5c842
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1 +1,18 @@
## Notes on Reentrancy
## Reentrancy
<br>
* When a contract calls an external function, that external function may itself call the calling function.
* To prevent this attack, a contract can implement a lock in storage that prevents re-entrant calls.
<br>
### References to learn about reentrancy
<br>
* [Solidity docs](https://docs.soliditylang.org/en/latest/security-considerations.html#re-entrancy)
* [DASP](https://www.dasp.co/#item-1)
* [SWC](https://swcregistry.io/docs/SWC-107)
* [Not so smart contract](https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy)