We consider a situation in which two parties have concluded an efficient contract corresponding to one major bargaining solution. After the parties have agreed on one particular contract, an unanticipated shock may change the contract outcomes in a way that benefits one party but harms the other party. If this happens, they have the option to either stay with the original exchange contract or adjust some contract parameters such as the price. We propose a model to perform such adjustments automatically, to obtain the same bargaining solution as in the initial contract under the restriction that the new contract dominates the outcomes of the original contract. We study several bargaining solutions within this general framework. These bargaining solutions offer various sharing rules to distribute the benefit between the parties. To reflect practical considerations, we only consider adjustments made via one contract parameter (the price), while all other parameters result from the original contract and the random shock. To evaluate the efficiency of the proposed approach, we also compare it to a full re-negotiation scenario, in which all parameters can be modified within the boundaries resulting after the random shock. However, waiting and re-negotiation might be costly compared to the situation when the smart contract executes the adjustment automatically. Therefore, the automatic adjustment might be more efficient compared to the other types of contracts. We present several numerical examples and run large random simulations, which we also check statistically.