Skip to content

Commit

Permalink
audit: fee cannot be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelBits committed Sep 30, 2022
1 parent 1311e04 commit cc8b0b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ contract Vault is SemiFungibleVault, ReentrancyGuard {
error EpochEndMustBeAfterBegin();
error MarketEpochExists();
error TimeLocked();
error FeeCannotBe0();

/*///////////////////////////////////////////////////////////////
IMMUTABLES AND STORAGE
Expand Down Expand Up @@ -322,6 +323,9 @@ contract Vault is SemiFungibleVault, ReentrancyGuard {
if(_withdrawalFee > 150)
revert FeeMoreThan150(_withdrawalFee);

if(_withdrawalFee == 0)
revert FeeCannotBe0();

if(idExists[epochEnd] == true)
revert MarketEpochExists();

Expand Down

1 comment on commit cc8b0b7

@0xnexusflip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testFeeCannotBeZero() working as intended

Please sign in to comment.