Resource allocation in decentralized systems with strategic agents: an instance of a market and public goods problem