Samsung notched its best second-quarter profit since 2018, on strong sales of chips amid a cooling smartphone market.

Smartphones are feeling the heat of economic downturn fears, with demand shrinking in the second quarter.

Smartphone vendors shipped 270 million handsets in the second quarter, a 9% decline over the first quarter.

Still, sales in Samsung memory units rose 18% year over year.

However, Samsung cautioned that demand for consumer products and PCs will remain weak.

“Nevertheless, there are also chances of consumer demand getting stimulated during the year-end promotional season.”

Samsung’s strong quarter came while chipmakers face a glut, as demand for smartphones and PCs declines.