Both the above terms are used in contracts. An indemnity is something like a promise to indemnify another party in case of loss or any other defect. However, a warranty is something like a guarantee given by one party to another.