Platform: Code4rena
Start Date: 16/01/2024
Pot Size: $80,000 USDC
Total HM: 37
Participants: 178
Period: 14 days
Judge: Picodes
Total Solo HM: 4
Id: 320
League: ETH
Rank: 136/178
Findings: 2
Award: $25.08
🌟 Selected for report: 0
🚀 Solo Findings: 0
16.3165 USDC - $16.32
https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/stable/CollateralAndLiquidity.sol#L115 https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/stable/CollateralAndLiquidity.sol#L125 https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/stable/CollateralAndLiquidity.sol#L128
Detailed description of the impact of this finding.
Double burning of USDS tokens occurs when users repay their borrowed USDS.
Users repay their borrowed USDS through the CollateralAndLiquidity.sol. However, these tokens are to be sent into the Liquidizer contract that handles the burning of USDS tokens and holds some USDS token that serves as burnable buffer. When users call the repayUSDS token from the CollateralAndLiquidity, these USDS tokens are directly sent into the usds contract. https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/stable/CollateralAndLiquidity.sol#L125
This is followed with a corresponding increment in the usdsThatShouldBeBurned state variable in the Liquidizer.sol. This variable notes the value of USDS to be burned.
In the future when upkeep is performed, tokens in the liquidizer would be burned due to the usdsThatShouldBeBurned value and the repaid USDS tokens directly sent into the USDS contract.
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
https://gist.github.com/Ephraim-nonso/420097aa1bf24c5cd722420dce171e2a
Manual Review and Foundry
Send repaid tokens to the liquidizer contract instead of usds contract.
-- usds.safeTransferFrom(msg.sender, address(usds), amountRepaid); ++ usds.safeTransferFrom(msg.sender, address(liquidizer), amountRepaid);
ERC20
#0 - c4-judge
2024-02-02T14:02:01Z
Picodes marked the issue as duplicate of #618
#1 - c4-judge
2024-02-17T18:38:20Z
Picodes marked the issue as satisfactory
8.7582 USDC - $8.76
Detailed description of the impact of this finding. If the confirmation wallet at any point rejects wallet proposal invoked by the mainWallet, this will deny the mainWallet the ability to propose wallets in the future. The problem is caused by this check:
require(proposedMainWallet == address(0), "Cannot overwrite non-zero proposed mainWallet.");
Scenario before a Rejection:
Scenario after a Rejection:
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
https://gist.github.com/Ephraim-nonso/be99a50aad9504b0ca34c105e8d109c1
Manual and Foundry
Update the proposedMainWallet to zero address in the receive function when confirmation wallet sends less than 0.05 ether.
Other
#0 - c4-judge
2024-02-02T10:42:46Z
Picodes marked the issue as duplicate of #838
#1 - c4-judge
2024-02-17T18:22:27Z
Picodes marked the issue as satisfactory