Submitted by iamandreiski, also found by UbiquitousComputing, dutra, 0x0bserver, m4ttm, peritoflores, cheatc0d3, imare, Tychai0s, FastChecker, Soul22, kodyvim, deepplus, whoismatthewmc1, nonseodion (1, 2), Matue, erebus, ether_sky, Draiakoo, LouisTsai, 0xprinc, aslanbek, Cosine, BugzyVonBuggernaut, KupiaSec, ke1caM, jesjupyter, PENGUN, spacelord47, SpicyMeatball, dimulski, ktg, DanielArmstrong, nmirchev8 (1, 2), KingNFT, Mylifechangefast_eth, SovaSlava, zaevlad, jasonxiale, hals, AlexCzm, 51l3nt, cats, EV_om, ZanyBonzy, ubl4nk, cccz, pkqs90, israeladelaja, jangle, Krace, and haxatron
https://github.com/code-423n4/2024-01-curves/blob/516aedb7b9a8d341d0d2666c23780d2bd8a9a600/contracts/Curves.sol#L338-L362 
https://github.com/code-423n4/2024-01-curves/blob/516aedb7b9a8d341d0d2666c23780d2bd8a9a600/contracts/Curves.sol#L47
If a malicious user or just an unbeknownst one decides to name/set their curve token symbol as CURVE N N can/will be substituted to whatever the next number is in the _curvesTokenCounter it can render the whole default naming functionality in the protocol useless as it will be DoSd indefinitely.
When a user decides to call the buyCurvesTokenWithName without specifying the name/symbol of their token and/or their token hasnt been deployed and exists without a name/symbol and calls mint(), withdraw() etc. without setting the name/symbol they will be assigned a default one.
The default name/symbol will be assigned using the following lines of code:
Since two exact symbols cant coexist in the Curves ecosystem, due to symbol checks (as shown in if the if-clause above) a malicious user can decide to set their token symbol as CURVES N -> substituting the N with whatever the next number is in the _curvesTokenCounter.
Example if currently _curvesTokenCounter = 4, they can set their symbol as CURVES 5 and this will render the whole default naming functionality of the protocol obsolete indefinitely.
Even though setNameAndSymbol() exists (which prevents a complete protocol DoS) and users will be able to manually set their name/symbol since the default functionality wont work; this still renders the whole default naming functionality useless and inoperable.
Foundry Proof of Concept to show this:
Forbid users to include CURVES in their symbol by including checks when manually setting name/symbol or creating a token with name/symbol and reserve these keywords only for the default naming functionality or rethink how the architecture can be changed to make including symbols/names by users mandatory.
andresaiello (Curves) confirmed
