18 The evil-doer will be given as a price for the life of the good man, and the worker of deceit in the place of the upright.

Matthew Henry's Commentary on Proverbs 21:18

Commentary on Proverbs 21:18

(Read Proverbs 21:18)

The righteous is often delivered out of trouble, and the wicked comes in his stead, and so seems as a ransom for him.