sherlock-audit / 2022-10-illuminate-judging

3 stars 0 forks source link

pashov - Maturity expiration check is missing for `Sense` in `Redeemer.sol` #172

Closed sherlock-admin closed 2 years ago

sherlock-admin commented 2 years ago

pashov

medium

Maturity expiration check is missing for Sense in Redeemer.sol

Summary

The implementation in Redeemer.sol for the Sense protocol is missing maturity expiration check

Vulnerability Detail

All other protocol integration's redeem() functionality check for maturity expiration like

if (maturity > block.timestamp) {
            revert Exception(7, maturity, 0, address(0), address(0));
        }

But this is missing for Sense and should be added

Impact

If any code integrates with this and tries to do a redeem for Sense it will revert since maturity time has not passed.

Code Snippet

https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L342

Tool used

Manual Review

Recommendation

Add a maturity expiration check in the redeem() method for Sense protocol

sourabhmarathe commented 2 years ago

In the case of Sense, we expect the redeem call to revert in the event of a call prior to maturity to redeem.