merlinboii - The protocol will cause user fund losses due to misalignment between expected and actual token redemption processes #41
Labels
Non-Reward
This issue will not receive a payout
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
merlinboii
Medium
The protocol will cause user fund losses due to misalignment between expected and actual token redemption processes
Summary
The misalignment between the expected token redemption process and its actual implementation may cause temporary loss of funds for users. According to the
High-level summary: main flows short description - mBASIS redemption vault with swapper
documentation:The mBASIS redemption vault with swapper should allow the
BUIDL
variant to perform similarly to the mTBILL redemption vault. However, the current code does not support all cases when using the BUIDL variant as the mTBILL redemption vault, leading to potential discrepancies and user losses.Furthermore, the
README: Q: Additional audit information
specifies that any discrepancies between the specification and the code are reportable issues.Root Cause
In
MBasisRedemptionVaultWithSwapper.redeemInstant()
, when usingRedemptionVaultWithBUIDL.redeemInstant()
as anmTBILL
redemption vault, the protocol is expected to handle differenttokenOut
options likeUSDC
orWBTC
.MBasisRedemptionVaultWithSwapper.redeemInstant()#L134-L164
However,
RedemptionVaultWithBUIDL.redeemInstant()
only processes redemptions withUSDC
as thetokenOut
. If a user requests redemption with anytokenOut
other than USDC (e.g., WBTC), the USDC transferred from theRedemptionVaultWithBUIDL
gets stuck in theMBasisRedemptionVaultWithSwapper
contract, and the user does not receive their intended redemption.RedemptionVaultWithBUIDL.redeemInstant()#L86-L156
Although the admin has control over the Liquidity Provider to transfer the
mBASIS
back to the user and withdraw the stuckUSDC
for that user, this misalignment between the code and the documentation leads to potential losses for users, as this contract is expected to support all possible cases.Internal pre-conditions
There are no internal preconditions for this issue, as users can encounter the vulnerability when interacting with the mBASIS redemption vault with the swapper that integrates with the mTBILL redemption vault with BUIDL.
External pre-conditions
User needs to redeem using a whitelisted payment token other than
USDC
for this vault.Impact
The protocol cause a temporary loss of funds for users due to discrepancies between the expected behavior described in the documentation and the actual implementation.
Mitigation
Typically, all redemption vaults are designed to support both instant and request-based redemptions and handle whitelisted tokens consistently. Therefore, restricting this vault type to accept only USDC as the whitelisted payment token will reduce the standard vault design's flexibility and prevent users from redeeming other tokens.
As
BUIDL
is only intended to redeem 1:1 with USDC, as stated in theHigh-level summary: main flows short description - Redemption vault with BUIDL
, updating theRedemptionVaultWithBUIDL.redeemInstant()
function to validate and handle thetokenOut
input correctly rather than ignoring it would be necessary.The text was updated successfully, but these errors were encountered: