Description: Users redeem a given amount of index tokens in exchange for collateral assets from the provided vault after the withdrawal delay period has elapsed. The VaultRouterBranch::redeem
function calculates the assets minus the redeem fee as shares, sends the vault shares to the user, and transfers the redeem fee to the recipient.
The getVaultAssetSwapRate
function calculates the swap rate (in shares) for a given amount of collateral (assetsIn) when deposited into a specific vault.
The getVaultCreditCapacity function returns the net credit capacity of the given vault, taking into account its underlying assets and debt.
The same issue applies to the fee recipient, who may also receive less than the expected fee.
Impact: 1. There is no explicit check to ensure that the asset price is greater than zero, which could lead to a division by zero error.
Users may receive less redeemable assets than expected.
The fee recipient might also get less than the expected fee due to this issue.
Recommended Metigation: A check should be added to ensure that the asset price is not zero before performing calculations.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.