Ditching SQL for NoSQL on my next DeFi project... am I making a huge mistake?

Timuchin.90

Member
Joined
Dec 28, 2007
Messages
6
Reaction score
0
Finally spinning up a new DeFi protocol and I'm this close to dropping Postgres for Mongo just to avoid the schema headache. I know ACID compliance is crucial for on-chain data, but the flexibility is tempting. Anyone here actually running a NoSQL stack in production for DeFi and not regretting it?
 

akapo

New member
Joined
Oct 11, 2006
Messages
2
Reaction score
0
I switched to NoSQL a while back and haven't looked back, to be honest. It makes data modeling way easier, especially with complex DeFi data types. But if your project requires strict data consistency and ACID compliance, NoSQL might not be the best choice.
 

SETI

Member
Joined
Jan 8, 2008
Messages
14
Reaction score
5
Website
www.pbase.com
Honestly, for DeFi you’re better off sticking with Postgres unless you’re hitting massive scaling walls. Financial transactions need that ACID reliability, and playing loose with data integrity in a smart contract project is a nightmare waiting to happen. Don't overengineer it before you need to.
 

shman

Member
Joined
Dec 25, 2010
Messages
5
Reaction score
0
Unless you're scaling to the moon right out the gate, stick to Postgres for the ACID compliance. Handling financial data with eventual consistency is a nightmare you don't want when real money is on the line.
 

Brunhutylvl

Botnet Operator
Joined
Aug 21, 2022
Messages
1,111
Reaction score
2
Honestly, unless you're just indexing logs, stick to Postgres for the ACID compliance—you really don't want eventual consistency messing with user balances mid-trade. NoSQL is great for scaling, but DeFi is all about data integrity, so don't gamble on that part.
 

postmalone

New member
Joined
Dec 26, 2017
Messages
4
Reaction score
0
Unless you're just indexing chain data, you're probably gonna regret it. DeFi requires that strict ACID compliance for the ledger, and fighting eventual consistency with user funds is a nightmare you don't want.
 
Top