1. Why does smart contract development require a different mindset than regular programming?
Normally in programming failure means a broken program, wasted time, and frustration, but in a smart contract failure could mean losing money. So security must be a design feature at every step.
2. Argue with your own words why clarity in your code is more important than performance.
Logical complexity leads to more avenues for attack, or for more things to simply go wrong. Clarity ensures that code is readable, which means any logical flaws will be caught much easier.
3. As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
One may think that by using the keyword private in front of a value or after a function call will prevent unwanted actors from accessing the information stored inside. Whereas in reality, they cannot use the information or functions within the scope of the contract, but sensitive information plainly inputted into the source code can be easily just seen.
4. Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
Traditional software engineering principals tend towards reusing code and creating modular systems. Sometimes these goals conflict with security principles that can require code duplication and rigid code to prevent avenues of attack.
Reading Assignment: Mindset
-
Why does smart contract development require a different mindset than regular programming?
Because it’s a new ecosystem constantly evolving, because there is money involved there is a high cost of failure, smart contract upgradeability is difficult. -
Argue with your own words why clarity in your code is more important than performance.
Clarity is more important than performance because it will be easier to find bugs and test the code -
As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
The private data and functions means that this type of data or function cannot be viewed or called directly but only inside the smart contract. But since all the data is on the blockchain it is possible to view private data and functions. -
Why do you think all the fundamental principles mentioned in the article comes down to trade-offs?
There is to be a trade-off between security and performance. Adding security test in your smart contract can add more costs (in term of gas required) and less performances but the cost of loosing money involved in the contract is the issue to have in mind.
Also sometimes for a very simple contract it is an option to consider to make it monolithic instead of modular to keep all variables in one place and keep it simple.
The code reusability it’s an important software engineering perspective, but try to use only safe and provable code and well stated libraries like the OpenZeppelin ones.
1. Why does smart contract development require a different mindset than regular programming?
Because the coast of failure can be high and change can be difficult
2. Argue with your own words why clarity in your code is more important than performance.
Because maybe some other developer will work on your code and also after some time when you come back to code it hard to think what you’ve written if it’s messy.
3. As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
That they can’t be manipulated and profit from bugs in some situations.
4. Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
Because there’s no software that is perfect.
- Why does smart contract development require a different mindset than regular programming?
Because we are programming money, because Solidity is very new so it updates very frequently, and so its very difficult to keep up to each new update, to each new bug that’s encountered. It’s not like programming in c++ where you have tons of experiences and best practices sources. - Argue with your own words why clarity in your code is more important than performance.
Because most of the time when programming smart contracts, the focus is not on the performance side of things (like high speed of the transactions, or storing high volumes of data, or storing things in a very smart data type or a very good database, or providing the fastest video streaming platform or making a very good compressing rate of data or things like that), but on the contract side of things. By this I mean, that whenever you read a contract, the contract should be clear to the reader, so anyone can understand it, so whenever something happens and you need to review it, it will be clear as to what is the applicable “clause” of the contract. I have read many contracts in my life, and some of them are very long contracts (of supply of goods to telecom companies) and the most important thing is that the statements on the contracts are very clear and well written. I guess it is the same with smart contracts or even more, because once it is deployed and executed, there is no going back (it’s like a never expiring contract, so what happens if something needs to be changed along the way? because for sure something WILL be changed.) - As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
I think that if some data or functions are private, someone could believe that the creator or the group of creators of the contract might have put something in the code to benefit themselves, like transferring some small amounts of gas to their own wallets or something like that. In fact I used to believe that, and I still believe it to some extent. It’s like back in the 90s or the 2000s there was a movie (based on true facts) that was about some guys diverting small fractions of a dollar to their accounts, but after so many transactions they got a few million dollars (back then, a few million dollars were a lot of money) - Why do you think all the fundamental principles mentioned in the article comes down to tradeoff.s?
.
- Why does smart contract development require a different mindset than regular programming?
its a new, rapidly evolving space which carries much higher stakes
- Argue with your own words why clarity in your code is more important than performance.
clarity is important for keeping your code simple, understandable and able to better be understood
- As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
storing any personally identifiable information including name, phone number, email - these could easily then be tied to ETH & contract addresses by malicious actors
- Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
there are no perfect representations of security or performance or clarity or the amount of time that should be spent in developing - so you have to be careful that your trade-offs favor higher security and planning for inevitable problems and not speed of developing, for example
1. Why does smart contract development require a different mindset than regular programming?
We are working with a new constantly evolving ecosystem that is dealing with money so the cost of failure can be extremely high. All the code and data is public on the blockchain so the potential for hacks is much higher, and because we are dealing with money, smart contracts are very attractive to hackers.
2. Argue with your own words why clarity in your code is more important than performance.
Complexity in code introduces more attack vectors that can be exploited by hackers. Simple code that is tried and tested is less prone to bugs and attacks. When you trade security for performance you will have neither.
3. As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
Believing that private functions somehow make the data private is a fundamental flaw in thinking about smart contracts. A naive developer may assume that sensitive data can be hidden.
4. Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
In any software development there is always a balance between security and performance, because smart contracts deal with money, security is critically important.
- Why does smart contract development require a different mindset than regular programming?
Because once the contract is deployed and live it’s not as simple as traditional programming to go back and edit. - Argue with your own words why clarity in your code is more important than performance.
It’s very important to understand what each section/function of the contract does and how it behaves. The entire thing may work well in limited testing, however it’s important to understand what happens when others use the contract and how it behaves. Additionally, because other contracts can use what’s published, it means that there are additional vulnerabilities that exist and as such knowing how it can be exploited may prevent bad actions from taking place, as smart contracts are not just a program but also control the funds. - As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
Sometimes a function may say “private” and often we believe that this is not viewable by others, however that is not so. All data sent on blockchain is indeed public and as such contracts must be written with that in mind and the public interacting with the contract must be aware that there is really nothing that is private. - Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
Well everything has a tradeoff. Building non-upgradable contract limits the bad actors that may step in but it also does not allow us to keep the tech updated and evolving. Sometimes reusing the code from external contracts can be good as it saves time and speeds things up, but the tradeoff is that we may use a contract that has a bug or intentionally inserted malware. So, it’s all a tradeoff.
1. Why does smart contract development require a different mindset than regular programming?
Technology increase their pace every year, so new bugs and methods for programming are in constant move, therefore best practices are often changed. Since smart contracts handle valuable assets, an higher degree of losing it by a hack, exploits, etc. has greater impact. Plus, the difficulty of change it once deployed in main network, is a challenge.
2. Argue with your own words why clarity in your code is more important than performance.
A readable code allows for example; to detect bugs more easily, update source code and easier to tests.
3. As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
One wrong belief is “private” word will be associated to hidden functions, however in smart contract such thing don’t exist, since all functions are readable by an user in blockchain.
4. Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
Like everything in life, it will be tradeoffs in each choice. In programming we need to find a balance between performance, flexibility and security, so in the end we must weight everything to reach that goal.
-
Why does smart contract development require a different mindset than regular programming?
Smart contracts have the potential to store, transfer or create hundreds, thousands and even millions to billions of dollars worth of value - this could be life changing for anyone involved if something easily avoidable is overlooked. Therefore a different mindset and even a different approach to daily life and routines is important so that you are always up to date about anything significant. -
Argue with your own words why clarity in your code is more important than performance.
If a contract is not able to be followed easily, it may be open to many attack vectors that are too complex to realise. Having clarity in the code allows it to be tested and audited easily and therefore the security can be determined readily. Complexity opens the door for bugs, bad actors and general fudd. Clarity means that many people can follow and therefore trust-worthiness can grow also. -
As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
People may assume that private data/functions are actually private and are therefore a secret from the outside world, but in fact the ‘private’ keyword just refers to the inheritance of those functions and the data. Those functions and data can only be used within the scope of that contract, but the data is not secret by any measure. -
Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
Smart contracts have their limitations - size is obviously one of the bigg est concerns as it can become expensive and we don’t want to bloat the network unnecessarily. These trade-offs are often to do with complexity and therefore security. More complex contracts (such as those that allow for upgrades, those that are modular and split functionality up, etc) have more potential attack vectors/bugs so we always come back to tradeoffs.
- Why does smart contract development require a different mindset than regular programming?
- because smart contracts are immutable (or very difficult to change or fork and convince communities to switch), you are playing with people’s money, and the environment is constantly being updated.
- Argue with your own words why clarity in your code is more important than performance.
- Without clarity you wont know what’s going on or if there is any major vulnerabilities in the code. Security > Performance because without security you wont be performing for very long.
- As the article says, all data and functions are public in a smart
contract. What false beliefs might someone have around private data and
private functions in a smart contract that could have dangerous
consequences?- One wrong belief is “private” word will be associated to hidden functions, however in smart contract such thing don’t exist, since all functions are readable by an user in blockchain.
- Why do you think all the fundamental principles mentioned in the article comes down to trade offs?
- Because you can’t have everything you want, otherwise everything would be perfect. Trade offs are used to balance and optimise a multitude of aspects involved when aiming to achieve a set goal.
-
Blockchain development is still in its infancy with many best practices and security measures in frequent update. However, implementing changes in code that is already deployed is more difficult than it is in traditional software or mobile development. We therefore need to have more of the mindset of a hardware or financial services developer.
-
Clear code has many advantages in that is allows for more people to review and understand it. It will be easier to test, to upgrade, and to audit.
-
People could think that functions marked ‘private’ or ‘internal’ keeps their data save from others viewing it. There could also be a believe that all data is hashed and can’t be deciphered by others.
-
Trade-offs are a fundamental principle of life. Choosing one option always implies rejecting another. Therefore it is paramount when commencing a smart contract project that will manage money to ask critical questions on how the code should be designed, before the team gets started.
-
Why does smart contract development require a different mindset than regular programming? because the language and the protocol are new, because there are higher risk at stake and because it it more difficult to change and update once deployed.
-
Argue with your own words why clarity in your code is more important than performance.
because clarity decrease complexity and therefore the risk of bugs or failure -
As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences? it could be dangerous to think that private data are actually private and non visible by anyone, besides a private function could still be called by another function or contract which are public
-
Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs? because depending on the situation a smart contract could require to be more or less rigid, modular or reusable.
- Why does smart contract development require a different mindset than regular programming?
- The cost of bugs in the code can be very costly.
- It is more difficult to update a smart contract, compared to what most developers are used too. Making your smart contract upgradable also increases its attack surface.
-
Argue with your own words why clarity in your code is more important than performance.
I think both are important, you will have to carefully balance the tradeoffs of each decision. Clairty is important, so that you can understand what the code is doing, so you can avoid bugs. The more complex the code, the higher chance of bugs. -
As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
It could lead them to a false sense of security, thinking that it is not common knowledge what data is saved and how it is used. This could lead to a vulnerability in the code being discovered and exploited. -
Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
Because you cant always have the best of both options, so you have to carefully weigh your options and choose the best one for the current situation.
- Smart contract development require a different mindset than regular programming because a lot is at stake. You are programming money or money transaction layer when building a smart contract.
- Because smart contract is on a public blockchain, your code can be seen by others and if it’s clear and make sense then you will have more usage. Plus you can avoid a lot of errors in simplicity
- Your code can be seen either way. You don’t hide anything by using ‘private’. Private functions simply cannot be called by everyone like ‘Public’ functions.
- One tradeoff which I liked is code stability vs upgradeability. You can leave code in such a state in such a way that you can improve it if needed. But then hackers can use your code holes. You can make your code impossible to change. That’s secure buy you cannot update it that way. You need to move everything to your new smart contract V2.
- Because the cost of failure is high, since these programs control/hold money directly; because they are difficult to fix or upgrade; and because the code is open and accessible to others in a way that traditional programs are not.
- Because the ability to spot potential flaws or attack vectors, and to be able to envision how the code will execute is very important to being able to reduce risk - and cleaner code allows for this.
- They might not realize that the private data in smart contracts is also viewable by anyone.
- Because in programming, just as in life, we have to always consider trade-offs between FREEDOM to do what we want, and SECURITY. Creative freedoms may allow us to accomplish more or new things or do them faster, but security is all about restricting those things in order to protect. You have to balance the good/harm done by both.
Smart Contracts are a new technology and as it matures better design patterns and known bugs will evolve and need to be assimilated by the developer. Also smart contracts are much harder to upgrade and modify.
Clarity is much more important because complex code is more susceptible to bugs. But there is always a trade off between simplicity and performance. Also gas costs must be included in the trade off.
A distributed application is viewable by anyone and susceptible to hacking so only put on the contract what is necessary.
Every thing except more complete and thorough testing comes down to trade offs.: simple code vs performance and cost, etc…
Why does smart contract development require a different mindset than regular programming?
The cost of failure can be high, and change can be difficult
Argue with your own words why clarity in your code is more important than performance.
Because maybe some other developer will work on your code and also after some time when you come back to code it hard to think what you’ve written if it’s messy.
As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
It could be dangerous to think that private data are actually private and non visible by anyone, besides a private function could still be called by another function or contract which are public
Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
In software, just as in life, there are always tradeoffs. Improved gas efficiency might require more complex code which is more prone to attack vectors. It is particularly important to index in favor of security and resilience when working with smart contracts.
1. Why does smart contract development require a different mindset than regular programming?
The code is open and therefore more vulnerable to exploits. Additionally, the standards are currently being set these days meaning the solutions are not standardized on how to be able to adapt well to problems.
2. Argue with your own words why clarity in your code is more important than performance.
Having greater clarity will be more advantageous as it will be easier for more potential users to understand. This helps to increase trust, potential involvement, and perceived reliability.
3. As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
People could believe that just because a function may be private there isn’t a way for an external user to exploit it.
4. Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
I think in part this is the general struggle of making the complex simplistic. I also think that the newness of the industry and environment mean that we haven’t fully developed into a mature understanding of the tradeoffs to effectively create win-win solutions to get the best of both worlds.
-
Why does smart contract development require a different mindset than regular programming?
smart contracts are a new area, still discovering best practices, the cost of failure is high, changes in code are difficult, more sensitive because of handling money in the code -
Argue with your own words why clarity in your code is more important than performance.
simple and modular code is more readable, potential bugs can be found faster, less duplicity, easy to share the code among more developers -
As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
even if some data and functions are marked as private, the code is still visible to anyone and someone can see a potential point of attack; private data and functions can be called by other public functions -
Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
there are many different points of view on what the best practice is; some more complex projects cannot hold simplicity, some projects have to be secure and therefore slower
1-Smart contracts are new in the tech sphere they involve money and lots can go wrong so one has to constantly check and kee informed of development changes.
2-Clarity is prime since it is open /viewable by all and must be transparent.
3-Believe that with just the one entrance , my smart contract is impenetrable and safe , when it may not be.
4-It’s a trade off between functionality and practical use meaning efficient , easy to use but solid and secure at the same time.