Bridge can only work with one token
vulnerabilityThe L1BossBridge
contract does not inherit the TokenFactory
contract.
The L1BossBridge
does not have a vault = new L1Vault(token);
function outside of its constructor.
The two missing points mentionned in the summary make it that the bridge is only usable with one token, which address is passed within the constructor upon deployment. This means that there will always be only one token that users will be able to bridge to L2 and withdraw to L1.
The fact that the TokenFactory
contract is within the scope shows that this feature was planned into the business logic and has not been implemented into the BossBridge
contract.
The two features:
Bridge
Token deployment
work independently. And the new created tokens cannot be implemented into the bridge logic.
The bridge cannot be used to its full extent. It restricts users to a unique token's holders.
High impact: because there is a severe disruption of protocol functionnality.
High likelyhood: because every user is going to be confronted to the fact that this bridge is useless unless they swap their tokens beforehand in most of the cases.
Forge
Code rewiewing
Solidity Metrics
Add the following import in L1BossBridge.sol
Replace the L1Vault
by the TokenFactory
deployment in the constructor like so:
Add a deployToken()
function that will create a separate Vault for each one of the tokens deployed and implement the possible use of several tokens into the deposit()
and withdrawal()
functions.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.