If you plan to create your own ongoing DEX using a dYdX clone script, that's a good idea. But the real difficulty starts when you want to add more than just the standard things. Adding better features isn't only about changing how it looks or adding new things to trade. It's more complicated, and you'll notice this when you start changing things.
One big problem is how the order book works. dYdX uses an order book that's not on the blockchain but settles trades on the blockchain. This mix is good for speed but hard to replicate unless you know how matching systems work. Even a small delay in matching orders can make users lose trust.
Next is handling leverage and risk. Many new companies don't realize how tricky this can be. You're not just adding a "10x" button. You're making a system that figures out funding rates, margin amounts, where liquidations happen, and manages all of it instantly.
A 2024 report said that over half of the new DeFi trading platforms had problems with bugs in how they liquidated positions in the first half of the year.
Security is also a big issue. When you add features like isolated margin or using different assets as collateral, you also create more ways for hackers to attack.
That means your audits need to go deepersurface-level audits wont cut it anymore.
A dYdX clone script can help you get started quickly. However, if you want something more advanced, be prepared to spend a lot of time on backend development, security improvements, and practical testing.