MG X ลงทุนแมน
การเปลี่ยนถ่ายจาก รถเครื่องยนต์สันดาป สู่ EV Car ในประเทศไทย
รถยนต์คันแรกที่วิ่งบนถนนเมืองไทยเกิดขึ้นปี พ.ศ. 2447
หรือเมื่อ 116 ปีที่แล้ว ซึ่งเจ้าพระยาสุรศักดิ์มนตรี เป็นคนนำเข้ามาจากยุโรป
...Continue ReadingMG X invest man
Transformation from combustion engine to EV Car in Thailand
The first car to run on Thailand road happened in the year. B.E. 2447
Or 116 years ago that Chao Phraya Surasak Montri was imported from Europe.
But when the reign of King Rama 5, he saw that it was difficult to use, he ordered German companies to assemble Mercedes to be a throne car that used fuel as a throne.
Over time in Thailand, there are many car brands happening. Both Japanese and European brands have come to set up factory in Thailand.
Until now Thailand becomes the world's number 11 car production base.
Have you ever noticed that from the beginning of 100 years ago to today?
The thing that doesn't change is that most road cars are still combustion engines.
To rely on oil which causes pollution air and pollution noise.
In spite of this time, car camps around the world have created smoke-free automotive technology. Powered by electric energy.
So why is the car that uses combustion engine still running on the road of Thailand?
Investing man will try to analyze it.
The reason combustion engine cars are the most popular in our house.
Apart from every camp, the manufacturer has many models of cars to choose from as they wish.
Another important thing is that it's easy to sell price. It's a market that is easy to buy and sell easily. Whether it's a new or used car.
But the thing that we have to exchange is that the environment is negative from toxic fumes, we have to pay for gas each month. On average, combustion engine car with 1 litres of oil will run 10-15 kilometers.
At the end, it's a busy maintenance fee because there must be consistent check and maintenance of the engine.
Until a time later, HEV hybrid car technology is leading battery and electric motor.
Come in to help make cars more powerful and save more oil.
There are many types of hybrids working methods. It depends on the design of the electric transmission system. It helps to start faster, save more oil or bring electricity to help engine all the time to improve energy.
And another option to market is to operate the electric motor, wheel drive, but it all comes from the ′′ generator that serves the electrical power ′′ engine so that cars can use the advantages of electric motor. That's a quick start. Waiting for the engine round
Which, in any way, the hybrid system still needs to be gased for the engine and exhaust like combustion engine.
And what makes hybrids so unsuccessful is selling more expensive than combustion engine vehicles and engine maintenance costs.
A system that develops later is a hybrid plug-in or a system that adds external energy. This charging system allows cars to be more powerful than before. Electricity in low speeds. Further and more fuel saving, but even more so, the main energy is still oiled while electricity is more supplementary.
As the past 3 systems could fix the fuel saving and better power, but the toxic fumes were created from combustion engine couldn't solve the pollution PM2. 5 pollution.
This is why some car camps are innovating that won't need engine power anymore. That's 100 % electric cars using 100 % electricity and cut off all engine systems which can be recharged from. Exterior and store power at battery. When power is driven, electricity will be sent to motor to drive wheels.
And when cars don't need to drive, which means we don't need to pay for gas, no engine maintenance, no oil, and 100 % electricity usage. It makes driving time no noise, no poisonous smoke.
100 % of electric cars will change our lifestyle from gas station to travel to charging at home similar to mobile phones. Our society is a clean society without PM2. 5 anymore.
By 100 % electric car or BEV Car, it's going to be a leap growing global sales.
Year 2010 Sales of 100 % BEV worldwide 2,881 cars.
Year 2019 Sales of 100 % BEV worldwide 1,502,798 cars.
Only 9 years. BEV Car grows 52,062 %
At this time, there are over 4.5 million BEV car cars running across the globe.
The country with the most BEV cars running on the road is China with approximately 2.5 million cars.
Or think about 55 % of all BEV Car in the world. Secondary is USA and European countries.
The most important reason why BEV Car in many countries around the world is growing. Government bombs support both car manufacturers tax structures to tax deductible to citizens if they buy BEV Car.
Because at this time, many countries are terrified of the climate getting worse.
Specifically, China where many cities are falling in the circle of dust. PM2. 5
And this is happening to Thailand too.
Many people are asking how is the status of the sky train market 100 % BEV Car in our house?
Believe it or not, the EV Car in Thailand includes all-driven vehicles, both hybrid and hybrid plug-ins. Only 1.2 hundred thousand or 1.2 % of personalized cars. All across the country
And in that total, only 1,500 cars are 100 % electric cars or BEV.
The reason BEV Car in Thailand hasn't been informed. Born like other countries.
I have to admit that part of the promotion of the government is not as intense as it should be.
The next thing is that the sale price is still pretty high.
Because no car camp is currently able to produce an EV Car in the country. It costs all of them for import tax.
This story has resulted in the price of BEV Car on the market. Most of them are price starts from 1.8 million Baht.
When things are like this, it makes MG see the gap with importing BEV Car ′′ MG ZS EV ′′
With benefits of import tax 0 % from FTA Thai - China trade policy.
From now on, MG ZS EV can make a sale price of up to 1.19 million baht, cheaper than other BEV Car camps apparently.
This model car has a highlight. It's fully charged 1 times. It can be 337 kilometers and battery guarantee for 8 years.
The thing to follow is
So when are we going to see BEV Car of other car camps. It's priced for normal people to access like MG ZS EV.
So when will we see BEV Car under a million baht like other countries?
So when will we see BEV Car charging at all locations like gas stations.
The answer should be about
Car factory in Thailand will mainly change from the manufacturing of combustion cars.
When will I become a full EV Car?
And how much electric car charging stations will be promoted
This is based on government policies.
And the public sector needs to push it happen too.
And if that day comes
When BEV Car runs on the streets of Thailand
Our eyes won't see black smoke
Our nose won't breathe poisonous smoke
Our ears won't listen loudly from the engine
And it's that time on the road in Thailand
Will be friendly for us all..
References
- Siam Commercial Bank Economic Research Center (SCB EIC)
- MG Sale (Thailand) Co Ltd.Translated
what is gas fee 在 泰華眼裡的泰國 Taihua Lin Facebook 八卦
清邁離曼谷要 10 個小時左右的車程~
想要快一點就一個小時的飛機!
但機票不便宜!
其實有另一種我很推薦的方式!
我個人喜歡搭火車~
第一次搭長途的火車就是去清邁,聽說火車大家就覺得說很累,不會喔,火車是臥鋪!很舒服,睡一個晚上就到了,12 小時左右,省交通費又省住宿費,週末兩天也夠玩!
#看看泰國人怎麼玩
#帶你們去看不同的泰國
#泰華推景點
🏞🚂นอนรถไฟไป 'เชียงใหม่' สิ้นปีนี้ ไม่ต้องลางาน เสาร์ - อาทิตย์ จบครบ แบบราคาประหยัด!!!!
🍃สัมผัสบรรยากาศใหม่บนรถไฟ นั่งชมวิวธรรมชาติสองข้างทาง วิวแบบนี้นึกว่าอยู่เมืองนอก ⛰💕
🚂 ฉึกกะฉัก ปู๊นๆ ถึงเวลาออกเดินทางไปแอ่วเชียงใหม่กับรถไฟ ขบวนใหม่ไฉไลกว่าเดิม กับรถด่วนพิเศษอุตราวิถีขบวน 9 ที่มีความสะดวกสบายครบครัน พ่วงด้วยบรรยากาศสุดฟินของธรรมชาติ ตลอด 2 ข้างทาง 🌥🌿
😍 DAY 1 : ออกเดินทางตอนเย็นจากกรุงเทพ - เชียงใหม่ รถไฟขบวนใหม่ไฉไลกว่าเดิม 🛤
🌻 DAY 2 : ฟินกับธรรมชาติรอบตัวที่แม่กำปอง ต่อด้วยของจุดชมวิวที่ใครว่าไม่แจ่ม แต่ม่อนแจ่ม 🏕
🌈 DAY 3 : เที่ยวแม่แตง ก่อนโบกมือลาเชียงใหม่กลับบ้าน 👍
😘 DAY 1
เริ่มออกเดินทางจากสถานีรถไฟหัวลำโพงเวลา 18:10 น. (แอบกระซิบว่ารถไฟออกตรงเวลานะจ๊ะทุกคน) ขึ้นรถปุ๊ปก็นอนหลับพักผ่อนให้เต็มที่ แอร์เย็นฉ่ำ เตียงหลับสบาย ตื่นเช้ามาเปิดผ้าม่านชมวิวสวยๆ ผ่านกระจกของสองข้างทางสวยฟินเหมือนสวิตเซอร์แลนด์ และเราก็เชียงใหม่กันตอนเช้า เวลา 7:15 น. เรียกได้ว่าถึงปุ๊ปเราก็จะออกไปแอ่วเชียงใหม่กันเลยเจ้า 🎒 👓
🌨 DAY 2
ที่แรกที่เราปักหมุดไปนั่นก็คือ 'หมู่บ้านแม่กำปอง' หมู่บ้านเล็กๆ ยอดฮิตที่ตั้งอยู่ท่ามกลางหุบเขา ออกไปเดินเล่นสัมผัสอากาศเย็นๆ ที่มีอยู่ตลอดทั้งปีรวมถึงวิถีชีวิตของชาวบ้านที่ยังคงเอกลักษณ์และกลมกลืนไปกับธรรมชาติแวดล้อมทั้งน้ำตกและป่าเขา ไม่ว่าจะถ่ายรูปมุมไหน ก็เรียกยอดไลค์ได้ถล่มทลายแน่นอน ⛰
🌳มาฝากท้องมื้อเช้ากันที่ 'The Giant ร้านกาแฟบนต้นไม้ยักษ์' ร้านแอบอิงอยู่กับต้นไม้ใหญ่ สัมผัสความสวยงามและธรรมชาติ ก่อนเข้าไปนั่งทานอาหารเช้าแบบชิลๆ จิบกาแฟซักแก้วเติมพลัง ก่อนเดินข้ามสะพานแขวนเพื่อเข้าไปยังโต๊ะที่นั่งบนต้นไม้ใหญ่ ให้ความรู้สึกตื่นเต้นท้าทายไปอีกแบบ 🥪
🚘 หนีเที่ยวได้ที่ : The Giant ร้านกาแฟบนต้นไม้ยักษ์, แม่กำปอง, เชียงใหม่
📍 พิกัด : https://goo.gl/maps/HJp5LgXa7Wm
🐥แวะไปชิลกับกาแฟที่วิวดีที่สุดของแม่กำปอง ต้องยกให้ 'ร้านกาแฟชมนกชมไม้' เพราะเราสามารถมองลงมาเห็นวิวของทั้งหมู่บ้าน รวมทั้งวิวของภูเขาที่ตั้งอยู่โดยรอบ ด้วยความที่ร้านตั้งอยู่บนจุดที่สูงที่สุดของแม่กำปอง เมื่อสั่งเครื่องดื่มร้อนๆ มาจิบเบาๆ เคล้ากับบรรยากาศหนาวๆ ฟินกว่านี้ไม่มีอีกแล้ว ☕️ 🍰
🚘 หนีเที่ยวได้ที่ : ร้านกาแฟชมนกชมไม้, แม่กำปอง, เชียงใหม่
📍 พิกัด : https://goo.gl/maps/TD6zTkKuqcJ2
🙏🏼 ก่อนออกจากแม่กำปองแวะไปชมโบสถ์กลางน้ำตก 'วัดคันธาพฤกษา (วัดแม่กำปอง)' วัดคู่หมู่บ้านแม่กำปอง ด้วยสถาปัตยกรรมเก่าแก่สไตล์ล้านนาโบราณ มีวิหารที่ทำด้วยไม้สักทองทั้งหลัง และอีกหนึ่งจุดไฮไลท์คือ 'โบสถ์สีขาวกลางน้ำ' รายล้อมด้วยธรรมชาติ แค่แวะชมความสวยงาม ก็รู้สึกจิตใจผ่อนคลายกันเลยทีเดียว 😊
🚘 หนีเที่ยวได้ที่ : วัดคันธาพฤกษา, แม่กำปอง, เชียงใหม่
📍 พิกัด : https://goo.gl/maps/PqWc9MDJF6K2
😻 จากแม่กำปองเราจะไปต่อไปต่อกันที่ ม่อนแจ่ม เพราะ ไม่ว่าจะไปเมื่อไหร่ก็แจ่มเสมอ ระยะทางจากแม่กำปองไปม่อนแจ่ม 75.6 กม. ก็จะได้ 🚙
⛰ เปลี่ยนบรรยากาศไปชมวิวแบบชิวๆ บนดอยที่ 'ม่อนแจ่ม' หนึ่งในจุดชมวิวยอดฮิต ที่มีกิจกรรมให้ทำมากมาย ทั้งเดินเล่น ชมดอกไม้ ถ่ายรูป กินอาหารและเครื่องดื่มริมเขา จนกระทั่ง เล่นฟอร์มูล่าม้ง นอกจากนี้อากาศยังดีตลอดปีด้วยนะ แจ่มสมชื่อจริงๆ 🌸
🚘 หนีเที่ยวได้ที่ : ม่อนแจ่ม, อ.แม่ริม, จ.เชียงใหม่
📍 พิกัด : https://goo.gl/maps/nATCRxKP5Qt
😋 ก่อนเข้าที่พัก นั่งห้อยขาจิบกาแฟ กับวิวน้ำตกสุดชิลล์ที่ 'Jungle De Café' สัมผัสกลิ่นอายธรรมชาติที่โอบล้อมรอบตัว ที่นั่งในร้านจะมีทั้ง Outdoor และ Indoor ซึ่ง Outdoor จะมีทั้งแบบเปลและโต๊ะเก้าอี้ปกติ ซึ่งแน่นอนว่าถ้าหากได้มาสถานที่ชิคๆ แบบนี้ทั้งทีแล้ว เราจะพลาดการถ่ายรูปนอนชิลบนเปล มองเห็นวิวน้ำตกไปได้อย่างไรกัน 🍵
🚘 หนีเที่ยวได้ที่ : Jungle De Café, อ.แม่ริม, จ.เชียงใหม่
📍 พิกัด : https://goo.gl/maps/r9Jk7U1XTsD2
🏕 เที่ยวมาทั้งวันเข้าตกค่ำนอนดูดาว ตื่นเช้ามาดูหมอกที่ 'บ้านภูหมอก' บ้านพักหลังเล็กๆ สุดเก๋ ที่ติดกระจกบานใหญ่ ทำให้เราสามารถมองเห็นวิวสวยๆ และบรรยากาศของธรรมชาติได้จากเตียงนอน เรียกได้ว่าไม่มีอะไรมาบดบังทัศนียภาพความสวยงามของทะเลหมอกในตอนเช้าอย่างแน่นอน 🌄
🚘 หนีเที่ยวได้ที่ : บ้านภูหมอก, อ.แม่ริม, จ.เชียงใหม่
💸 ราคาที่พักเริ่มต้น 1,200 บาท/คืน
📞 ติดต่อ : 082 - 894 - 6861
📍 พิกัด : https://goo.gl/maps/icCLMMf2q3D2
DAY 3
🌥 วันสุดท้ายเวลายังเหลือ ไหว้สาบารมีครูบาเทือที่ 'วัดบ้านเด่น' แวะไปเดินชมความสวยงามตระการตาของวัดที่มีความงดงามเสมือนอยู่ในสวรรค์ และหากได้เดินชมอย่างละเอียด จะเห็นได้ถึงความปราณีตในทุกส่วนของวัด แม้กระทั่งผนังโบสถ์ ซึ่งเกิดจากกับการบูรณะของ 'ครูบาเทือง นาถสีโล' ซึ่งเป็นเจ้าโอวาส 🙇🏼♀️
🚘 หนีเที่ยวได้ที่ : วัดบ้านเด่น, อ.แม่แตง, จ.เชียงใหม่
📍 พิกัด : https://goo.gl/maps/KmobrmrnC5r
🌲 ใช้ชีวิตอยู่กับธรรมชาติให้คุ้มที่ 'น้ำตกบัวตอง' ความสวยงามจากธรรมชาติที่อุดมสมบูรณ์และน้ำที่เย็นสดชื่นน่าเล่น อีกทั้งยังสามารถสนุกไปกับการปีนป่ายน้ำตกไปยังชั้นต่างๆ ได้โดยไม่ต้องกลัวลื่น เพราะว่าที่นี่มีแคลเซียมคาร์บอเนตไหลผ่านจนเคลือบชั้นหินน้ำตกให้กลายเป็นธารหินปูนที่แข็งและไม่ลื่นนั้นเอง 👍🏼
🚘 หนีเที่ยวได้ที่ : น้ำตกบัวตอง, แม่แตง, เชียงใหม่
📍 พิกัด : https://goo.gl/maps/z3TQdz5eByD2
😇 หาอะไรกินก่อนไปขึ้นรถไฟกลับ นั่งพักผ่อนชิวๆ ที่ 'ห้วยตึงเฒ่า' กระท่อมกลางนาบรรยากาศสบายๆ ที่มีสะพานไม้ไผ่ที่ทอดยาวเป็นทางเดินไปกลางทุ่งนา ระหว่างทางมีลานปูเสื่อให้นั่งพัก อีกทั้งยังมีเจ้าหุ่นไล่กาที่ตั้งเด่นสง่าอยู่กลางทุ่งอีกด้วย โดยที่ปลายสุดสะพานจะมีกระท่อมเล็กๆ อยู่หนึ่งหลัง ซึ่งเสิร์ฟน้ำมะพร้าวเย็นๆ ชื่นใจให้แก่ผู้ที่มาเยี่ยมเยียน 🥥
🚘 หนีเที่ยวได้ที่ : ห้วยตึงเฒ่า, เชียงใหม่
📍 พิกัด : https://goo.gl/maps/Asrx1eL7UH22
🕶🎒 เดินทางจากห้วยตึงเฒ่า เข้าตัวเมืองเตรียมตัวโบกมือลาเชียงใหม่ ซึ่งระยะทางจาก 'ห้วยตึงเฒ่า' มาสถานีรถไฟเชียงใหม่ระยะทาง 19 กม. แค่นั้นเอง และเราก็จะใช้บริการรถไฟไทยเหมือนเดิมกับรถด่วนพิเศษอุตราวิถีขบวน 10 ที่จะออกจากเชียงใหม่เวลา 18.00 น. 🚂
🤗 สรุปค่าใช้จ่ายในการเดินทาง 💸 🙏🏻
- ตั๋วรถไฟ ไป-กลับ เที่ยวละ 1,982 บ. / 2 คน = 3,964 บ.
- ค่าที่พักบ้านภูหมอก 1200 บาท / หลัง = 1200 บ.
- เช่ามอเตอร์ไซค์ขับ คันละ 250 บ. / วัน = 500 บ.
- ค่าน้ำมันรถประมาณ 300 บ.
รวม 5,964 บาท / 2 คน
* ค่ากินขึ้นอยู่กับแต่ละคน
สามารถติดตามพวกเราผ่านช่องทาง ‘หนีเที่ยว’ ต่อไปนี้
👍🏻 Facebook : https://bit.ly/2SFis0R
📺 YouTube : http://bit.ly/SneakOutYouTubeS
📱 LINE@ : https://bit.ly/2Qv5ml3
📸 Instagram : https://bit.ly/2VxlEh0
👥 FB Group ‘กลุ่มคนหนีเที่ยว’ : https://bit.ly/2FjnTPj
👥 FB Group ‘กลุ่มตลาดนัดคนหนีเที่ยว’ : https://bit.ly/2Fhn09U
🏞 Sleeping train to 'Chiang Mai' at the end of the year. No need to take a job on Saturday-Sunday. Complete
Experience the new atmosphere on the train. Take a view of nature on two sides. This kind of view. I thought it was
🚂 Chakkacho cuddle Kchoo. It's time to go to go to Chiang Mai with the new train. It's cooler than before. Utrawii Express 9 that is comfortable with the atmosphere. Nature all the time 2 sides of the road 🌥🌿
😍 DAY 1: Evening departure from Bangkok - Chiang Mai. New train is better than before. 🛤
🌻 DAY 2: Satisfied with nature around Mae Kampong with the view point that anyone says it's not cool but mon chaem 🏕
🌈 DAY 3: Travel to Mae Taeng before waving good bye to Chiang Mai home 👍
😘 DAY 1
Start from Hua Lamphong Station at 18:10 (I secretly whisper that the train leaves on time, everyone). I sleep and relax to the air conditioner. Sleep comfortably. Wake up to open the curtain to see the beautiful view through the mirror of the road. Beautiful as Switzerland and we are in the morning at 7:15 Am I? It's called that we will go out to Chiang Mai. 🎒 👓
🌨 DAY 2
The first place we pinned is 'Mae Kampong Village', a popular village located in the valley, out for a walk and experience the cold weather throughout the year, including the villagers that is still unique and blend with nature, the waterfall and No matter what angle you take photos, you can call the likes for sure. ⛰
Let's have breakfast at ' The Giant's coffee shop on the giant tree '. Snapping up with a big tree. Experience the beauty and nature before going to have a nice breakfast. Take a cup of coffee and recharge before walking across the bridge to go into the table. Seat on the big tree. Excited. Another challenge. 🥪
🚘 Escaping at: The Giant coffee shop on the giant tree, Mae Kampong, Chiang Mai.
📍 Location: https://goo.gl/maps/HJp5LgXa7Wm
Stop by to chill with the best coffee at Mae Kampong. We have to see 'Nok Chom Wood Coffee shop' because we can see the view of the whole village, and view of the mountains. The best of Mae Kampong. When you order hot drinks, come to sip softly with the atmosphere. There is no more satisfying than this. ☕️
🚘 Escaping at: Chom Nok Chom Mai coffee shop, Mae Kampong, Chiang Mai
📍 Location: https://goo.gl/maps/TD6zTkKuqcJ2
🙏🏼 Before leaving Mae Kampong, I stopped by to see the church in the middle of the waterfall 'Kanthapruksa temple ( Mae Kampong temple )' Wat Mae Kampong village with ancient Lanna style. There is a temple made of wood. Tattoo Gold and another highlight is 'White Church in the middle of the water' surrounded by nature. Just visit the beauty and feel relaxed. 😊
🚘 Escaping at: Kantha Pruksa temple, Mae Kampong, Chiang Mai.
📍 Location: https://goo.gl/maps/PqWc9MDJF6K2
😻 From Mae Kampong, we will continue to each other at Mon Chaem because no matter when we go, it's always cool. Distance from Mae Kampong to Mon Chaem 75.6 km. I will get it 🚙
⛰ Change the atmosphere to see a chilling view on the mountain at 'Mon Chaem', one of the popular view spots with many activities to do. Take a walk and take photos and drink by the mountain until you play. Also, the weather is good all year long. So cool. 🌸
🚘 Escaping at: Mon Chaem, District. Mae Rim, Province. Chiang Mai Chiang Mai
📍 Location: https://goo.gl/maps/nATCRxKP5Qt
😋 Before going to the accommodation, sipping coffee with the view of 'Jungle De Café', feel the natural smell that has both Outdoor and Indoor and Indoor. Tables, chairs, of course, if we get a chic place like this, how can we miss taking photos on the cradle and see the waterfall 🍵
🚘 Escape at: Jungle De Café, District Mae Rim, Province. Chiang Mai Chiang Mai
📍 Location: https://goo.gl/maps/r9Jk7U1XTsD2
🏕 Travel all day. Sleep in the stars. Wake up to see the fog at 'Ban Phu Fog'. The chic house with the big glass. It makes us see the beautiful view and nature from the bed. There is absolutely nothing to cover the beauty of the sea of the morning 🌄
🚘 Escaping at: Ban Phu Fog, District. Mae Rim, Province. Chiang Mai Chiang Mai
💸 Accommodation price starts from 1,200 baht / night
📞 Contact: 082-894
📍 Location: https://goo.gl/maps/icCLMMf2q3D2
DAY 3
🌥 The last day, there is still time to pay respect to the prestige of teacher at 'Ban Trending temple'. Stop by to see the beauty of the temple that is beautiful as in heaven. And if you can see it, you will see the truth. Mercy in every part of the temple, even the wall of the church, which is caused by the restoration of 'Kru Bathang Silo' which is Ovas 🙇🏼♀️
🚘 Escaping at: Wat Ban Trending, District. Mae Taeng, province. Chiang Mai Chiang Mai
📍 Location: https://goo.gl/maps/KmobrmrnC5r
🌲 Live with nature at 'Bua Tong waterfall'. The beauty of the fresh natural and cool water. It can also enjoy the waterfall to the floors without fear of slippery because there is. Carbonate flows through the rock layer to become a solid and non-slippery limestone. 👍🏼
🚘 Escape at: Bua Tong Waterfall, Mae Taeng, Chiang Mai.
📍 Location: https://goo.gl/maps/z3TQdz5eByD2
😇 Let's find something to eat before going to the train. Sit back to relax at ' Huai Tung old ' in the middle of the field. The atmosphere with long fried bamboo bridge. On the way to the way. There is a crab mat to sit and stay. The Scarecrow is in the middle of the field. At the end of the bridge will have a small cabin which serves cool coconut juice to those who come to those who come 🥥
🚘 Escaping at: Huai Tung Old, Chiang Mai.
📍 Location: https://goo.gl/maps/Asrx1eL7UH22
🕶🎒 Traveling from Huai Tung old to downtown. Prepare to wave goodbye to Chiang Mai. Distance from 'Huai Tung old' to Chiang Mai train station. Distance is 19 km. That's all, and we will use Thai train service as usual with the 10 Express bus that will leave at 18.00 🚂
🤗 Summary of travel expenses 💸 🙏🏻
- Train ticket to-back. 1,982 baht per trip. / 2 person = 3,964 baht.
- Accommodation fee. Ban Phu Fog 1200 baht / back = 1200 baht.
- Motorcycle rental. Driving 250 baht each. / day = 500 baht.
- car gas is around 300 baht.
Total 5,964 baht / 2 person
* Eating fee depends on each person.
You can follow us through the following 'escape' channels.
👍🏻 Facebook: https://bit.ly/2SFis0R
📺 YouTube : http://bit.ly/SneakOutYouTubeS
📱 LINE@ : https://bit.ly/2Qv5ml3
📸 Instagram: https://bit.ly/2VxlEh0
👥 FB Group 'Escaping Group': https://bit.ly/2FjnTPj
👥 FB Group 'flea market group': https://bit.ly/2Fhn09UTranslated
what is gas fee 在 Taipei Ethereum Meetup Facebook 八卦
📜 [專欄新文章] Reason Why You Should Use EIP1167 Proxy Contract. (With Tutorial)
✍️ Ping Chen
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
EIP1167 minimal proxy contract is a standardized, gas-efficient way to deploy a bunch of contract clones from a factory.
1. Who may consider using EIP1167
For some DApp that are creating clones of a contract for its users, a “factory pattern” is usually introduced. Users simply interact with the factory to get a copy. For example, Gnosis Multisig Wallet has a factory. So, instead of copy-and-paste the source code to Remix, compile, key in some parameters, and deploy it by yourself, you can just ask the factory to create a wallet for you since the contract code has already been on-chain.
The problem is: we need standalone contract instances for each user, but then we’ll have many copies of the same bytecode on the blockchain, which seems redundant. Take multisig wallet as an example, different multisig wallet instances have separate addresses to receive assets and store the wallet’s owners’ addresses, but they can share the same program logic by referring to the same library. We call them ‘proxy contracts’.
One of the most famous proxy contract users is Uniswap. It also has a factory pattern to create exchanges for each ERC20 tokens. Different from Gnosis Multisig, Uniswap only has one exchange instance that contains full bytecode as the program logic, and the remainders are all proxies. So, when you go to Etherscan to check out the code, you’ll see a short bytecode, which is unlikely an implementation of an exchange.
0x3660006000376110006000366000732157a7894439191e520825fe9399ab8655e0f7085af41558576110006000f3
What it does is blindly relay every incoming transaction to the reference contract 0x2157a7894439191e520825fe9399ab8655e0f708by delegatecall.
Every proxy is a 100% replica of that contract but serving for different tokens.
The length of the creation code of Uniswap exchange implementation is 12468 bytes. A proxy contract, however, has only 46 bytes, which is much more gas efficient. So, if your DApp is in a scenario of creating copies of a contract, no matter for each user, each token, or what else, you may consider using proxy contracts to save gas.
2. Why use EIP1167
According to the proposal, EIP is a “minimal proxy contract”. It is currently the known shortest(in bytecode) and lowest gas consumption overhead implementation of proxy contract. Though most ERCs are protocols or interfaces, EIP1167 is the “best practice” of a proxy contract. It uses some EVM black magic to optimize performance.
EIP1167 not only minimizes length, but it is also literally a “minimal” proxy that does nothing but proxying. It minimizes trust. Unlike other upgradable proxy contracts that rely on the honesty of their administrator (who can change the implementation), address in EIP1167 is hardcoded in bytecode and remain unchangeable.
That brings convenience to the community.
Etherscan automatically displays code for EIP1167 proxies.
When you see an EIP1167 proxy, you can definitely regard it as the contract that it points to. For instance, if Etherscan finds a contract meets the format of EIP1167, and the reference implementation’s code has been published, it will automatically use that code for the proxy contract. Unfortunately, non-standard EIP1167 proxies like Uniswap will not benefit from this kind of network effect.
3. How to upgrade a contract to EIP1167 compatible
*Please read all the steps before use, otherwise there might have problems.
A. Build a clone factory
For Vyper, there’s a function create_with_code_of(address)that creates a proxy and returns its address. For Solidity, you may find a reference implementation here.
function createClone(address target) internal returns (address result){ bytes20 targetBytes = bytes20(target); assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) result := create(0, clone, 0x37) }}
You can either deploy the implementation contract first or deploy it with the factory’s constructor. I’ll suggest the former, so you can optimize it with higher runs.
contract WalletFactory is CloneFactory { address Template = "0xc0ffee"; function createWallet() external returns (address newWallet) { newWallet = createClone(Template); }}
B. Replace constructor with initializer
When it comes to a contract, there are two kinds of code: creation code and runtime code. Runtime code is the actual business logic stored in the contract’s code slot. Creation code, on the other hand, is runtime code plus an initialization process. When you compile a solidity source code, the output bytecode you get is creation code. And the permanent bytecode you can find on the blockchain is runtime code.
For EIP1167 proxies, we say it ‘clones’ a contract. It actually clones a contract’s runtime code. But if the contract that it is cloning has a constructor, the clone is not 100% precise. So, we need to slightly modify our implementation contract. Replace the constructor with an ‘initializer’, which is part of the permanent code but can only be called once.
// constructorconstructor(address _owner) external { owner = _owner;}// initializerfunction set(address _owner) external { require(owner == address(0)); owner = _owner;}
Mind that initializer is not a constructor, so theoretically it can be called multiple times. You need to maintain the edge case by yourself. Take the code above as an example, when the contract is initialized, the owner must never be set to 0, or anyone can modify it.
C. Don’t assign value outside a function
As mentioned, a creation code contains runtime code and initialization process. A so-called “initialization process” is not only a constructor but also all the variable assignments outside a function. If an EIP1167 proxy points to a contract that assigns value outside a function, it will again have different behavior. We need to remove them.
There are two approaches to solve this problem. The first one is to turn all the variables that need to be assigned to constant. By doing so, they are no longer a variable written in the contract’s storage, but a constant value that hardcoded everywhere it is used.
bytes32 public constant symbol = "4441490000000000000000000000000000000000000000000000000000000000";uint256 public constant decimals = 18;
Second, if you really want to assign a non-constant variable while initializing, then just add it to the initializer.
mapping(address => bool) public isOwner;uint public dailyWithdrawLimit;uint public signaturesRequired;
function set(address[] _owner, uint limit, uint required) external { require(dailyWithdrawLimit == 0 && signaturesRequired == 0); dailyWithdrawLimit = limit; signaturesRequired = required; //DO SOMETHING ELSE}
Our ultimate goal is to eliminate the difference between runtime code and creation code, so EIP1167 proxy can 100% imitate its implementation.
D. Put them all together
A proxy contract pattern splits the deployment process into two. But the factory can combine two steps into one, so users won’t feel different.
contract multisigWallet { //wallet interfaces function set(address[] owners, uint required, uint limit) external;}contract walletFactory is cloneFactory { address constant template = "0xdeadbeef"; function create(address[] owners, uint required, uint limit) external returns (address) { address wallet = createClone(template); multisigWallet(wallet).set(owners, required, limit); return wallet; }}
Since both the factory and the clone/proxy has exactly the same interface, no modification is required for all the existing DApp, webpage, and tools, just enjoy the benefit of proxy contracts!
4. Drawbacks
Though proxy contract can lower the storage fee of deploying multiple clones, it will slightly increase the gas cost of each operation in the future due to the usage of delegatecall. So, if the contract is not so long(in bytes), and you expect it’ll be called millions of times, it’ll eventually be more efficient to not use EIP1167 proxies.
In addition, proxy pattern also introduces a different attack vector to the system. For EIP1167 proxies, trust is minimized since the address they point to is hardcoded in bytecode. But, if the reference contract is not permanent, some problems may happen.
You might ever hear of parity multisig wallet hack. There are multiple proxies(not EIP1167) that refer to the same implementation. However, the wallet has a self-destruct function, which empties both the storage and the code of a contract. Unfortunately, there was a bug in Parity wallet’s access control and someone accidentally gained the ownership of the original implementation. That did not directly steal assets from other parity wallets, but then the hacker deleted the original implementation, making all the remaining wallets a shell without functionality, and lock assets in it forever.
https://cointelegraph.com/news/parity-multisig-wallet-hacked-or-how-come
Conclusion
In brief, the proxy factory pattern helps you to deploy a bunch of contract clones with a considerably lower gas cost. EIP1167 defines a bytecode format standard for minimal proxy and it is supported by Etherscan.
To upgrade a contract to EIP1167 compatible, you have to remove both constructor and variable assignment outside a function. So that runtime code will contain all business logic that proxies may need.
Here’s a use case of EIP1167 proxy contract: create adapters for ERC1155 tokens to support ERC20 interface.
pelith/erc-1155-adapter
References
https://eips.ethereum.org/EIPS/eip-1167
https://blog.openzeppelin.com/on-the-parity-wallet-multisig-hack-405a8c12e8f7/
Donation:
pingchen.eth
0xc1F9BB72216E5ecDc97e248F65E14df1fE46600a
Reason Why You Should Use EIP1167 Proxy Contract. (With Tutorial) was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌