Skip to content
Request an audit

‹ Findings database

BRC20 parameters should be passed as arguments to the constructor of BRC20 to save gas

Low/InfoOrange Bridge audit·Three Sigma·Cross-chain bridge·15th July, 20243S-OB-N04

Description

BRC20Factory::createBRC20() creates new BRC20 tokens by setting the parameters storage variable to the name, symbol and decimals of the new token, and then the BRC20 token in the constructor fetching this storage variable.

Recommendation

Send the name, symbol and decimals in the constructor to save gas, as create2 will work just as fine, but it becomes significantly cheaper to deploy the tokens.

Status

Addressed in #1fd3288.