Inconsistency between processWithdraws
and previewWithdraw
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.