Pre-auditThree days of senior audit time for $1,500, credited in full toward your Zealynx audit.3 audit days, credited toward your auditSee how →
L-19·

`_computeMaturityDate` `uint32` timestamp limits protocol lifespan

Not reportedoptionsleverageblack-scholes
TL;DR

The _computeMaturityDate function in PositionParams.sol casts maturity timestamps to uint32 before returning them:

Severity
LOW
Method
MManual review
CAT.

The _computeMaturityDate function in PositionParams.sol casts maturity timestamps to uint32 before returning them:

solidity
function _computeMaturityDate(uint256 period) internal view returns (uint32) {
uint256 maturityTimestamp = block.timestamp + period;
maturityTimestamp -= (maturityTimestamp % 1 days);
maturityTimestamp += 1 days - 1;
return uint32(maturityTimestamp); // <-- Cast to uint32
}

This imposes a hard limit on the maximum representable timestamp. A uint32 can only represent Unix timestamps up to 4,294,967,295, which corresponds to February 7, 2106. After this date, timestamps calculated using block.timestamp will overflow when cast to uint32, resulting in incorrect maturity dates.

This function is used in core protocol components, including option creation (Strategy::_create) and signature verification (OperationalTreasury::_checksOnBuy).

While this limitation is far in the future (approximately 81 years from the current date in April 2025), it represents a hard end-of-life for the protocol in its current form unless addressed. For a financial protocol potentially designed for long-term operation, this creates an unnecessary and avoidable time constraint.

Replace the use of uint32 for maturity timestamps throughout the protocol with a larger unsigned integer type.

02Section · Report provenance

Report provenance

Published by Pashov Audit Group, with Carlos (Bloqarl) participating as a contractor. The source report states that its fixes review was not fully completed; no final remediation disposition is recorded for this finding. Read the full report.

L-19