Hunt prep
Before you test Canto Identity Subprotocols contest
What 15 disclosed reports say about Canto Identity Subprotocols contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 9 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
| DoS lesson | 1 | 0 | – | – | $0 |
| Misconfiguration lesson | 1 | 0 | – | – | $0 |
| Smart contracts lesson | 1 | 0 | – | – | $0 |
| XSS lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Users will be able to purchase fewer NFTs than the project had anticipated
The code was fixed by passing the actual font class instead of 0.
Disclosed
-
ProfilePicture subprotocol is immutably linked by subprotocolName to the CID protocol
Deployment and registration should be atomic, or the name should be set by a temporary owner after registration.
Disclosed
-
Bio lines will overflow the buffer for repeated “continuation” characters
The line-splitting logic should start a new line when the current line buffer is full.
Disclosed
-
Incorrect emoji displaying
The recommendation is to avoid implementing the specification manually and instead add a view function to generate the SVG, or allow manual line splitting by storing byte offsets.
Disclosed
-
Bio Protocol - tokenURI JSON injection
The contract was updated to escape characters that need escaping for JSON and SVG using Solady's escape functions, though the team noted that perfect on-chain sanitisation is not feasible and frontends should treat the payload as untrusted.
Disclosed
-
The range of iteratePRNG limits the number of Zalgo distortions
iteratePRNG should be changed so its output range is at least about 1.98e+23 values.
Disclosed
-
If the underlying NFT is burned, getPFP may return incorrect results
The fix adds a check that the underlying NFT's owner is not the zero address, so getPFP returns zero if the NFT is burned.
Disclosed
-
characterModifier is uint8 but encodes 1.38e24 different Zalgo distortions
The characterModifier should be changed to a uint256 (or at least uint88) to allow the full range of distortions.
Disclosed
-
Bio NFT incorrectly breaks SVG lines and doesn’t support more than 120 characters effectively
The line-breaking logic should be updated to handle multi-byte characters correctly and the first line should have dy set to 0 for proper centring; the project confirmed it should be fixed when tokenURI is refactored.
Disclosed
-
Users can end up buying and paying for a different Tray than the one they were trying to acquire
The buy function should accept the expected lastHash and revert if it does not match, so frontrunning causes a revert instead of an unwanted purchase.
Disclosed
-
CidNFT : Broken tokenURI function
The ID should be converted to a string before being concatenated, for example with a string helper library, and the project confirmed the finding.
Disclosed
-
Griefing risk in mint
Modify the mint function so that the minted ID is used during the add loop, ensuring the mint always succeeds.
Disclosed
-
Attacker can frontrun a victim’s mint + add transaction to steal NFT
The contract should enforce that add() can only be called for the CidNFT that was just minted in the same transaction.
Disclosed
-
Adding NFTS with AssociationType ORDERED or PRIMARY may cause overwriting
The add function should revert if an overwrite is detected, by checking that the ordered key or primary slot is not already set.
Disclosed
-
Multiple accounts can have the same identity
The contract should be changed to track the account associated with each CID NFT ID and remove the previous registration when the NFT is transferred or re-registered, as the project confirmed it will do.
Disclosed