Does the distribution of government transfers affect elections? To answer this question, we analyze a natural experiment in the design of the US Department of Agriculture's Market Facilitation Program (MFP) prior to the 2020 Presidential elections. The 2019 wave of the program allocated roughly \$14 billion to US agricultural producers according to a formula that combined objective measurements of production and product-specific trade damage estimates. While the former are potentially confounded with political dynamics, the latter were driven by arbitrary, random volatility in historical US exports. Given this known assignment process, we reconstruct the formula with public and internal USDA county and crop-level data to show how product-specific trade shocks propagated into county-specific compensation rates and payments. We use a randomization inference approach that permutes these shocks to obtain valid, design-based, finite-sample inferences even in the presence of complex dependencies in shock exposure across U.S. counties. Further adjusting for demographics and political trends, we find that counties receiving greater compensation rates, on average, have higher Republican Party presidential vote shares in the 2020 election. Instrumenting for actual MFP disbursements in 2019-2020 using our measure of excess compensation, we estimate that an additional \$10 million in 2019 MFP payments to a county increased that county's 2020 two-party Trump vote share by about 1.8 percentage points on average. We find no effect of the instrument on 2018 MFP payments, suggesting that our finding is attributable to formula changes rather than agricultural payments in general.