Cyfrin / solidity-by-example.github.io

Solidity By Example
https://solidity-by-example.org/
MIT License
614 stars 201 forks source link

Added security improvements to Vault solidity code #239

Closed gowtham-the-dev closed 2 years ago

gowtham-the-dev commented 2 years ago

Changes Made:

  1. Added logic in deposit and withdraw to mint and burn shares only if the token transfer is successful
  2. Added logic in withdraw to revert if the caller doesn't have enough shares balance

Files Changed:

  1. src/pages/defi/vault/Vault.sol

Kindly let me know if any changes needed. Thanks 🙂.

t4sk commented 2 years ago

Thanks for the PR but this won't be merged for the following reasons

gowtham-the-dev commented 2 years ago

Okay. Got it @t4sk.