Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

`godFather` cannot know if the weapons for an account are withdrawn or unassigned

Description

godFather assigns weapons to GangMembers using the Laundrette::putGunsInTheSuspendedCeiling function and it makes a change in the mapping of WeaponShelf but with lack of events both the unassigned accounts and the withdrawn accounts will have a weapon count of 0 and it will be very difficult to know if the weapons are withdrawn or unassigned.

Impact

godFather may loose track of the weapons in the WeaponShelf and it will be very difficult to know if the weapons are withdrawn or unassigned .

Proof of Concept

The initial value of a mapping i.e unassigned is same as the accounts which have withdrawn the weapons assigned to them.

abstract contract Shelf is Module {
@> mapping(address => uint256) public bank;
....
...
..
.
}

Recommended Mitigation

Since the WeaponShelf itself has no proper implementation other than a keycode and inherited shelf contract it is recommended to use ERC721 i.e NFT's for weapons (since each weapon is unique and hence non fungible) and the logic to be implemented in WeaponShelf.sol .

Updates

Lead Judging Commences

n0kto Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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