Open c4-bot-5 opened 7 months ago
DadeKuma marked the issue as duplicate of #9
DadeKuma marked the issue as sufficient quality report
OpenCoreCH marked the issue as not a duplicate
OpenCoreCH marked the issue as primary issue
@xlc Would love your input on this because it describes a different way to bloat storage than #9
OpenCoreCH marked the issue as unsatisfactory: Invalid
OpenCoreCH removed the grade
yes this is a valid one
OpenCoreCH marked the issue as selected for report
xlc (sponsor) confirmed
Lines of code
https://github.com/code-423n4/2024-03-acala/blob/9c71c05cf2d9f0a2603984c50f76fc8a315d4d65/src/modules/incentives/src/lib.rs#L230
Vulnerability details
Impact
The
deposit_dex_share
function enforce no minimum amount that can be deposited into the pool allows for creating multiple pool positions. This causes that in a coordinated effort, for a pretty cheap cost, users/attackers can create multiple low liquidity positions to bloat the runtime storage. This is very important as substrate framework requires optimization of storage to prevent bloat which can lead to high maintenance costs for the chain and a potential DOS. A more in detail explanation can be found here.Proof of Concept
The test case below shows how a user can create multiple 1 wei positions, and it can be added to test.rs.
Tools Used
Manual code review
Recommended Mitigation Steps
Introduce a minimum deposit amount.
Assessed type
Other