A Market Theory of Money