Ethereum Advanced

Hey everyone, after reading the medium article on ERC-20 tokens, I was having some trouble understanding exactly how they work and what the standard functions do. I did some research and came across this video which explains these topics clearly and concisely. It was immensely helpful for me, so I wanted to share it here in hopes that it can help others as well. The YouTube channel that posted it has many other blockchain development-related videos, so you might consider bookmarking their channel for future reference when you need a little extra clarification on a blockchain topic. Cheers! :slight_smile:

https://www.youtube.com/watch?v=cqZhNzZoMh8&ab

Edit: I forgot to include another article that helped
https://medium.com/blockchannel/the-anatomy-of-erc20-c9e5c5ff1d02

1 Like

Hey @Lorraine, hope you are great.

you might want to take the JavaScript course first from our academy, i will teach you all the JS fundamentals, then you can use codewars to solidify your knowledge, its a good practices to go both at the same time, JS course + codewars will give you a decent solid knowledge for JS in few time :nerd_face:

Carlos Z

Study both JS and ETH at the same time? Yah! Sounds great. Will do just that and then get back to the Codewars. Thank you Carlos!

Hi everyone,

I’m just curious, do gas fees go up based on miners choosing the transactions with the highest fees as with the BTC network or is there something else that causes fees to increase?

Thanks in advance!

1 Like

Not exactly on miners choosing the transactions, is more likely to go up because the network have already transactions to process(waiting to be mined), but there are also more transactions incoming, the gas fee that they offer could be higher than some of the transactions that are waiting with few gas fee.

That way miners will always pick the transactions with highest fees first (more incentive reward to the miners), but at a moment in time, the network will decrease partially the transactions (because they will be mined over time), and then the gas fees will go down again for a while.

Also you can read more about it here:
https://finematics.com/what-is-gas-ethereum-high-transaction-fees-explained/
https://usenobi.com/blog/why-is-ethereum-gas-fee-so-high/

Hope I explained myself clear, if not let me know :slight_smile:

Carlos Z

1 Like

@thecil thanks for the explanation and thanks for the links to read up further on this! :slight_smile:

1 Like

Hi! After completing the course, I’m still unsure about the practical use cases for smart contracts. I understand that it’s possible to create new tokens on top of the ethereum (or similar) blockchain. But what do I do with these (except playing games)? It’s all very self-referential. I’d like to know some real world practical examples of smart contracts.

Ivan used as an example a contract which would give my child money if he/she got good grades. I’m curious about how a smart contract could know my child’s grades. Say the school exposed an API with a service for retrieving the grade of a student and say that the smart contract could call this service. Wouldn’t that make the contract hackable by attacking the service? So even if we could trust the contract in of itself, making the contract rely on a service outside of the blockchain would make it vulnerable to attacks or mishaps. The school could simply take down the service or change its API.

Please advice!

1 Like

Thanks for asking this question. I wasn’t clear on the privacy piece either

Hey @ppoluha, hope you are ok

There is a bunch of use cases that are already being develop and functioning on Ethereum, I could explain it to you but it could take way longer, so I suggest some links to get a huge package of knowledge on the use cases for it:

Now this channel have a very nice videos that explain different topics on Ethereum and Blockchain:
https://www.youtube.com/c/Finematics/videos

Hope this helps.
Carlos Z

Thanks @thecil! I’ve watched the videos now. They helped some. Is it perhaps a bit early to expect fully developed and successful implementations of smart contracts? The examples given in the videos are all on the conceptual level and ideas.

And did you see my other question? How can a smart contract access the outer world and still be secure?

The learning continues!

Through the blockchain basically (?), i mean once you deploy a smart contract into the blockchain, it is available and unstoppable worldwide.

There are good smart contracts out there like Uniswap for example, there are a lot of smart contract audits services, there is no way to expect a contract to be 1000% secure, thats why you should audit it and let others try to break it, if all logic is made to do what its programmed to, it should not have any backdoors.

Carlos Z

Thanks again @thecil! Regarding the question how smart contract can access the outer world, that was in reference to the example given by Ivan in the introduction to smart contracts. The example was that the contract would release the money to the child if/when it had received a certain grade from school. I guess the grades must be on the blockchain somehow for this to work.

1 Like

Things are starting to get really interesting. Very pleased I signed up. Blockchain and Bitcoin 101 done, now I am getting into Ethereum 101. Many thanks

1 Like

Indeed, the contract might need to know what grades values do the child have in order to do something, so in any place of the contract, there should be a function that request this values to be inputed. somethine like insertGrades() function for example. Then you can use that function to add the grades of the child, and based on the logic of the contract, it will do something (like sending funds to the child if grades are above 15 of 20 points for example).

Carlos Z

1 Like

The contents of the courses and the academy are great, what luck to have found you.

1 Like

Courses much appreciated!

1 Like

I am having trouble understanding GAS. I used to think it was just what they called transaction fees in the ETH network. Now I learn that there are GAS charges per action in each contract? And the miner set prices? Is that correct? Sounds like a way for miners to gouge prices at will. Seems like that is a result of the turing complete model? All very new to me. I will continue to answer homework questions and the video info provides but I hope it gets more clear moving forward.

2 Likes

Hey @BrianTrab, hope you are well.

Per action, we mean opcodes that must be calculated by the miner.

https://ethervm.io/

When your contract have a function that for example, create a memory variable (will just be used in the function process, then will be deleted, not saved in blockchain), that kind of method have a price in gas. (https://ethervm.io/#memory)

They do not set the price, is the amount of OPCODEs that they will calculate so your action goes through the contract (like sending ETH from one account to another, the calcs will be made by miners, but the gas fee is based on the amount of opcodes that takes sent funds).

Why the gas fees goes up?

Basically because there is amount of transactions per second that miners are able to calculate, check: https://blockchair.com/ethereum/charts/transactions-per-second.

So everyone is able to pay a little bit more of gas fee to get his transactions being mine first than others, and if a lot of people does the same, its like a race of gas fees. But that just happens for time periods, then gas fees stabilize like we are now.

Hope I explained my self good, if not let me know :nerd_face:

Carlos Z

excellent guys! thanks!
just one remark: the link https://medalla.launchpad.ethereum.org/
(line 4) is not working anymore