Assessment reports>GTE -- Perp>Informational findings>Inconsistency between ,processWithdraws, and ,previewWithdraw
Category: Business Logic

Inconsistency between processWithdraws and previewWithdraw

Informational Severity
Informational Impact
N/A Likelihood

Description

The GTL contract inherits from ERC-4626. However, in this implementation, the standard withdraw function is not supported; users cannot directly withdraw their assets. Instead, withdrawal functionality is available only through queueWithdraw and the custom admin-only processWithdraws function.

The processWithdraws handles the actual processing of queued share amounts by calculating the corresponding asset amount to be redeemed. The previewWithdraw accepts an asset amount as input and returns a share amount, which is reversed from how processWithdraws operates.

This inconsistency between previewing and processing withdrawals can be misleading.

Impact

Users and integrators may misunderstand the withdrawal flow, especially when using previewWithdraw, potentially leading to incorrect assumptions about share-to-asset conversions.

Recommendations

Align the function's logic or clearly document the difference in behavior and intended use.

Remediation

Zellic © 2025Back to top ↑