CHINA is one of the world’s largest providers of foreign aid. But it has a reputation as a rogue donor: stories abound of shoddy projects, low environmental standards and mistreatment of workers. A hospital built by the Chinese in Luanda, the capital of Angola, developed alarming cracks and had to be rebuilt. Aid is widely thought to have been diverted for arms purchases by Robert Mugabe’s regime in Zimbabwe. The list goes grimly on.

Stories do not abound, however, about who gets China’s aid and what it goes on. The government says that it spends about $5bn a year on assistance to other countries. But it has no aid ministry comparable to, say, Britain’s Department for International Development. Most details of the aid programme are kept secret, perhaps because the largesse is unpopular domestically. Many Chinese think that their country is too poor to give handouts and the money ought to be spent at home. When the health ministry tried to investigate whether Chinese projects in Africa made people healthier, the rest of the government flatly refused to co-operate.

The most detailed study so far of Chinese aid, published this week by AidData, a research group at the College of William and Mary in Virginia, shines a light on the murky data. The report looks at 4,400 projects which China has either committed to, is building or has finished, between 2000 and 2014. It finds that the country gave or lent about $350bn over that period—not much less than the total of American aid, which was $424bn in those years. But almost all of America’s aid is in the form of grants, compared with a fifth of China’s. The rest is concessional lending at below-market interest rates, mostly to Chinese companies working abroad—the kind of aid that used to be common in the West but went out of fashion in the 1990s because it overburdened recipients with debt. The grant component of China’s aid was $75bn, still a lot (about the same as Britain’s), but not a tidal wave of money.