Need-based transfers on a network: a model of risk-pooling in ecologically volatile environments