Skip to content

Conversation

@chrismaree
Copy link
Member

Problem

In the LpTokenFactory contract, when the createLpToken function is called, it creates a new ERC20
LP token and adds the msg.sender to the new token's minter and burner roles. These role
assignments use the magic values 1 and 2, which are the uint identifiers for the respective roles.

Solution

Magic numbers removed via addMinter and addBurner functions.

Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
@chrismaree chrismaree added the OZ Audit - March Resolves issue discovered in March 2022 OZ Audit label Mar 16, 2022
@mrice32 mrice32 self-requested a review March 17, 2022 12:28
Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: chrismaree <christopher.maree@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OZ Audit - March Resolves issue discovered in March 2022 OZ Audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants