Algo Ssstablecoinsss

AI First Flight #2
Beginner FriendlyDeFi
EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

[L-01] `CollateralDeposited` event missing token address, making deposits indistinguishable off-chain

Description

CollateralDeposited (line 44-46) does not include the token address, while CollateralRedeemed (line 49-53) does. Off-chain indexers cannot distinguish WETH deposits from WBTC deposits.

Vulnerability Details

# dsc_engine.vy:44-46
event CollateralDeposited:
user: indexed(address)
amount: indexed(uint256)
# @> MISSING: token: indexed(address)
# Compare with CollateralRedeemed which has it:
event CollateralRedeemed:
token: indexed(address) # @> present here
amount_collateral: indexed(uint256)
_from: address
_to: address

Recommendations

event CollateralDeposited:
user: indexed(address)
+ token: indexed(address)
amount: indexed(uint256)

Update the emit in _deposit_collateral (line 226) accordingly.

Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 3 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!