Yep however I don't think I'd consider it to quite the same extreme. No doubt it was bad however proportionally to the size of the platform Cream's exploit was far more damaging. Like the rekt.news post mentions, it was more of a banking/spec error than an outright vulnerability. Your spec can't protect you if the loss is due to intended behaviour. There are ways to mitigate this however. The main way is by making your spec concise and clearly representable as a series of state transitions & operations or as a series of transformations.
The Compound Finance paper spec essentially just lists "this subsystem does these things" and then each function/operation is a list of preconditions, what actions are taken in what conditions, and the expected result. This isn't bad per se but it's not great either. Instead the paper spec really should be showing what transformation is being applied to the state, why we want that transformation applied, what properties must hold throughout the transformation, and then demonstrating that those properties hold.
The first just describes the system and then asserts preconditions hold which works well enough for verifying that the code matches the spec but the other actually verify that the spec is doing what the user & developer expect it to by formalising the system and analysing the properties of that system.
Compound's project wouldn't have been vulnerable to any of the attacks executed on CreamFi however they are vulnerable to the class of spec errors. Uniswap and Djed on the other hand would be protected from the majority of that class of issue that Compound experienced. This isn't to say that they are invulnerable but I'd be willing to say that they are approaching "cryptography-grade" security where you can trust these protocols just like you can trust AES, RSA, and ECC encryption & signing.
---
This of course isn't to say that what Compound does is bad but as that incident shows, there is still room for their improvement in the security space. Cryptocurrency and "Decentralised Finance" are finally starting to grow up into proper subsets of the cryptocurrency and game theory communities. Now this might be a bit of general commentary on the SW space but hopefully long term this trend causes some of this security minded design to bleed over into the greater software engineering community.
Just compare construction GDP between China and US. Both report a similar amount nominally (once adjusted for exchange rate), but China uses more than 10x the cement and steel as the US.
This is for actually building things. On the tertiary side, housing service GDP (ex. rent and inputed rent) has the US report 2-3x more than China despite having 25% the population.
This is a very Silicon Valley / US bubble mindset. Telsa/GM/Nissan have made much contribution but your are missing the major factor driving the EV industry forward which is government industrial policy.
The real reason is EU and China have announced their intention of banning ICE vehicles around 2030 with China having very aggressive EV marketshare goals starting next year. Companies that do not meet EV sale goals will have to buy credits from others that do just like a carbon emission market. This is causing all major automakers to not be complacent and invest heavily in EVs.
This is misleading. These (quite recent) changes in governmental policy have come about as a result of things that Tesla managed to achieve, firstly, on its own, and secondly, through its effects on the behavior of other automakers. No major automaker was meaningfully working on EVs before Tesla; now they all are.
Indeed, to a rare degree, the shift we're seeing in a major sector of the world economy is the result of the unilateral actions of just one person: Elon Musk.
This is typical Silicon Valley hype taking credit for everything. There were many EV manufacturers around the same time as Tesla (ex. Nissan, BYD). Even earlier, the supply chain for lithium batteries got momentum due to electric buses and hybrid vehicle manufactures but no one gives them credit, only Tesla for some reason. Currently, Tesla is only a small chunk of the entire EV and battery market but still gets all the credit.
You can see this in the Tesla Semi or the Tesla battery pack announcement. Companies have been mass producing them 4 years before and are already being used in production today. However, being B2B, these products were largely low key. But somehow Tesla gets all the credit these and "moving the industry forward". Chinese and Korean battery manufactures have also been expanding production like crazy and account for the vast majority of production but only the GigaFactory gets any mention which cause some people think Tesla alone is responsible for the decreasing price of batteries.
Major auto manufactures are working on EV mainly due to government policy. I agree private companies seeing traction selling EVs is a large impetus for the new government policies, but to only credit Tesla is over-exagerating it's contributions. How much does Tesla influence Chinese policy when 95% of Chinese EVs are made by domestic brands?
Can you give us a list of companies producing semi trucks with large range starting 4 years ago? All of the ones I've seen have small ranges.
Likewise, can you tell us what BYD should be praised for? They keep on announcing that they're going to compete with Tesla head-to-head with long-range high-performance cars, but the only thing they've managed to get volume on are low-performance, lower-range Chinese compliance cars. Tesla is praised for making electric cars sexy; is BYD doing that?
Third, I'm sure you've noticed that at the lower end of the US market, the Leaf gets a lot of credit, as does the Bolt.
1) New models will obviously have more range than ones 4 years ago... My point was the Tesla Semi should be treated as incremental rather than revolutionary, just like releasing a new smartphone model with more RAM than one 4 years ago. Also the Tesla Semi hasn't even launched yet so they can easily overpromise making comparisons with any existing offerings difficult.
2) As with Ford for ICE vehicles, affordable EVs selling higher volumes are much more important to than the premium EVs offered by Tesla in terms bringing the tech mainstream. In this way, BYD and Nissan should be credited much more than Tesla. In terms of contribution, I would put BYD much higher than Tesla: BYD manufacturers their own batteries, sell more vehicles, drive industry competition in the much more relevant CN market, and their success influnced the Chinese government to phase out ICE cars.
3) My post was specifically replying the the person above who was worshipping Musk on a pedestal and giving all the credit to Tesla.
1) The first electric cars were from the early 1900s, everything since should be treated as incremental, just like the iPhone wasn't that much of an advance over other smartphones.
2) Halo products are a concept, but apparently not in cars. BYD's failed attempts to introduce premium cars, followed by eventual success in me-too compliance cars for the Chinese market deserves a participation award. Not praise.
3) Uh, OK. Never mind the facts, let's focus on opposing Musk worship.
Don't think I can ever convince people like you. In terms of scale, driving down costs and adoption, Tesla is a shrimp.
Keep being arrogant and think the world revolves around Silicon Valley tech companies. When EVs completely replaces ICE, people like you will think Musk did by himself against dumb incumbents while completely ignoring the much much greater contributions of everyone else.
I'll just leave with this statistic [1]:
> China’s demand for electric bus batteries is almost equal to that of demand for all electric vehicle batteries
Without hard proof, but having watched the last decade of environmental tech developments wit interest, I agree with you pretty much completely. None of those policies would exist if there was no hope of the success of the commercial technology within those timeframes. It would be like legislating nuclear fusion power generation. Nobody else did much of anything until Tesla began succeeding, and more importantly prepped the consumer market for EV demand.
Government policy would cave-in if the private companies lacked innovation and told them it was impossible. You need existence proofs like Tesla, who are highly leveraged to making EVs work and don't care a wit about preserving the old business.
As a concrete example, consider the government effort to shift ethanol-to-be-mixed-with-gasoline from food-based sources to non-food sources like switchgrass. No one figured out how to efficiently turn switchgrass into ethanol, so it failed. And that was despite a huge economic incentive.
In contrast, the government effort to promote electric cars, solar energy, and wind energy appear to be really paying off.
They will soon have millions of charging stations:
"China's government is seeking to combat range anxiety for electric vehicle buyers with a pledge to build a charging station for every vehicle on the road by 2020. China plans a total of 4.8m charging outlets and stations by 2020"
Completely agree with you. The article looks at just a few companies and use them to claim Chinese brands as a whole won't succeed internationally ever. Very myopic.
The conclusion would be different if the author analyzed Chinese smartphone brands instead. Five years ago, even the domestic market was dominated by foreign brands like HTC and Samsung; now the domestic market is the complete opposite. Looking at the supply chain, back then all China provided was low-paid final assembly. Now, Chinese companies are very competitive in supplying most of the parts: displays, camera modules, fingerprint scanners, enclosures, sound components, RF components, batteries, SOC, etc. Only high-end semiconductor components (RAM, NAND, application processors) are lacking but Chinese industrial policy will rapidly help this area catch up.
Chinese smartphones (phones with a Chinese brand not just manufactured there) have seen massive success internationally in the past couple of years and now make up HALF of global marketshare. In India, OnePlus has higher customer loyalty and sales than Apple in the high-end and Xiaomi is neck in neck with Samsung as the marketshare leader starting from zero two years ago.
Now remember, all of this happened in just the last five years. What other industries will break out in the next 5 years?
Whenever China is discussed on HN, someone usually pops up with overly negative and biased comments that explain why China is doomed prefaced with "I have lived in China" like it adds extra validity.
This is like an Chinese international student coming to the US, reading about the opioid epidemic, obesity epidemic, the rust belt, black gang violence, out-of-wedlock birth rates, the world's highest incarceration rates, Hurricane Maria destroying Peruto Rico, mass shootings in Vegas, Flint water crisis, healthcare bankruptcy, the rise of alt-right Trump voters, 11M illegal immigrants, high P/E in the stock market, unsustainable pension obligations, social security crisis etc. and coming to the conclusion that the US is doomed. Obviously, the US has many problems but to only focus on the negatives but not the strengths is not an objective analysis.
===
Regarding your anecdotes:
1) I a cousin who grew up in rural Shandong, who moved to Shanghai with nothing and live in one these neighborhoods "a few subway stops away" and drives an electric scooter. While the living standards is not as good as the city center or rich western cities, his apartment is small but clean with running water and functional toilets. His standard of living is not any worse than when my family first immigrated to Canada. To say 90% of Chinese people in Shanghai lives in squalor is absurd and shows how biased you are.
2) These anecdotes of some your rich friends are pretty meaningless. I'm sure you can find vain people in any western city including the bay area as well. I know rich Chinese families who "half" immigrated to Canada who still have plenty of assets and business in China and want their children to go back after graduating from a Canadian university.
4) Make similar comments like this about African American achievement and you'll quickly realize how racist it is and stop. But it's suddenly okay to say the same thing about Chinese since westerners aren't socialized to understand the racism and do not feel the same amount of shame.
Just walk around a BestBuy in the US and you'll quickly realize how many Chinese brands there are: TP-Link routers, Huawei routers and phones, Lenovo laptops, Hisense TVs, ZTE phones, DJI drones, Haier appliances, Ninebot scooters, Instantpot press cookers, etc. If you also count brands owned by Chinese companies than include GE appliances and Motorola, Alcatel, Blackberry smartphones.
Go on Amazon.com and Chinese brands are bestsellers in many electronic categories: Anker/Sunvalleytek in phone accessories, Yi in action cameras and dash cams and security cameras, TCL in televisions, etc.
Also the rest of the world isn't just US. Chinese smartphone brands have 50% marketshare world wide. Xiaomi, Huawei, OPPO are growing fast in South Asia, South East Asian and MENA. Transsion (you've probably never even heard of this company) owns phone brands that dominate Africa and is the marketshare leader there. Chinese home appliance and consumer electronic brands are also big in non-western countries.
When you have a hammer everything looks like a nail. My problem with these kind of analysis is that it pretty much only looks at things from a financial perspective thinking it's the be-all-end all.
However, on first level principles, money is simply an abstraction; it's a medium for trading your services for other people's services. And if you become more efficient, you can buy more services with the same amount of effort and vice versa. The root cause of this increase in efficiency is technology.
As a developing country, China has lots of easy productivity growth just by adopting current technologies on the technological frontier. Therefore, I think an analysis on how fast China is advancing in various technological areas and their industrial policy would be much more useful than one just at a financial level. Are Chinese companies as a whole becoming more productive and creating new technology?
As a developing country, China has lots of easy productivity growth just by adopting current technologies on the technological frontier.
High rates of growth in developing countries, with the rate slowing as they 'catch-up' to more developed countries, is also what the bog-standard macro-growth model (Solow-Swan) predicts.[0] To simplify, developing countries will have lots of labour inputs and relatively few capital inputs. Therefore the marginal factor productivity of each capital input will be high. Eventually, as the economy reaches capital saturation, the marginal productivity of capital will decline and the economy will settle into a low 'steady-state' growth level, where real growth is largely the product of technological advances.
This is why I've always been puzzled by economic commentators who assume China will continue to enjoy 7-9% GDP growth rates forever. Although I'm not suggesting that there's "nothing to see here" in this particular case. China does indeed have a bubble (and massive oversupply) in its residential property market, mostly due to the stimulus deployed just after the GFC. It could make one hell of a pop.
Solow-Swan model is based on neoclassical economics that assumes a closed market with zero technological growth. In the event of technological growth it assumes a steady state is still reached. And I quote, "Due to Common Sense." [1] How TF do you consider this a valid scientific theory?
This is a theory based on NeoClassical economics which modern Behavior Economics finds that the models of NeoClassical economics fail in nearly every situation [2].
The Solow-Swan model has no rigor, predictions, or testable results to justifying its usage nor faith in its system. Science is a quantitative game, yet economics isn't?
I don't have the time atm to get into much detail (but will come back in 8ish hours after work), but very quickly:
- This is just a simplified description of probably the simplest macro-economic growth model you'll learn if you study economics. It's basically the model you learn in Macro 101. I didn't really want to write a super-long post going through all the extensions of the base model (not to mention the more complicated micro-economically founded concepts, models and theories you'd learn if you study developmental economics) as one of the predictions of the simple model that I thought relevant, that economies experience slower rates of growth as they reach capital saturation, is empirically supported.
- It's not intended to accurately reflect all aspects of a actual economy. No model is. If a model did this, it wouldn't be a model. We would probably just call it 'the economy'. It's just a simplified model from which a number of more complex extensions have been made, but I didn't feel were worth going into.
- It doesn't purport to make realistic assumptions, and no-one with any sense would think that to be the case. In addition to what you've pointed out, it also assumes the economy only produces a single good, has no government, no international trade, and constant returns to scale. All of these are almost certainly incorrect to varying degrees. Despite these simplifying assumptions, that does not mean the model is useless, or that it does not make any testable predictions. No-one in their right mind would think these assumptions are correct.
I'm honestly not sure what level of realism you expect an economic model to have. Just because a model is strictly wrong (as all models are; hence the name: model), does not mean it isn't useful. You mention empirical results from behavioural economics, which strongly suggest the neoclassical assumption of perfect actor rationality is incorrect. Again, this is just a simplifying assumption under which models can still yield accurate predictions in the large. Is Newton's law of gravitation completely correct? No, and it's been superseded by general relativity. However, is it still useful? Yes.
I can't really think of any economists (and this is certainly true for those I work with), let alone any people in general, who would believe any of these assumptions accurately reflect reality. There are a whole bunch of others too, like the implicit assumption that the labour-capital split of income remains constant. This is also almost certainly not correct as well.
It, and its extensions which account for 'human capital' (which has a multiplicative effect when combined with physical capital) which the simplified model just rolls into the solow residual (i.e. total factor productivity), do make a number of testable predictions, some of which have actually been tested in cross-country econometric studies. For example, here's a paper that examines a number of extended models, and among other things, examines the evidence for absolute vs conditional convergence (http://www2.stat.unibo.it/brasili/file/2009-2010/COSDI/chap1..., see pages 48 & 49).
You can literally just look at the model equation, do some simple algebra to turn one of the independent variables into the sole dependent variable and, presto, you have a prediction. Here are a few:
- An economy will converge to a balanced-growth equilibrium, regardless of its starting point. At this point, the growth of output per worker is determined solely by the rate of technological progress.
- At equilibrium, the capital/output ratio depends only on savings, growth, and depreciation rates.
- Countries with higher savings rates will accumulate capital at a faster rate (if all other relevant features of these economies are the same, which they aren't).
- If productivity is the same across countries (which it isn't), then countries with less capital per worker will have a higher marginal productivity of capital and provide a higher return on capital investment. Consequently, in a world of open market economies and global financial capital (which does not exist, and probably can't), investment will flow from rich countries to poor countries, until capital/worker and income/worker equalise across countries.
All that said, if you are able to produce a model that makes no incorrect assumptions, accurately accounts for bounded rationality, and all its predictions in every real world scenario are accurate, you'll win a nobel prize (and will also become filthy rich by investing according to this super-model's predictions).
Given us economist have simply just been 'doing it wrong' this whole time, because we foolishly didn't realise SF computer programmers held a much deeper understanding of macroeconomics, I'm really excited to being a first-hand witness to, what will be, a quantum leap in our understanding of macroeconomic dynamics and development economics.
I'll try to make sure to list every relevant caveat (the above is only a partial list, at best, for this particular model btw), before daring to discuss an unscientific subject like economics (which I apparently know nothing about).
Great, detailed response -- I learned a lot from this, so thank you. Also, I think it's hilarious/curious that the actual economist's response is buried in a thread.
Internet message boards (yes, even HN's) are not kind to actual expertise.
> Also, I think it's hilarious/curious that the actual economist's response is buried in a thread.
> Internet message boards (yes, even HN's) are not kind to actual expertise
Would you elaborate on this, in particular what you mean by buried? I'm assuming you're referring to 'spangry's responses. Given the nature of threading and where 'spangry chose to respond, I don't see how it could be anywhere other that where it is. As of the posting of this comment, both of 'spangry's responses are the highest of its siblings. Are you thinking of a different model of threading or highlighting highly-upvoted comments?
Sure, I'll elaborate, but it may not be terribly illuminating.
As for why it's "hilarious" (okay, overstatemetn) -- it's not really a critique of how comments work -- more just that this is sort of an off-topic subject matter for the audience, and spangry is trying to reply to a comment.
If I were spangry, I would've replied to the post itself. I think HN commenters are pretty thoughtful, and his detailed post probably would've risen to the top, and enhanced the overall conversation.
So the right way to read my snark is more as a commentary on the fact that economics is a technical subject, but most technical readers at this site are technical in different ways. I would assume the top comment (and attendant conversation) would be spot-on for the latest framework or software technology, though.
> However, on first level principles, money is simply an abstraction; it's a medium for trading your services for other people's services. And if you become more efficient, you can buy more services with the same amount of effort and vice versa. The root cause of this increase in efficiency is technology.
From the article, Pettis assumes the following is true:
1) China has overinvested in infrastructure and manufacturing capacity to such an extent
that in the aggregate the cost of additional
public sector investment exceeds the present
value of future increases in productivity generated by
the investment
and
2) China's long-term sustainable growth rate is substantially below the economy's current GDP growth target
Why does he make these assumptions without also analyzing the technology improvement aspect? I don't see anything about that in this article.
He elaborates on technology improvement in other articles, but it boils down to: technological improvements have a range of returns, but even the most optimistic of historical returns to technological progress can't paper over the debt-fueled boom China is currently undergoing.
Basically, qualitatively, you're right. Technological improvements can generate growth from scratch. But when you look at the historical data to try to quantify it, you see it's quite modest. Big gains have come from: women entering the workforce, electrification, containerization. The rest is incremental enough it doesn't matter in the same way.
(Part of this is how it's measured; the fact that consumers get much more value for their dollar isn't well captured, but the point remains because it's about debt-servicing, not consumer value.)
Containerization? That's really interesting. I knew it had a big effect on how shipping worked, but didn't realise it was as important driver of change to the world economy as electrification.
My Dad used to work as a merchant seaman, I believe he got up to first officer and had passed his captain's exam.
But then the big container ships came along, and they needed a tiny fraction of the captains, officers and seaman they needed previously per tonne and he ended up coming ashore to pursue a different career. His stories from those times are pretty amazing.
I don't get it. US workers still have 5x higher average income than China. Doesn't this suggest there are still a ton of technological improvement left to exploit? Why can't China just keep walking the same path of technological improvement as the US?
The average disguises a few things. One, I assume that's in absolute terms and not, say, purchasing power parity (which accounts for lower consumer prices in China).
Two, the 'average' in China includes huge numbers of the rural poor. They are living in the third world; an office worker in Shanghai is not, but her income's contribution to the average is diluted by rural subsistence farmers.
This does suggest that there is room for growth via urbanization and modernization: if subsistence farmers switched to commercial farming, and the excess labor moved to productive cities, in theory you've got a productivity boom. But China's productivity is predicated on the world's ability to absorb their excess production, which is not actually unlimited. That said, the central government is taking deliberate steps to encourage urbanization (while simultaneously not undertaking some reforms that would help, like overhauling the hukou system).
Similarly, if you use Western standards to measure economic metrics of China, everything looks weird.
China is still pretty much a planned economy, where the government is in control of major state-owned corporations. I wouldn't worry too much about the debts that they owe to the state.
> ...when those resources disappear from the economy then many people will lose out.
My initial reaction is "...and?"
Not because I'm trying to be obstinate or lacking empathy, but because I'm trying to hard visualize a situation (re: China) where those who lose out legitimately can do anything about it.
They can't realistically move, or revolt. They can starve[0], but that's happened in the past and the State really didn't suffer for it.
Some can. Those are the ones who matter. No man rules alone--political leaders are only powerful insomuch as they can incentives or coërce others to act for them. A ruling class whose living standards is falling is a ruling class more willing to entertain other leaders.
"Certain types of unemployment are likely to be perceived as more politically costly than others - e.g. because returning to family farms acts as a kind of safety valve, even though a significant fall in living standards, unemployment among migrant workers is likely to be less costly, or because university graduates are presumably more communicative and have higher expectations, their unemployment might be more costly" [1].
The vast masses of Chinese citizens are not those people.
History isn't in agreement, and time after time, the peasants will starve before the bourgeoisie suffer to a point that they feel enough pain to revolt.
It's economically cheaper for the State to continue to pay for the ruling classes' requisite "hookers and blow" than it is to pay for social programs.
> The vast masses of Chinese citizens are not those people.
I can't recall a single civilization where the majority of people were "those people". The point is there are enough who demand enough that mortgaging the non-influential majority to pay for "those peoples'" bread (or as you put it, "hookers and blow") will be a short-term patch at best. (Reverse wealth transfers are not uncommon in a regime's dying days. Case in point: Venezuela.)
This may be a banal point, but do you think the increasing concentration of wealth within the American upper class, with a simultaneous impoverishment of the middle class, is such a reverse wealth transfer?
A salient difference between existential and incidental reverse wealth transfers appears to be (a) the existential pain the rulers, as a whole, defer by enacting them and (b) their intent. Consider the 2008 bailouts [1]. The masses helped, in part, pay the salaries of well-compensated professionals [2]. But could Washington, D.C. have let the banks fail? Probably. Were politicians primarily concerned with the bank executives rebelling? Or were the masses interests' in mind? I think it's safe to say the latter was the intent behind the bailouts, even if a good amount of the former happened along the way
Another example is the scientific and military grant-making processes. Such grants may fund labs and companies with wealthy owners and managers. But that isn't the intent behind the grants. Furthermore, politicians--as a group--don't existentially fear the defense contractors or contract-lab operators.
Now consider Venezuela. Babies are starving [3]. Yet bondholders get paid. Why is the government more afraid of its bondholders than citizens? If it's because the government fears the bondholders' reactions, e.g. military insurrection, more than popular revolt then it's a desperate maneuver.
I don't disagree with you, and I'm sorry if I wasn't clear. I just don't believe that those in power consider farther than the short term (say, three to ten years).
The bill eventually comes due, but what cost does the population pay in the interim?
I hope that all subjugated and disenfranchised people rise up to remind their governments that they are the reason that those governments ultimately exist, but the cost of that "disobedience" is a heavy burden if they don't succeed.
* https://rekt.news/compound-rekt/
* HN discussion: https://news.ycombinator.com/item?id=28716979