Lack of Tracking for Redeemed mTBILL Tokens in RedemptionVault Contract
Summary
The RedemptionVault.sol contract does not track the redemption of mTBILL tokens by users, which leads to an incomplete record of user balances and activities. This issue can result in discrepancies between the amount deposited and the amount redeemed by users.
Vulnerability Detail
In the DepositVault.sol contract, the totalDeposited mapping tracks the total amount deposited by each user:
require(amountTBillIn > 0, "RV: 0 amount");
However, the RedemptionVault.sol contract does not update this mapping when mTBILL tokens are redeemed. As a result, there is no record of the amount of mTBILL tokens that have been redeemed by each user. This lack of tracking can lead to issues in accurately determining user balances and can cause inconsistencies in the system's overall accounting.
Impact
The lack of tracking for redeemed mTBILL tokens can lead to inaccurate user balance records, causing potential disputes and confusion in calculations.
tpiliposian
high
Lack of Tracking for Redeemed mTBILL Tokens in RedemptionVault Contract
Summary
The
RedemptionVault.sol
contract does not track the redemption ofmTBILL
tokens by users, which leads to an incomplete record of user balances and activities. This issue can result in discrepancies between the amount deposited and the amount redeemed by users.Vulnerability Detail
In the
DepositVault.sol
contract, thetotalDeposited
mapping tracks the total amount deposited by each user:However, the
RedemptionVault.sol
contract does not update this mapping whenmTBILL
tokens are redeemed. As a result, there is no record of the amount of mTBILL tokens that have been redeemed by each user. This lack of tracking can lead to issues in accurately determining user balances and can cause inconsistencies in the system's overall accounting.Impact
The lack of tracking for redeemed
mTBILL
tokens can lead to inaccurate user balance records, causing potential disputes and confusion in calculations.Code Snippet
https://github.com/sherlock-audit/2024-05-midas/blob/main/midas-contracts/contracts/RedemptionVault.sol#L61-L77
Tool used
Manual Review
Recommendation
Implement a mechanism to update the
totalDeposited
mapping in theDepositVault.sol
contract whenmTBILL
tokens are redeemed.