How large are trade costs in the world's poorest countries and what are their consequences? I explore this question using a new dataset I have assembled of monthly prices and production of 6 staple grains from 2003 to 2013 in 230 market catchment areas covering all 42 countries of continental sub-Saharan Africa. I estimate and solve a spatial temporal model of monthly storage and trade under uncertainty including storage in each of the 230 markets, overland trade between 413 pairs of markets, and trade with the world market through 30 ports. I then re-solve the model for a counterfactual scenario in which trade costs are lowered to match transportation costs in the rest of the world. I find median intra-national trade costs over 5 times higher than elsewhere in the world along with significant extra costs for trade across borders and with the world market. Lowering trade costs for staple grains results in a 46.4% drop in the average food price index, a contraction in the agriculture, storage, and trade sectors, and a net welfare gain of 2.4% ($125 billion equivalent variation). I show that 87.5% of this welfare gain can be achieved by lowering trade costs through ports and along key links representing just 18% of the trade network, supporting a corridor-based approach for infrastructure investment and trade policy. In an extension, I find that the effects of agricultural technology adoption depend crucially on trade costs, with farmers only benefiting from technology adoption when trade costs are low.