Aikano

3.9K posts

Aikano banner
Aikano

Aikano

@aikano1

SMART CONTRACT AUDITOR || BLOCKCHAIN DEVELOPER

Remote Katılım Ekim 2022
2.1K Takip Edilen1.4K Takipçiler
Sabitlenmiş Tweet
Aikano
Aikano@aikano1·
Gas Optimizations What is Gas? In Ethereum and EVM compatible blockchains, every operation costs gas. Think of gas as a transaction fee paid for using blockchain resources. Example: Solidity balance = balance + 1; Even this simple operation consumes gas. When users interact with your contract, they pay gas. What is Gas Optimization? Gas optimization means: Writing smart contract code that performs the same task while consuming less gas. In simple terms: Same result Lower transaction cost Better user experience Why is Gas Optimization have Important? 1. Saves Users Money Without optimization: Solidity Gas Used = 100,000 With optimization: Solidity Gas Used = 50,000 Users pay roughly half the fee. 2. Makes Protocol More Competitive Users prefer cheaper protocols. Example: Two DEXs perform the same swap. DEX A 150,000 gas DEX B 80,000 gas Most users choose DEX B. 3. Reduces Network Load 4. Efficient contracts consume fewer blockchain resources. 5. Important During Audits Auditors often report: Gas Optimization Findings Especially for DeFi protocols where functions run millions of times. 1. Cache Storage Variable Storage access is expensive, cachee it to lower the cost of the gas. That is Read once Work in memory/stack Write once is Much cheaper. 2. Use calldata instead of memory, if only read the variable. Memory copies the entire array. Why calldata is read-only? No copying. Less gas. 3 Use Custom Errors, Instead of require. E.g error ZeroBalance(); if(balance == 0) { revert ZeroBalance(); } Cheaper deployment and execution. 4. Pack Variables Not use this: struct user{ uint256 amount; uint256 reward; bool active; } Use this: struct User { uint128 amount; uint128 reward; bool active; } Solidity can pack smaller variables into fewer storage slots. Less storage cost. 5. Use constant and immutable. address public immutable owner; Set once in constructor. constructor() { owner = msg.sender; } Reading immutable variables is cheaper. 6. Unchecked Arithmetic unchecked { count++; } Use only when overflow is impossible. Saves gas. Biggest Gas Consumers These are usually the most expensive operations:
Aikano tweet media
English
6
0
16
300
Aikano
Aikano@aikano1·
GAS OPTIMIZATION Always group variables by size. Good order: uint128 uint128 uint64 uint64 bool bool Golden Rule Storage writes (SSTORE) are among the most expensive operations in Solidity. If a write is unnecessary, remove it. If a read is repeated, cache it. If variables fit together safely, pack them. #bugbounty
Aikano tweet media
English
0
0
1
23
Aikano
Aikano@aikano1·
@pashov Good decision, because no one will help unless you help yourself
English
0
0
1
78
pashov
pashov@pashov·
be strong in the tough times🙏
pashov tweet media
English
7
4
70
3.1K
𝐇𝐀𝐈𝐃𝐀𝐑
𝐇𝐀𝐈𝐃𝐀𝐑@web3_haidar·
GM everyone! ☀️ Today's checklist: ☐ Publish 5+ posts ☐ Drop 100+ meaningful replies ☐ Learn something new or improve my skills ☐ Start a new posting challenge ☐ Call my family ❤️ ☐ Trade a few memecoins ☐ Look for spot trading opportunities And if everything goes according to plan... ☐ Finally touch some grass. 🌿😂 Let's have a productive day. What's on your to-do list today? 👇
𝐇𝐀𝐈𝐃𝐀𝐑 tweet media
English
28
2
39
392
Dena
Dena@oladele94302·
Day 15 of learning React ⚛️ Built the structure of my React homepage using reusable components. One step closer to building real-world projects. #React #BuildInPublic #WebDevelopment
Dena tweet media
English
8
1
26
453
DeFiola🔴
DeFiola🔴@DeFiola_·
Good morning ❤️ Your future is built by what you do consistently, not by what you do occasionally. Show up today.
DeFiola🔴 tweet media
English
17
1
21
104
Kaifyyy.sh
Kaifyyy.sh@Iamkaifyyy·
gm folks , devs it’s Monday again time to conquer the day and make it count lfg gooo
Kaifyyy.sh tweet media
English
12
1
46
596
𝐇𝐀𝐈𝐃𝐀𝐑
𝐇𝐀𝐈𝐃𝐀𝐑@web3_haidar·
A recap of today: - 5 posts (this is sixth) - Almost 100 replies 💪 - 5K impressions - 5 new followers ❤️ - 4 unfollows 😭 Also: - Analyzed 3 charts on TradingView and 2 on DexScreener - Took 3 trades - won 2, and 1 is still running Not every day has to go viral. Sometimes, showing up consistently is the real win. Can I call this a winning day? 👀 Good night, everyone. 🌙
𝐇𝐀𝐈𝐃𝐀𝐑 tweet media𝐇𝐀𝐈𝐃𝐀𝐑 tweet media𝐇𝐀𝐈𝐃𝐀𝐑 tweet media
English
9
1
19
425
Aikano
Aikano@aikano1·
Before recommending using uint128, unint64 and others instead of uint256 Ask: What is the maximum possible value? Can the protocol ever exceed uint128? Could future upgrades exceed uint128? If unsure: Do NOT recommend the change. Security is always more important than gas optimization.
Aikano tweet media
English
1
0
5
40
Rosario Borgesi
Rosario Borgesi@rosarioborgesi·
Starting another chapter of this great book: Rich Dad Poor Dad. 📖 If you're curious about how to start a business and build wealth, this book is well worth reading.
Rosario Borgesi tweet mediaRosario Borgesi tweet media
English
3
0
10
242
Aikano
Aikano@aikano1·
@rosarioborgesi Exactly, we learning how to invest and become financially stable
English
1
0
1
5
Ahmed XM
Ahmed XM@ahmedxm01·
In 48 hours, I’ll make someone a millionaire. Someone will touch their first ₦1,000,000 today. Will pick randomly from comments.
English
31.6K
3.9K
34.5K
2M
🌱Emire
🌱Emire@EmireMetaX·
GM Frens ^ It's gonna be blessed Saturday ^ Going to pay all my weekends bills with @useTria's Visa Card ^ Thanks to @MindoAI
🌱Emire tweet media
🌱Emire@EmireMetaX

Good night gTria BestPath: Your Navigation Layer for Crypto Moving assets across chains should not feel complicated. @useTria's BestPath acts as a navigation layer by: → Finding efficient execution routes → Reducing cross-chain complexity → Organizing routing into one guided experience Instead of comparing bridges and protocols manually, users get a smoother path for moving value across ecosystems. Simple routing. Less friction. A better cross-chain experience. Powered by @MindoAI

English
79
5
77
885
Fabrizio Romano
Fabrizio Romano@FabrizioRomano·
🚨🔵 Marco Palestra has completed his medical and signed a six year deal as new Chelsea player. There’s an option for further season until 2033.
Fabrizio Romano tweet media
English
1.4K
4.7K
59K
2.7M