Overview
The NFT app Cupcake simplifies the complex technical restrictions and lengthy setup processes typical for acquiring NFTs for the first time and eliminates gas fees for users.
With Cupcake, users create a digital asset wallet and mint their first NFT in under one minute via encrypted near-field communication technology (NFC) on mobile devices through Sprinkles, Cupcake’s secure NFC tags, which are paired with smart contracts.
Cupcake partnered with ROVE and Tommy Hilfiger to create Tommy Factory NFTs during the 2022 New York Fashion Week. These NFTs were claimed live at the event by guests on their phones in under a minute using the Cupcake protocol.
Task
The main task of the Blaize team was to detect and describe any security issues in the smart contracts of the platform.
We needed to check the Cupcake smart contracts according to the following parameters:
- Whether the contract is secure;
- Whether the contract corresponds to the documentation;
- Whether the contract follows industry best practices in terms of the efficient use of gas and code readability.
We have scanned this smart contract for all commonly known and more specific vulnerabilities:
- Unsafe type inference;
- Timestamp Dependence;
- Reentrancy;
- Implicit visibility level;
- Gas Limit and Loops;
- Transaction-Ordering Dependence;
- Unchecked external call;
- Unchecked math;
- DoS with Block Gas Limit;
- DoS with (unexpected) Throw;
- Byte array vulnerabilities;
- Malicious libraries;
- Style guide violations;
- ERC20 API violations;
- Uninitialized state/storage/ local variables;
- Compile version not fixed.
In addition, Cupcake smart contracts were checked against less common vulnerabilities from the internal Blaize.Security knowledge base.