fix typos README.md

Signed-off-by: iwantanode <87604944+tudorpintea999@users.noreply.github.com>
This commit is contained in:
iwantanode 2023-11-11 12:13:21 +02:00 committed by GitHub
parent a2565f4d66
commit 4ec415599b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,14 +13,14 @@ This program implements a bank that issues tokens to users and allows users to d
2. A user deposits tokens via the `deposit` function.
3. Upon a user's request to withdraw, the bank calculates the appropriate amount of compound interest and pays the user the principal and interest via the `withdraw` function.
Note that the program can be easily extended to include addition features such as a `transfer` function, which would allow users to transfer tokens to other users.
Note that the program can be easily extended to include additional features such as a `transfer` function, which would allow users to transfer tokens to other users.
## Bugs
You may have already guessed that this program has a few bugs. We list some of them below:
- `withdraw` can only be invoked by the bank. A malicious bank could lock users' tokens by not invoking `withdraw`.
- `withdraw` fails if the sum of the interest and principal is greater than the user's balance.
- User's can increase their principal by depositing tokens multiple times, including immediately before withdrawl.
- Users can increase their principal by depositing tokens multiple times, including immediately before withdrawal.
- Integer division rounds down; if the calculated interest is too small, then it will be rounded down to zero.
Can you find any others?