The KittyPool::meownufactureKittyVault
function in KittyPool.sol
is used to create a new KittyVault
contract. The address of the new vault is generated deterministically using the salt
parameter, which is based on the token symbol. This approach has two significant issues:
The address of the vault can be known before its creation, potentially exposing the contract to front-running attacks, while this is an unlikely attack vector it is worth a mention.
Tokens with the same symbol cannot be deployed, potentially leading to conflicts and failures in contract creation.
Deterministic address generation can lead to front-running attacks, where an attacker could anticipate the creation of a vault and take advantage of this knowledge.
Token symbol conflicts can prevent the deployment of multiple tokens with the same symbol, limiting the contract's functionality and flexibility.
Manual review, Aderyn.
Use a different method for generating the salt value that does not rely solely on the token symbol. Ideally the function could be modified to take salt as an argument but simply using a combination of the token address or a nonce could ensure uniqueness and prevent symbol conflicts.
Example:
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.