-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
LowLow severity security findingLow severity security finding⎈ QuantStampQuantStamp audit findingQuantStamp audit finding
Description
Severity: Low
Description
Two related issues with sentinel value handling:
1. NO_YIELDVAULT_ID can be registered
The sentinel value NO_YIELDVAULT_ID = type(uint64).max (line 108) is intended to represent "no vault", but _registerYieldVault() (lines 1478-1491) has no guard preventing this value from being registered as a valid vault ID.
2. CREATE requests use 0 instead of NO_YIELDVAULT_ID
When creating a CREATE_YIELDVAULT request (line 771), the contract uses 0 as the placeholder yieldVaultId. However, 0 can be a valid yieldVaultId (per comment at line 107), creating ambiguity. The comment at line 64 states it should use NO_YIELDVAULT_ID.
Recommendation
- Reject registering
NO_YIELDVAULT_ID - Initialize CREATE requests with
yieldVaultId = NO_YIELDVAULT_IDuntil completion assigns the real ID
Parent Issue: #15
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
LowLow severity security findingLow severity security finding⎈ QuantStampQuantStamp audit findingQuantStamp audit finding