Missing a check for minimum sell amount at make function #1167
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
M-07
primary issue
Highest quality submission among a set of duplicates
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2023-04-rubicon/blob/main/contracts/RubiconMarket.sol#L835
https://github.com/code-423n4/2023-04-rubicon/blob/main/contracts/RubiconMarket.sol#L511
https://github.com/code-423n4/2023-04-rubicon/blob/main/contracts/RubiconMarket.sol#L511-L562
Vulnerability details
Summary
https://github.com/code-423n4/2023-04-rubicon/blob/main/contracts/RubiconMarket.sol#L835
There is a check for
_dust
amount inside offer function at L835but not inside the other offer function being called by make function at L511
Impact
make
function will not avoid dust offersProof of Concept
https://github.com/code-423n4/2023-04-rubicon/blob/main/contracts/RubiconMarket.sol#L511-L562
There is no check for
_dust
inside offer function, the minimum sell amount should be set for a token to avoid dust offers as the concept apply.as you see it is applied in the other offer function as well at L835
Tools Used
Manual Review
Recommended Mitigation Steps
Add the check condition:
to
offer
function that called bymake
functionThe text was updated successfully, but these errors were encountered: