Publishing a piece of code on a public blockchain cannot be made illegal. The Court of Appeal already ruled that code is speech making this a first amendment issue [1].
Decentralized finance is here to stay as an alternative to the traditional system. Some things are just impossible to regulate.
Perhaps not in the US (but many countries have no such constitution), but redeeming said tokens for fiat currency could still be made illegal, which would dramatically reduce the usefulness of such a a system.