[葬禮進行曲]你四十歲人,去過幾多次葬禮?
TLDR :Always Go To Other People's Funerals — Otherwise, They Won't Come To Yours
==============
一週年!月頭訂最抵!比別人知得多。subscribe now(https://bityl.co/4Y0h)。Ivan Patreon,港美市場評點,專題號外,每日一圖,好文推介。每星期6篇,月費100,已經1900人訂! 畀年費仲有85折,20/40年費VIP 送本人著作一本。
==============
1. 而家聲名極臭嘅朱利安尼,講過相當老派嘅人情世故嘢:婚禮呢,其實唔得閒真係未必要去,反正錦上添花,少你一個唔少。但葬禮,雪中送炭,務必要去支持遺屬,多你一個好多。況且,人可以唔結婚,結婚亦可以唔行禮,但總會死。死咗嘅,唔係完全無親友嘅,總會做啲嘢。當然明顯唔係佢發明呢套講法,佢只係在書講,我亦只係聽人講佢本書講
2. 況且葬禮,相當Flexible,流水席,幾時就到時間咪過去,見到遺屬講兩句,望下有冇識嘅人,喜歡嘅好快都走得。
3. 後生嘅朋友寫咗篇文(https://lkdin.io/3VOb),佢剛四十,即係後生我幾年。咁我呢幾年都冇去過葬禮(我記錯嘅請你報夢話我知),所以我四十時嘅數字,同而家一樣。朋友話三個或四個,咁我應該多過佢。你可以計下,去到你四十歲為止,去過幾多個葬禮。未夠嘅?「自己pro rata返」。「當然唔好計咩法治已死香港已死嗰啲一日去幾次嘅」
4. 當中,不存在咩「四十歲人應該去過幾多次葬禮」,正如我不打算研究「四十歲人應該打過幾次飛機/有過幾多性伴」之類。但背後,總會反映到啲嘢。雖然又話人老咗去嘅葬禮多咗,但照計四十歲呢,你同年啲朋友,一般都未死。你去嘅都係長輩之類,細細個都可以去。
5. 朋友話去得少,反映佢毒,冇乜朋友,同屋企人關係惡劣。可能都有啲關係。我都冇乜朋友,同屋企人關係都惡劣(但好似冇佢咁惡劣,真係人上有人)。但仲有好多因素影響,例如你有另一半嘅,往往就去多一倍。
6. 我試下數,我去過嘅葬禮,應該八個?有兩個我好似冇印象有去到,但照計我係有去的。然後寫完呢篇文我就會洗自己腦,十年後我就又變得肯定自己有去。人嘅記憶幾咁唔好可告!況且我地年代唔興「懷念爺爺」咁影響,好似暫時我都冇在殯儀館打過卡。(然後我查返手機app,原來係有!三次!都話記億唔可靠。咁其實殯儀館打卡冇乜嘢。冇人叫你在入面打嘛。)
7. 我父母好早生我,老母今年62,老豆64.兩個都唔食煙(老豆N年前食,戒咗好耐),所以根據大數法則,健在嘅機會比較大。咁你估到,八個之中佔咗四個嘅,就係阿爺阿麻,阿公阿婆,全數釘蓋,好合理。
8. 我嘗試排序,雖然未必太準。但,頭兩次應該最震憾,冇經驗嘛,況且細個(雖然都十歲以上),有啲驚的。
9. 第一個死嘅,係我阿公,我讀緊小學,四五年班咁上下?嗰時放學成日同老婆出去瑪嘉烈探病。應該係九龍大酒店?冇玩咩破地獄嗰啲,但都真係都仲係一回事,去足全程,同學校請假的。冇守夜,或者有人有但我冇份。阿公印象都多,細個在石圍角村,拎佢本不文集睇,佢又會帶我飲西茶,西多士冇餡嘅年代,幾咁美好。星期六佢睇賽馬,我就睇中間插播嘅大力水手,或者德國波。不過死嘅人太多,不能個個講好詳細
10. 之後係我阿爺,更加親近。冇錯係我出世時已經著咗草去台灣嗰個,堅稱自己冇收片但又走咗佬嗰個。但我有記憶時,佢已經返咗香港做返老正,當然亦唔見有乜錢(聽聞在台灣敗晒)。阿爺嘅感覺,就係唔係幾好老脾,但又唔係會打我嗰種,都係慈祥嘅。但又不過,我完全不能將佢同差佬扯上關係,雖然我一路都知,但總係覺得好似換咗另一個人。阿爺都算死得早,大約我中二三時死咗。嗰時佢臥病在床,我仲在側邊打機,真係不孝。記得佢死前健康當然更差,脾氣亦差,好多嘢唔食得,最記得成日要食田雞—唔係佢要食,係好似唔食得其他嘢。嗰時就開始知道死亡,可以揀真係長痛不如短痛,但邊度你揀?我唔相信阿公或阿爺咁選擇。當然佢地亦未去到話受好多痛苦,或者吊住好耐咁。阿爺最後死在大陸,唔知返去搵神醫定換腎定乜鬼。就係記得解穢酒食過「黃埔炒蛋」,記得阿麻好似幾風騷。唔知係因為照顧病人好累丫(咁阿爺病重時都真係好臭脾氣),定係拎咗唔少錢。冇錯,阿爺到底有幾錢遺產,去咗邊,都係大家扯貓尾,永遠冇真相,有人話根本冇,有人話去咗我阿麻度,有人話去咗我老豆度(應該都有啲),總之冇一仙去過我度。
11. 講咗咁耐先兩件,加快速度。見到嘛?阿公阿爺死先,佢地老婆反而擺耐好多。咁好合理,一來女人長命過男人,二來佢地娶老婆都揀後生,阿公更加係再娶,所以阿婆未咁快。由我中二定中三(1992?),打後十年,好似都冇再去過葬禮。阿婆幾時去架呢?慚愧,我都真係唔係好記得。細個當然都有啲感情,但後來阿婆已住老人院,咁大家知,慢慢就少深,我就更加少去 —唔好記嗰時我已經高中或者大學,有自己多姿多彩嘅生活,主要係溝下女做下愛咁,點都好玩過去老人院吧?你反對嘅,我同你交換。直到而家,我都唔記得阿婆幾時死,甚至唔記得我有冇去佢葬禮(希望阿婆唔好上嚟留言話:仆街仔!你死我都未死呀!),但合理地假設,應該總有出現下?當埘我同我老母關係未咁惡劣,佢叫我去我應該會去。不過又諗下,實情阿婆唔係佢親老母(都話再娶),至於我老母親母,我冇見過的,好早死咗。
12. 然後,又好似一輪高峰,嗰幾年去較多。我阿麻死咗,好似十年前多啲?留意佢最後就住在我而家住嘅地方,佢瞓廳(唔通我瞓?況且床架高,佢爬唔到)。事實佢臨終前幾年,都係同我一齊生活嘅。我係咪喪盡天良?都未完全係嘅。有時都會慚愧,冇陪佢多啲。佢健康尚好時,都試過我返工拎漏嘢佢拎去中環畀我(!),又或者我要帶女返屋企搞嘢時,醒一百蚊畀佢落去飲茶(唔係點?)。
13. 無論如何,當時已經有Facebook,亦係比較深刻嘅。當時係年尾,阿麻之前健康並唔特別差,即係長命病嗰啲當然有,但佢話唔舒服入醫院時,都仲係自己執嘢自己叫車。佢去醫院時我都探過下佢,都仲係幾健康。但話咁快。有一日我老母打嚟,就同我講,「你阿麻走咗啦」。我想講,我老母當時在屯門醫院返工,阿麻亦都住屯門醫院,我真係以為佢嘅走咗係出咗院,然後佢先話我知。當時我在公司,仲係十分搏命嘅分析員,我甚至諗緊使唔使放工先去,好似有上Facebook出post,甚至諗係咪要坐的士之類。無論如何最後就坐的士,去到叫做見佢最後一面(已香,但仲在床上,明啦)。
14. 往後嘅事,好多人都聽過。見完最後一面,不過係午飯時間咁上下?我返咗屋企瞓(分析員嗰時七點幾就返到公司,我係摸黑出門的)。然後?我去咗旺角。做乜?睇戲。同埃汾太睇戲。睇嗰套戲,叫做《3D娜塔莉的情人》,聲稱係全世界第一套3D韓片,條韓妹好靚,又好波,我都冇深究係咪整,有乜關係?
15. 我走咗去睇《3D娜坦莉的情人》(https://bityl.co/8Hsd),非常之卡繆,非常之《異鄉人》。我甚至應該係因為睇咗《異鄉人》先會咁。成件事我已經唔係好記得。我上一次寫文,係講「咁買咗飛丫嘛,唔通唔睇,點預到佢咁啱嗰日死」。但,我諗返件事唔係好合情理,首先嗰個年代,我好似仲唔多興網上買飛。之但係又不過,如果我唔係一早買咗飛,照計我唔會特登出旺角睇戲?Anyway同埃汾太睇完,就梗係上床啦。都話十分之《異鄉人》(正因如此,如果我冇買飛,點會特登出旺角?唔係叫埃汾太返屯門會簡單啲?留意我午飯已經返咗屯門)。第二日,我照樣七點半返到公司。冇能力的人嘛,唯有早返工。
16. 埃汾太當然都見過阿麻,食過好多次飯,當然都有去葬禮,不過遺憾阿麻冇機會見到我成婚。亦冇機會同我影畢業相。當然遺憾係佢嘅遺憾,我先唔理呢啲嘢。咁而結婚亦冇可能特登就阿麻,況且當時亦唔知佢就死,佢都唔知自己咁快死。但畢業相嘛,理論上可以就老人家嘅,不過事實上港大行畢業禮時我已去咗英國,英國行禮時我又返咗香港,而我又唔會唔係正日自己搵套衫同勞蘇影相咁
17. 第幾個?數完第四個。然後第五個,我老豆老婆(非我老母,但亦唔係「後母」,都冇一齊生活過,正如我老母老公我都唔會叫「後父」,佢出現時我都中七啦大佬),其實時序上早過我阿麻,但舖排上好似應講晒麻爺公婆先。實在件事有點複雜,我亦都唔係好想講。當然唔係死者嘅問題,又唔係我問題,係顧及下其他人感受。話說我老豆老母,在我阿爺死後就好似離咗婚,冇因果關係,但時間大約係咁。我老母再嫁但冇小朋友,我老豆再娶,生多咗件,所以我有個同父異母嘅妹,不過比較少提,亦唔係十分熟。但講時講,我老豆呢個再娶嘅對象,廿年前左右就死咗,自殺的,燒炭,成件事十分震憾。當時係我大學畢業後,去英國之前,我在老豆公司過下日晨(係佢返工嘅公司,唔係佢開間公司咁爽)。佢都有講另一半抑鬱症呀之類,然後事發當日我甚至係同佢一齊在公司的,不過冇同佢一齊返去破門,嗯,成件事都幾震憾,所以我都唔係好想講太多。佢嘅葬禮我有冇去?我估應該有吧?(我同死者關係並不差,反正都唔會成日見到,亦冇啲啲咩「你拆散咗我屋企」嘅憤恨,畢竟真係冇人拎支槍迫我老豆有婚外情的,對不?)
18. 第六個,我外母。同樣地,涉及其他未死嘅人不講太多。當時我已經結咗婚,當然係有去葬禮的。不過講真,結婚冇耐外母就去咗,一直都唔係太多交集,同外父就多啲。外交仲係好健康,日日炒股票,大家有心。
19. 第七八個,算唔算特別少少?第七個係恐龍,冇錯,就係叫恐龍。中學同學嘅大學同學,成班一齊玩,稱不上極之好朋友,但至少會私下傾計兩個人食飯咁。點死的?自殺。我仲記得佢在甚麼教堂定乜做後事,平日嘅夜晚,我仲要一半走咗出去同倫敦鬼定美國鬼conference call講港交所。嗰時嘅工作真係十分困身。真係搞搞下嘢在時鐘酒店 conference call又有,聽聞有人一路conference call一路被吹蕭(唔通幫人吹咩),無從證實,但唔係我。亡友好多金句,被其他朋友拎出嚟講,例如嗰句「呢啲我愛你呀會結婚呀,性行為嘅潤滑劑嚟啫,唔想講嘅咪去樓下買支KY,雖然凍啲但效果唔爭太遠」,好多人以為係佢創作,實情係我話佢,佢發揚光大的。
20. 如果我冇記錯,亡友好似細我兩年,副作用就係我在英國返嚟香港後,仲會借用佢啲大學戶口做各樣嘢,例如上呢個 data base搵工.我最記得,好似嗰時佢畢業我未搵到工,佢都有安撫我,同我講,「唔緊要,一個恐龍倒下,仲有竹萬萬隻恐龍」—講嘅係佢細佬仲讀緊大學。不過後來我冇用到恐龍二號,放心,我搵到工,佢都搵到,佢死時我都差不多離開金英了,好似2012年前後?
21. 多得電話,我都仲保留住同佢最後嘅message(當然唔知佢自殺),就係我推介完元朗嘅煲仔飯,佢覺得好正。就係咁。後來我都仲成日去,都會諗起佢,雖然我同佢冇一齊食過。
22. 最後一個,你可以話「最不重要」,但亦係性質上完全唔同。工作上嘅……前輩?唔係我本書鳴謝嗰幾個,但係嗰堆人。亦都係自殺,相當震驚。佢不算同我極熟絡(雖然我在倫敦出trip佢都打畀我有嘢搵我救火),亦唔算直接幫咗我極多嘢(咁當然都有啲)。但始終係個慈祥嘅長者,亦係業界有啲聲望嘅人。壇嘢都搞得幾大,俗啲講句,生前好友們幫佢風光大葬,算係極度榮哀?未致於好似「大時代」咁,但的確見到一啲猛人,甚至會同我講「佢都有提起你」。
23. 我記得應該係英國脫歐公投嗰年(冇錯,相入面嗰次,睇返日子正係公投之後嗰日),就係我最後一次去葬禮,就係呢位前輩。我嗰日不停心諗,到底葬禮係咩回事?係畀邊個睇(當然係畀生嘅人睇),係為咗表達大家對佢懷念?定係話畀大家知,第時你死咗大家都會咁對你?
24. 總之,都係嗰句,Always Go To Other People's Funerals — Otherwise, They Won't Come To Yours
25. 冇乜特別,都唔算寫得特別好,甚至差過我朋友,「都幾大鑊」,只係留個紀錄。另外,關於葬禮,寫過篇舊文,原來都未夠一年前。舊文就寫得幾好(https://fbook.cc/3Z0d)
26. 不過有個講法,一個人死兩次,最後一次有人提起佢地先係真正死。咁以上呢啲故人,我又幫佢地續一續命咁,個感覺好似泊車餵錶咁。以前仲有個紅色旗,十分有實感。
==============
一週年!月頭訂最抵!比別人知得多。subscribe now(https://bityl.co/4Y0h)。Ivan Patreon,港美市場評點,專題號外,每日一圖,好文推介。每星期6篇,月費100,已經1900人訂! 畀年費仲有85折,20/40年費VIP 送本人著作一本。
==============
同時也有14部Youtube影片,追蹤數超過5,230的網紅初心者鉄道探検隊,也在其Youtube影片中提到,2018年11月28日撮影 武蔵境駅 西武多摩川線 1917年(大正6年)10月22日開業 2006年(平成18年)12月8日多摩川線の駅ホームを高架に切り替え 2017年度の1日平均乗降人員は30,493人で西武鉄道の全92駅中33位 Musashi-Sakai Station Seibu Tam...
pro rata to 在 Scholarship for Vietnamese students Facebook 的精選貼文
[Fully funded] - Học bổng ASEAN-Australia Health Security Fellowships
Lâu lắm rồi chị mới thấy lại một học bổng Úc siêu to khổng lồ vậy đó các em. Đặc biệt đây là học bổng hiếm dành riêng cho các bạn làm trong lĩnh vực dịch tễ và/hoặc y tế công cộng tại Việt Nam.
Tên chương trình là Master of Philosophy in Applied Epidemiology tại Australian National University (ANU).
Thông tin cơ bản về Fellowship như sau:
• a stipend for living costs (26,000 AUD per annum, pro-rata) for a period of 22 months,
• ANU tuition fees,
• accommodation and travel to attend course blocks in Canberra, Australia, and
• a contribution towards field work expenses.
Các thông tin chi tiết khác của học bổng em tham khảo ở đường link sau: https://health.anu.edu.au/study/research/master-philosophy-applied-epidemiology-mae
#HannahEd #duhoc #hocbong #sanhocbong #scholarshipforVietnamesestudents
pro rata to 在 Taipei Ethereum Meetup Facebook 的最佳解答
📜 [專欄新文章] Uniswap v3 Features Explained in Depth
✍️ 田少谷 Shao
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
Once again the game-changing DEX 🦄 👑
Image source: https://uniswap.org/blog/uniswap-v3/
Outline
0. Intro1. Uniswap & AMM recap2. Ticks 3. Concentrated liquidity4. Range orders: reversible limit orders5. Impacts of v36. Conclusion
0. Intro
The announcement of Uniswap v3 is no doubt one of the most exciting news in the DeFi place recently 🔥🔥🔥
While most have talked about the impact v3 can potentially bring on the market, seldom explain the delicate implementation techniques to realize all those amazing features, such as concentrated liquidity, limit-order-like range orders, etc.
Since I’ve covered Uniswap v1 & v2 (if you happen to know Mandarin, here are v1 & v2), there’s no reason for me to not cover v3 as well ✅
Thus, this article aims to guide readers through Uniswap v3, based on their official whitepaper and examples made on the announcement page. However, one needs not to be an engineer, as not many codes are involved, nor a math major, as the math involved is definitely taught in your high school, to fully understand the following content 😊😊😊
If you really make it through but still don’t get shxt, feedbacks are welcomed! 🙏
There should be another article focusing on the codebase, so stay tuned and let’s get started with some background noise!
1. Uniswap & AMM recap
Before diving in, we have to first recap the uniqueness of Uniswap and compare it to traditional order book exchanges.
Uniswap v1 & v2 are a kind of AMMs (automated market marker) that follow the constant product equation x * y = k, with x & y stand for the amount of two tokens X and Y in a pool and k as a constant.
Comparing to order book exchanges, AMMs, such as the previous versions of Uniswap, offer quite a distinct user experience:
AMMs have pricing functions that offer the price for the two tokens, which make their users always price takers, while users of order book exchanges can be both makers or takers.
Uniswap as well as most AMMs have infinite liquidity¹, while order book exchanges don’t. The liquidity of Uniswap v1 & v2 is provided throughout the price range [0,∞]².
Uniswap as well as most AMMs have price slippage³ and it’s due to the pricing function, while there isn’t always price slippage on order book exchanges as long as an order is fulfilled within one tick.
In an order book, each price (whether in green or red) is a tick. Image source: https://ftx.com/trade/BTC-PERP
¹ though the price gets worse over time; AMM of constant sum such as mStable does not have infinite liquidity
² the range is in fact [-∞,∞], while a price in most cases won’t be negative
³ AMM of constant sum does not have price slippage
2. Tick
The whole innovation of Uniswap v3 starts from ticks.
For those unfamiliar with what is a tick:
Source: https://www.investopedia.com/terms/t/tick.asp
By slicing the price range [0,∞] into numerous granular ticks, trading on v3 is highly similar to trading on order book exchanges, with only three differences:
The price range of each tick is predefined by the system instead of being proposed by users.
Trades that happen within a tick still follows the pricing function of the AMM, while the equation has to be updated once the price crosses the tick.
Orders can be executed with any price within the price range, instead of being fulfilled at the same one price on order book exchanges.
With the tick design, Uniswap v3 possesses most of the merits of both AMM and an order book exchange! 💯💯💯
So, how is the price range of a tick decided?
This question is actually somewhat related to the tick explanation above: the minimum tick size for stocks trading above 1$ is one cent.
The underlying meaning of a tick size traditionally being one cent is that one cent (1% of 1$) is the basis point of price changes between ticks, ex: 1.02 — 1.01 = 0.1.
Uniswap v3 employs a similar idea: compared to the previous/next price, the price change should always be 0.01% = 1 basis point.
However, notice the difference is that in the traditional basis point, the price change is defined with subtraction, while here in Uniswap it’s division.
This is how price ranges of ticks are decided⁴:
Image source: https://uniswap.org/whitepaper-v3.pdf
With the above equation, the tick/price range can be recorded in the index form [i, i+1], instead of some crazy numbers such as 1.0001¹⁰⁰ = 1.0100496621.
As each price is the multiplication of 1.0001 of the previous price, the price change is always 1.0001 — 1 = 0.0001 = 0.01%.
For example, when i=1, p(1) = 1.0001; when i=2, p(2) = 1.00020001.
p(2) / p(1) = 1.00020001 / 1.0001 = 1.0001
See the connection between the traditional basis point 1 cent (=1% of 1$) and Uniswap v3’s basis point 0.01%?
Image source: https://tenor.com/view/coin-master-cool-gif-19748052
But sir, are prices really granular enough? There are many shitcoins with prices less than 0.000001$. Will such prices be covered as well?
Price range: max & min
To know if an extremely small price is covered or not, we have to figure out the max & min price range of v3 by looking into the spec: there is a int24 tick state variable in UniswapV3Pool.sol.
Image source: https://uniswap.org/whitepaper-v3.pdf
The reason for a signed integer int instead of an uint is that negative power represents prices less than 1 but greater than 0.
24 bits can cover the range between 1.0001 ^ (2²³ — 1) and 1.0001 ^ -(2)²³. Even Google cannot calculate such numbers, so allow me to offer smaller values to have a rough idea of the whole price range:
1.0001 ^ (2¹⁸) = 242,214,459,604.341
1.0001 ^ -(2¹⁷) = 0.000002031888943
I think it’s safe to say that with a int24 the range can cover > 99.99% of the prices of all assets in the universe 👌
⁴ For implementation concern, however, a square root is added to both sides of the equation.
How about finding out which tick does a price belong to?
Tick index from price
The answer to this question is rather easy, as we know that p(i) = 1.0001^i, simply takes a log with base 1.0001 on both sides of the equation⁴:
Image source: https://www.codecogs.com/latex/eqneditor.php
Let’s try this out, say we wanna find out the tick index of 1000000.
Image source: https://ncalculators.com/number-conversion/log-logarithm-calculator.htm
Now, 1.0001¹³⁸¹⁶² = 999,998.678087146. Voila!
⁵ This formula is also slightly modified to fit the real implementation usage.
3. Concentrated liquidity
Now that we know how ticks and price ranges are decided, let’s talk about how orders are executed in a tick, what is concentrated liquidity and how it enables v3 to compete with stablecoin-specialized DEXs (decentralized exchange), such as Curve, by improving the capital efficiency.
Concentrated liquidity means LPs (liquidity providers) can provide liquidity to any price range/tick at their wish, which causes the liquidity to be imbalanced in ticks.
As each tick has a different liquidity depth, the corresponding pricing function x * y = k also won’t be the same!
Each tick has its own liquidity depth. Image source: https://uniswap.org/blog/uniswap-v3/
Mmm… examples are always helpful for abstract descriptions 😂
Say the original pricing function is 100(x) * 1000(y) = 100000(k), with the price of X token 1000 / 100 = 10 and we’re now in the price range [9.08, 11.08].
If the liquidity of the price range [11.08, 13.08] is the same as [9.08, 11.08], we don’t have to modify the pricing function if the price goes from 10 to 11.08, which is the boundary between two ticks.
The price of X is 1052.63 / 95 = 11.08 when the equation is 1052.63 * 95 = 100000.
However, if the liquidity of the price range [11.08, 13.08] is two times that of the current range [9.08, 11.08], balances of x and y should be doubled, which makes the equation become 2105.26 * 220 = 400000, which is (1052.63 * 2) * (110 * 2) = (100000 * 2 * 2).
We can observe the following two points from the above example:
Trades always follow the pricing function x * y = k, while once the price crosses the current price range/tick, the liquidity/equation has to be updated.
√(x * y) = √k = L is how we represent the liquidity, as I say the liquidity of x * y = 400000 is two times the liquidity of x * y = 100000, as √(400000 / 100000) = 2.
What’s more, compared to liquidity on v1 & v2 is always spread across [0,∞], liquidity on v3 can be concentrated within certain price ranges and thus results in higher capital efficiency from traders’ swapping fees!
Let’s say if I provide liquidity in the range [1200, 2800], the capital efficiency will then be 4.24x higher than v2 with the range [0,∞] 😮😮😮 There’s a capital efficiency comparison calculator, make sure to try it out!
Image source: https://uniswap.org/blog/uniswap-v3/
It’s worth noticing that the concept of concentrated liquidity was proposed and already implemented by Kyper, prior to Uniswap, which is called Automated Price Reserve in their case.⁵
⁶ Thanks to Yenwen Feng for the information.
4. Range orders: reversible limit orders
As explained in the above section, LPs of v3 can provide liquidity to any price range/tick at their wish. Depending on the current price and the targeted price range, there are three scenarios:
current price < the targeted price range
current price > the targeted price range
current price belongs to the targeted price range
The first two scenarios are called range orders. They have unique characteristics and are essentially fee-earning reversible limit orders, which will be explained later.
The last case is the exact same liquidity providing mechanism as the previous versions: LPs provide liquidity in both tokens of the same value (= amount * price).
There’s also an identical product to the case: grid trading, a very powerful investment tool for a time of consolidation. Dunno what’s grid trading? Check out Binance’s explanation on this, as this topic won’t be covered!
In fact, LPs of Uniswap v1 & v2 are grid trading with a range of [0,∞] and the entry price as the baseline.
Range orders
To understand range orders, we’d have to first revisit how price is discovered on Uniswap with the equation x * y = k, for x & y stand for the amount of two tokens X and Y and k as a constant.
The price of X compared to Y is y / x, which means how many Y one can get for 1 unit of X, and vice versa the price of Y compared to X is x / y.
For the price of X to go up, y has to increase and x decrease.
With this pricing mechanism in mind, it’s example time!
Say an LP plans to place liquidity in the price range [15.625, 17.313], higher than the current price of X 10, when 100(x) * 1000(y) = 100000(k).
The price of X is 1250 / 80 = 15.625 when the equation is 80 * 1250 = 100000.
The price of X is 1315.789 / 76 = 17.313 when the equation is 76 * 1315.789 = 100000.
If now the price of X reaches 15.625, the only way for the price of X to go even higher is to further increase y and decrease x, which means exchanging a certain amount of X for Y.
Thus, to provide liquidity in the range [15.625, 17.313], an LP needs only to prepare 80 — 76 = 4 of X. If the price exceeds 17.313, all 4 X of the LP is swapped into 1315.789 — 1250 = 65.798 Y, and then the LP has nothing more to do with the pool, as his/her liquidity is drained.
What if the price stays in the range? It’s exactly what LPs would love to see, as they can earn swapping fees for all transactions in the range! Also, the balance of X will swing between [76, 80] and the balance of Y between [1250, 1315.789].
This might not be obvious, but the example above shows an interesting insight: if the liquidity of one token is provided, only when the token becomes more valuable will it be exchanged for the less valuable one.
…wut? 🤔
Remember that if 4 X is provided within [15.625, 17.313], only when the price of X goes up from 15.625 to 17.313 is 4 X gradually swapped into Y, the less valuable one!
What if the price of X drops back immediately after reaching 17.313? As X becomes less valuable, others are going to exchange Y for X.
The below image illustrates the scenario of DAI/USDC pair with a price range of [1.001, 1.002] well: the pool is always composed entirely of one token on both sides of the tick, while in the middle 1.001499⁶ is of both tokens.
Image source: https://uniswap.org/blog/uniswap-v3/
Similarly, to provide liquidity in a price range < current price, an LP has to prepare a certain amount of Y for others to exchange Y for X within the range.
To wrap up such an interesting feature, we know that:
Only one token is required for range orders.
Only when the current price is within the range of the range order can LP earn trading fees. This is the main reason why most people believe LPs of v3 have to monitor the price more actively to maximize their income, which also means that LPs of v3 have become arbitrageurs 🤯
I will be discussing more the impacts of v3 in 5. Impacts of v3.
⁷ 1.001499988 = √(1.0001 * 1.0002) is the geometric mean of 1.0001 and 1.0002. The implication is that the geometric mean of two prices is the average execution price within the range of the two prices.
Reversible limit orders
As the example in the last section demonstrates, if there is 4 X in range [15.625, 17.313], the 4 X will be completely converted into 65.798 Y when the price goes over 17.313.
We all know that a price can stay in a wide range such as [10, 11] for quite some time, while it’s unlikely so in a narrow range such as [15.625, 15.626].
Thus, if an LP provides liquidity in [15.625, 15.626], we can expect that once the price of X goes over 15.625 and immediately also 15.626, and does not drop back, all X are then forever converted into Y.
The concept of having a targeted price and the order will be executed after the price is crossed is exactly the concept of limit orders! The only difference is that if the range of a range order is not narrow enough, it’s highly possible that the conversion of tokens will be reverted once the price falls back to the range.
As price ranges follow the equation p(i) = 1.0001 ^ i, the range can be quite narrow and a range order can thus effectively serve as a limit order:
When i = 27490, 1.0001²⁷⁴⁹⁰ = 15.6248.⁸
When i = 27491, 1.0001²⁷⁴⁹¹ = 15.6264.⁸
A range of 0.0016 is not THAT narrow but can certainly satisfy most limit order use cases!
⁸ As mentioned previously in note #4, there is a square root in the equation of the price and index, thus the numbers here are for explantion only.
5. Impacts of v3
Higher capital efficiency, LPs become arbitrageurs… as v3 has made tons of radical changes, I’d like to summarize my personal takes of the impacts of v3:
Higher capital efficiency makes one of the most frequently considered indices in DeFi: TVL, total value locked, becomes less meaningful, as 1$ on Uniswap v3 might have the same effect as 100$ or even 2000$ on v2.
The ease of spot exchanging between spot exchanges used to be a huge advantage of spot markets over derivative markets. As LPs will take up the role of arbitrageurs and arbitraging is more likely to happen on v3 itself other than between DEXs, this gap is narrowed … to what extent? No idea though.
LP strategies and the aggregation of NFT of Uniswap v3 liquidity token are becoming the blue ocean for new DeFi startups: see Visor and Lixir. In fact, this might be the turning point for both DeFi and NFT: the two main reasons of blockchain going mainstream now come to the alignment of interest: solving the $$ problem 😏😏😏
In the right venue, which means a place where transaction fees are low enough, such as Optimism, we might see Algo trading firms coming in to share the market of designing LP strategies on Uniswap v3, as I believe Algo trading is way stronger than on-chain strategies or DAO voting to add liquidity that sort of thing.
After reading this article by Parsec.finance: The Dex to Rule Them All, I cannot help but wonder: maybe there is going to be centralized crypto exchanges adopting v3’s approach. The reason is that since orders of LPs in the same tick are executed pro-rata, the endless front-running speeding-competition issue in the Algo trading world, to some degree, is… solved? 🤔
Anyway, personal opinions can be biased and seriously wrong 🙈 I’m merely throwing out a sprat to catch a whale. Having a different voice? Leave your comment down below!
6. Conclusion
That was kinda tough, isn’t it? Glad you make it through here 🥂🥂🥂
There are actually many more details and also a huge section of Oracle yet to be covered. However, since this article is more about features and targeting normal DeFi users, I’ll leave those to the next one; hope there is one 😅
If you have any doubt or find any mistake, please feel free to reach out to me and I’d try to reply AFAP!
Stay tuned and in the meantime let’s wait and see how Uniswap v3 is again pioneering the innovation of DeFi 🌟
Uniswap v3 Features Explained in Depth was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌
pro rata to 在 初心者鉄道探検隊 Youtube 的最讚貼文
2018年11月28日撮影
武蔵境駅
西武多摩川線
1917年(大正6年)10月22日開業
2006年(平成18年)12月8日多摩川線の駅ホームを高架に切り替え
2017年度の1日平均乗降人員は30,493人で西武鉄道の全92駅中33位
Musashi-Sakai Station
Seibu Tamaegawa Line
Opened October 22, 1917
December 8, 2006 switched the platform to elevated station
The average number of passengers on average per day for 2017 is 30,493 people, ranking 33rd out of 92 stations in Seibu Railway
Musashi-Sakai
武藏境站
西武多摩川線
1917年10月22日開業
2006年12月8日我將平台切換到高架站
2017年平均每天的乘客人數為30,493人,在西武鐵路的92個站中排名第33位
武藏境站
西武多摩川线
1917年10月22日开业
2006年12月8日我将平台切换到高架站
2017年平均每天的乘客人数为30,493人,在西武铁路的92个站中排名第33位
무사시 사카이 역
세이부 타마가 와선
1917 년 10 월 22 일 개업
2006 년 12 월 8 일 플래트 홈을 고가로 전환
2017 년도 1 일 평균 승강 인원은 30,493 명으로 세이부 철도의 92 역 중 33 위
Stasiun Musashi-Sakai
Seibu Tamaegawa Line
Dibuka 22 Oktober 1917
8 Desember 2006 mengalihkan platform ke stasiun layang
Rata-rata jumlah penumpang rata-rata per hari untuk 2017 adalah 30.493 orang, peringkat ke-33 dari 92 stasiun di Seibu Railway
Estación de Musashi-Sakai
Línea Seibu Tamaegawa
Inaugurado el 22 de octubre de 1917.
8 de diciembre de 2006 se cambia la plataforma a la estación elevada.
El promedio de pasajeros por día en promedio para 2017 es de 30,493 personas, ubicándose en el puesto 33 entre las 92 estaciones en Seibu Railway.
武蔵堺駅
西武多摩川線
1917年10月22日にオープンしました。
2006年12月8日プラットフォームを昇降駅に変更
Musashi-Sakai Station
Seibu Tamaegawa Line
Am 22. Oktober 1917 eröffnet
8. Dezember 2006 stellte die Plattform auf erhöhte Station um
Die durchschnittliche Anzahl der Passagiere pro Tag beträgt im Jahr 2017 30.493 Personen. Damit liegt sie auf Rang 33 von 92 Stationen der Seibu Railway
Gare Musashi-Sakai
Ligne Seibu Tamaegawa
Ouvert le 22 octobre 1917
Le nombre moyen de passagers par jour pour 2017 est de 30 493 personnes, ce qui en fait le 33e rang sur 92 stations du Seibu Railway
Trạm Musashi-Sakai
Tuyến Seibu Tamaegawa
Khai trương ngày 22 tháng 10 năm 1917
Ngày 8 tháng 12 năm 2006 chuyển nền tảng sang ga cao
Số lượng hành khách trung bình mỗi ngày trong năm 2017 là 30.493 người, xếp thứ 33 trong tổng số 92 trạm tại Seibu Railway
Estação Musashi-Sakai
Linha Seibu Tamaegawa
Inaugurado em 22 de outubro de 1917
O número médio de passageiros em média por dia em 2017 é de 30.493 pessoas, ocupando a 33ª posição das 92 estações da Seibu Railway.
Stesen Musashi-Sakai
Seibu Tamaegawa Line
Dibuka pada 22 Oktober 1917
8 Disember 2006 menukar platform ke stesen tinggi
Jumlah purata penumpang rata-rata per hari untuk 2017 adalah 30,493 orang, ranking ke-33 dari 92 stesen di Seibu Railway
Станция Мусаси-Сакаи
Seibu Tamaegawa Line
Открыт 22 октября 1917 года
Среднее число пассажиров в среднем за день в 2017 году составляет 30 493 человека, занимая 33-е место из 92 станций в железной дороге Сейбу
pro rata to 在 初心者鉄道探検隊 Youtube 的最讚貼文
2018年10月13日撮影
仙台市地下鉄東西線の大町西公園駅に潜ってみました
2015年(平成27年)12月6日開業
2017年度(平成29年度)の1日平均乗車人数は2,212人
I went down to Omachi Nishi-koen station of Sendai subway Tozai line
Opened on December 6, 2015
The average number of passengers per day for 2017 is 2,212
我去了仙台市地鐵東西線大町西公園站
2015年12月6日開業
2017年每日平均乘客人數為2,212人
我离开了仙台市钢铁东西线大町西公园站
2015年12月6日开业
2017年每天平均乘客人数为2,122人
센다이시 지하철 도자이의 오마치니시 공원 역에 내려 보았습니다
2015 년 12 월 6 일 개업
2017 년도 1 일 평균 승차 인원은 2,212 명
نزلت إلى محطة Omachi Nishi-koen في خط Tozai لقطار الأنفاق Sendai
افتتح في 6 ديسمبر 2015
متوسط عدد الركاب في اليوم لعام 2017 هو 2212
Saya pergi ke stasiun Omachi Nishi-koen dari jalur kereta bawah tanah Sendai Tozai
Dibuka pada 6 Desember 2015
Jumlah rata-rata penumpang per hari untuk 2017 adalah 2.212
Ik ging naar het station Omachi Nishi-Koen van de Sendai-metrolijn Tozai
Geopend op 6 december 2015
Het gemiddelde aantal passagiers per dag voor 2017 is 2.212
Bajé a la estación Omachi Nishi-koen de la línea Tozai del metro de Sendai
Inaugurado el 6 de diciembre de 2015
El promedio de pasajeros por día para 2017 es de 2,212.
Sendai รถไฟใต้ดิน Tozai บรรทัด
สถานี Omachi Nishi-koen
เปิดให้บริการในวันที่ 6 ธันวาคม 2015
จำนวนผู้โดยสารเฉลี่ยต่อวันในปีพ. ศ. 2560 เท่ากับ 2,212 คน
Nagpunta ako sa Omachi Nishi-koen station ng Sendai subway na linya ng Tozai
Binuksan noong Disyembre 6, 2015
Ang average na bilang ng mga pasahero bawat araw para sa 2017 ay 2,212
Sendai U-Bahn Tozai Linie.
Omachi Nishi-koen Station.
Es wurde am 6. Dezember 2015 eröffnet.
Die durchschnittliche Anzahl der Passagiere pro Tag im Jahr 2017 beträgt 2.212 Personen.
Sendai metro Tozai hattı.
Omachi Nishi-koen istasyonu.
6 Aralık 2015'te açıldı.
2017 yılında günlük ortalama yolcu sayısı 2.212 kişidir.
सेंडाई सबवे Tozai लाइन।
Omachi Nishi-koen स्टेशन।
यह 6 दिसंबर, 2015 को खोला गया।
2017 में प्रति दिन यात्रियों की औसत संख्या 2,212 लोग हैं।
Sendai সাবওয়ে Tozai লাইন।
Omachi Nishi-koen স্টেশন।
এটি 6 ডিসেম্বর, 2015 এ খোলা।
২017 সালের মধ্যে প্রতিদিন ২২12 জন যাত্রীর গড় সংখ্যা।
సెన్దై సబ్వే Tozai లైన్.
Omachi నిషి-కోయెన్ స్టేషన్.
ఇది డిసెంబర్ 6, 2015 న ప్రారంభించబడింది.
2017 లో సగటు ప్రయాణీకుల సంఖ్య 2,212 మంది.
Ligne de métro Sendai Tozai.
Station Omachi Nishi-koen.
Il a ouvert le 6 décembre 2015.
Le nombre moyen de passagers par jour en 2017 est de 2 212 personnes.
Tuyến tàu điện ngầm Sendai Tozai.
Trạm Omachi Nishi-koen.
Nó mở cửa vào ngày 6 tháng 12 năm 2015.
Số lượng hành khách trung bình mỗi ngày trong năm 2017 là 2.212 người.
Linha Sendai metrô Tozai.
Estação Omachi Nishi-koen.
Foi inaugurado em 6 de dezembro de 2015.
O número médio de passageiros por dia em 2017 é de 2.212 pessoas.
Sendai kereta bawah tanah Tozai Line.
Stesen Omachi Nishi-koen.
Ia dibuka pada 6 Disember 2015.
Purata bilangan penumpang sehari pada tahun 2017 ialah 2,212 orang.
Сендай метро Тозай линия.
Станция Omachi Nishi-koen.
Он был открыт 6 декабря 2015 года.
Среднее количество пассажиров в день в 2017 году составляет 2212 человек.
pro rata to 在 初心者鉄道探検隊 Youtube 的最佳解答
2018年10月13日撮影
仙台市地下鉄東西線の川内駅(かわうちえき)に潜ってみました
2015年(平成27年)12月6日開業
1日平均乗車人数は3,357人
副駅名は、「東北大学川内キャンパス前」
I went down to Kawauchi station of Sendai subway Tozai line
Opened on December 6, 2015
The average number of passengers per day is 3,357
我去了仙台市地鐵東西線的川內站
2015年12月6日開業
每天平均乘客人數為3,357人
我去了仙台市地铁东西线的川内站
2015年12月6日开业
每天平均乘客人数为3,357人
센다이시 지하철 도자이의 가와우치 역에 기어 들어 보았습니다
2015 년 12 월 6 일 개업
1 일 평균 승차 인원은 3,357 명
ذهبت الى محطة Kawauchi من سينداي خط المترو توزي
افتتح في 6 ديسمبر 2015
متوسط عدد الركاب في اليوم الواحد هو 3،357
Saya pergi ke stasiun Kawauchi dari jalur kereta bawah tanah Sendai Tozai
Dibuka pada 6 Desember 2015
Jumlah rata-rata penumpang per hari adalah 3.357
Ik ging naar Kawauchi station van Sendai metro Tozai lijn
Geopend op 6 december 2015
Het gemiddelde aantal passagiers per dag is 3.357
Aku mudhun menyang Stasiun Kawauchi Sendai subway
Dibukak tanggal 6 Desember 2015
Jumlah rata-rata penumpang per hari yaiku 3,357
Bajé a la estación Kawauchi de la línea Tozai del metro Sendai
Inaugurado el 6 de diciembre de 2015
El promedio de pasajeros por día es de 3,357.
ฉันลงไปที่สถานี Kawauchi ของรถไฟใต้ดิน Sendai Tozai
เปิดเมื่อวันที่ 6 ธันวาคม 2015
จำนวนผู้โดยสารเฉลี่ยต่อวันอยู่ที่ 3,357 คน
Bumaba ako sa istasyon ng Kawauchi ng Sendai subway sa Tozai
Binuksan noong Disyembre 6, 2015
Ang average na bilang ng mga pasahero bawat araw ay 3,357
Ich ging nach Kawauchi Station von Sendai U-Bahn Tozai Linie
Eröffnet am 6. Dezember 2015
Die durchschnittliche Anzahl der Passagiere pro Tag beträgt 3.357
Sendai metro Tozai hattının Kawauchi istasyonuna gittim.
6 Aralık 2015'te açıldı
Günlük ortalama yolcu sayısı 3,357
मैं सेंडाइ मेट्रो Tozai पंक्ति का Kawauchi स्टेशन के लिए नीचे चला गया
6 दिसंबर, 2015 को खोला गया
प्रति दिन यात्रियों की औसत संख्या 3,357 है
আমি সেন্দাই পাতাল রেল Tozai লাইনের Kawauchi স্টেশনে নেমে গেল
ডিসেম্বর 6, 2015 খোলা
প্রতি দিন যাত্রীদের গড় সংখ্যা 3,357
నేను సెన్దై సబ్వే Tozai లైన్ Kawauchi స్టేషన్ వరకు సాగిన
డిసెంబర్ 6, 2015 న ప్రారంభించబడింది
రోజుకు ప్రయాణికుల సగటు సంఖ్య 3,357
Je suis descendu à la station Kawauchi de la ligne de métro Tozai de Sendai
Ouvert le 6 décembre 2015
Le nombre moyen de passagers par jour est de 3 357
Tôi xuống ga Kawauchi của tuyến Tozai tuyến tàu điện ngầm Sendai
Khai trương vào ngày 6 tháng 12 năm 2015
Số lượng hành khách trung bình mỗi ngày là 3.357
Desci para a estação de Kawauchi de Sendai metrô linha Tozai
Inaugurado em 6 de dezembro de 2015
O número médio de passageiros por dia é de 3.357
Saya pergi ke stesen Kawauchi Sendai kereta bawah tanah Tozai talian
Dibuka pada 6 Disember 2015
Purata bilangan penumpang sehari ialah 3,357