Social and private insurance schemes rely on legal action to deter fraud and tax evasion. This observation guides us to introduce a random state-verification technology in a dynamic economy with private information. With some probability, an agent's skill level becomes known to the planner who prescribes a punishment if the agent is caught misreporting. We show how deferring consumption can ease the provision of incentives. As a result, the marginal benefit may be below the marginal cost of investment in the constrained efficient allocation suggesting a subsidy on capital. We characterize conditions such that the intertemporal wedge is negative in finite horizon economies. In an infinite-horizon economy, we find that the constrained efficient allocation converges to a high level of consumption, full insurance, and no labor distortions for any probablity of state-verification.