-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkqs90 - RedemptionVaultWIthBUIDL.sol#redeemInstant
will always DoS due to incorrect contract call.
#99
Comments
1 comment(s) were left on this issue during the judging contest. merlinboii commented:
|
RedemptionVaultWIthBUIDL.sol#redeemInstant
will always DoS due to incorrect contract call.RedemptionVaultWIthBUIDL.sol#redeemInstant
will always DoS due to incorrect contract call.
Escalate This should be considered as Medium, not High. The issue clearly details how the bug will lead to From Sherlock docs, Could Denial-of-Service (DOS), griefing, or locking of contracts count as a Medium (or High) issue?, DoS issues can only be considered as high if both following apply:
Because |
You've created a valid escalation! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
u have to use mock version instead of deployed version and if u do that,this isuue cannot happen ,hence inavalid ERC20Mock buidl;
SettlementTest settlementTest;
LiquiditySourceTest liquiditySourceTest;
RedemptionTest redemptionTest;
buidl = new ERC20Mock(8);
settlementTest = new SettlementTest(address(this));
liquiditySourceTest = new LiquiditySourceTest(USDC);
//deploy redemption test
redemptionTest = new RedemptionTest(
address(buidl),
address(liquiditySourceTest),
address(settlementTest));
|
Since the issue is escalated, I think some of the duplications need to be evaluated. There is no question of issue validity since there is no function |
#138 and #41 are exact duplicates of each other. If we are not clubbing together these two in this issue, they should be considered valid separately. cc: @merlinboii |
Sorry for the late reply. During the judging contest, I mistakenly marked the issue as invalid due to referencing a Mock (my bad). The issue is valid, and I grouped it separately from #138 and #41 as I thought they mentions different root cause. Moreover, I believe this comment is effective, and for #46 , I think the issue highlights the following root cause:
while the root cause of the issue is a DoS when attempting to access |
The protocol team fixed this issue in the following PRs/commits: |
Planning to apply the changes above and accept the escalation. |
I do not think argument on #41 and #138 being invalid is correct:
cc: @WangSecurity |
Still, it's said the BUIDL redemption vault can be used as an mTBILL redemption vault, it doesn't say it will be used in the same way as a regular redemption vault and should handle WBTC redemptions.
I didn't say my understanding was based only that one paragraph. My understanding is based on code comments inside the BUIDL redemption vault that explicitly mention USDC and BUIDL only. Hence, I believe this vault is only for using the USDC and BUIDL vaults.
But, the vault is only meant for using USDC, so submitting WBTC in that case is a user mistake I believe. Hence, I'm still planning to accept the escalation and apply changes expressed in my previous comment. |
Result: |
Escalations have been resolved successfully! Escalation status:
|
pkqs90
High
RedemptionVaultWIthBUIDL.sol#redeemInstant
will always DoS due to incorrect contract call.Summary
RedemptionVaultWIthBUIDL.sol#redeemInstant
will always DoS due to incorrect contract call.Vulnerability Detail
In
RedemptionVaultWIthBUIDL
contract, it uses the BUIDL contracts to redeem BUIDL tokens to USDC tokens, and users are expected to always receive USDC tokens.On Ethereum, the
buidlRedemption
is this contract https://etherscan.io/address/0x31D3F59Ad4aAC0eeE2247c65EBE8Bf6E9E470a53#readContract. ThebuidlRedemption.liquidity()
is this contract https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, which is USDC.The issue here is, the code wrongly assumes
buidlRedemption.liquidity()
is the liquiditySource, when it should be the USDC token. This will always lead to DoS for thebuidlLiquiditySource.token()
call inredeemInstant
since USDC does not support.token()
call.The correct implementation would be to use
buidlSettlement.liquiditySource()
to get the liquidity source, since there is an API for that in the buidlSettlement contract https://etherscan.io/address/0x57Dd4E92712b0fBC8d3f3e3645EebCf2600aCef0#readContract.Impact
RedemptionVaultWIthBUIDL.sol#redeemInstant
will always DoS.Code Snippet
Tool used
Manual Review
Recommendation
Use
buidlSettlement.liquiditySource()
to get the liquidity source. Also add theliquiditySource
API toISettlement
.The text was updated successfully, but these errors were encountered: