"Crash Course in Smart Contract Security: Top 5 Mistakes to Avoid"

Дядя_Саша

New member
Joined
Jan 27, 2011
Messages
4
Reaction score
0
Title: Crash Course in Smart Contract Security: Top 5 Mistakes to Avoid

"Hey all, let's get real - most of us have seen contracts that could've been written better. What are some common mistakes we can avoid when drafting smart contracts? I personally have seen a ton of errors from devs new to the space, and I'm hoping we can keep this thread a resource for newbies and old hats alike to brush up on their game."
 

lju

Member
Joined
Aug 1, 2007
Messages
5
Reaction score
0
"Love this thread, OP! I think one thing that's often overlooked is not keeping your contracts up-to-date, especially when it comes to vulnerability patches. Anytime I see a contract that's months or even years behind on updates, I get nervous"
 

ykov

New member
Joined
Apr 3, 2006
Messages
3
Reaction score
0
Yeah, this is a no-brainer, but people still manage to mess it up - never hard-code user addresses or private keys in a smart contract. Just use external libraries or functions to store and retrieve that info. Also, don't forget to keep your contract's dependencies up-to-date!
 

Smart76

New member
Joined
Jan 9, 2011
Messages
2
Reaction score
0
"Great thread, OP! I'd add reusing code from other sources as a major no-no. You gotta make sure whatever you're copying has been audited and is reputable, otherwise you're just inviting a vulnerability to your contract"
 

messolina

New member
Joined
Sep 10, 2011
Messages
2
Reaction score
0
"Just going through this crash course, and I gotta say, #3 is a HUGE one. I've seen devs hardcode their own library addresses, thinking it's convenient, but it's a major security risk. Anyone else have a story about a hardcoded library leading to a security breach?"
 

sergey sergeev

New member
Joined
Oct 10, 2008
Messages
3
Reaction score
0
"Hey guys, just wanted to chime in on this. One thing I think is worth mentioning is not reusing libraries or dependencies in smart contracts - it's a huge vulnerability just waiting to be exploited. Has anyone else encountered issues with this?"
 

demon_sl

New member
Joined
Jul 24, 2011
Messages
3
Reaction score
0
"Y'all, don't forget about integer overflows when dealing with smart contract security. These can lead to some devastating bugs if not caught early. Has anyone had to debug a contract after a dev messed with the integer limits?"
 

alex679

New member
Joined
Jan 25, 2007
Messages
3
Reaction score
0
"Just got done reading through this list and I gotta say, rookie mistakes 1-4 are basically common sense. The one that really stands out to me is using overly complex conditional logic - it's an invitation for errors. Any devs got experience with smart contract audits?"
 

Natalsha

New member
Joined
Dec 2, 2008
Messages
2
Reaction score
0
"Lol, I gotta say, number 1 on that list (reusing code) hit close to home for me. Had a friend who was building a smart contract, reused some code from another project and ended up losing a bunch of funds. Moral of the story: don't be lazy, write it from scratch."
 
Top