The engine vendor must meet contract guarantee or pay compensation, usually in discounted parts, to the airline. The penalties are tiered typically.
Typically there is a buyback provision at X years at YY percentage of the purchase price, minus differed maintenance (there is always some).
Engine vendors test there engines to ensure it isn't the mounting arrangement.
If the cure isn't timely, customers can re-engine and return the defective engines for a partial refund.
Take the LEAP-1A. It missed EIS fuel burn by a substantial amount, but still burns less fuel than the CFM-56. So penalties won't be paid. However, the first overhaul will be early and pro-rated (mostly at CFM's expense). Power by the hour customers will just receive a loaner engine and a few weeks later their rebuilt engine with compensation, usually a payment credit, for the mechanic hours for the R&R.
There are performance promised to the airframers. Missing milestones means production can and will be skewed to the competition. See the A330 (Pratt missed thrust).
A significant miss has significant penalties. Usually it is cheaper to spend billions to bring the engine up to spec.
In the case of the 787, NEO, and MAX there is even a PIP schedule of when performance improvements are required.
CFM wasn't amending the contract with the PIPs Airbus demanded, so they declared the A321LR a new contract and that all A321s would be built as 321LRs after a certain date. Since the majority of NEOs will be A321s, CFM had to sign a new contract or forfeit to Pratt. Airbus wanted a lower fuel burn promise, 35K of thrust as an option, and longer maintenance intervals at 33K of thrust. Pratt signed, so the pressure was on. CFM was able to negotiate in 2019 CEO slots and a more relaxed NEO production ramp (to meet MAX engine demand).
Usually in the contract the engine vendors have so long for a PIP. Pratt has missed reliability goals, so is paying airlines. If the two fixes do not work, they will have to pay Airbus (by discounting engines more).
CFM might have to pay airlines too. I keep hearing about engine swaps, but I do not know if the rate violated contract.
You only have the first amendment with the 2nd. If you're not going to offend someone with what you say, you don't have the 1st.