BranchPort._checkTimeLimit() reverts with a genaric overflow/underflow error @ BranchPort#L493 when a user tries to manage() @ #L152 their tokens. This may lead to user frustration when using the protocol if users are not tracking their daily limits and may affect user adoption.
POC
Update testManageExceedsDailyLimit by commenting out vm.expectRevert() line @ RootForkTest.t.sol#L1498
Run test:
forge test --match-test testManageExceedsDailyLimit
Reverts with generic Arithmetic over/underflow error
Failing tests:
Encountered 1 failing test in test/ulysses-omnichain/RootForkTest.t.sol:RootForkTest
[FAIL. Reason: Arithmetic over/underflow] testManageExceedsDailyLimit() (gas: 3032225)
Recommended Mitigation Steps
Consider adding a more verbose revert() statement for end users to let them know they have exceeded their daily limit. This is a quality of life enchancement for end users that should help with user adoption (i.e.: reduce end user frustration).
Lines of code
https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchPort.sol#L493
Vulnerability details
Impact
BranchPort._checkTimeLimit() reverts with a genaric overflow/underflow error @ BranchPort#L493 when a user tries to manage() @ #L152 their tokens. This may lead to user frustration when using the protocol if users are not tracking their daily limits and may affect user adoption.
POC
Update
testManageExceedsDailyLimit
by commenting outvm.expectRevert()
line @ RootForkTest.t.sol#L1498Run test:
Reverts with generic Arithmetic over/underflow error
Recommended Mitigation Steps
Consider adding a more verbose revert() statement for end users to let them know they have exceeded their daily limit. This is a quality of life enchancement for end users that should help with user adoption (i.e.: reduce end user frustration).
Assessed type
Error