Markets are not perfect, but well-designed ones come close.