Can the amount of compensation be predetermined by the contracting parties? 
Yes, the contracting parties can fix the amount of compensation in advance through a provision in the contract or a subsequent agreement, as long as it complies with the applicable laws.