Adjustment of rights and liabilities
3 (1) The sums paid or payable to a party in pursuance of a contract before the parties were discharged, (a) in the case of sums paid, are recoverable from the party as money received for the use of the party by whom the sums were paid; and (b) in the case of sums payable, cease to be payable.  R.S.O. 1990, c. F.34, s. 3 (1). Expenses (2) If, before the parties were discharged, the party to whom the sums were paid or payable incurred expenses in connection with the performance of the contract, the court, if it considers it just to do so having regard to all the circumstances, may allow the party to retain or to recover, as the case may be, the whole or any part of the sums paid or payable not exceeding the amount of the expenses, and, without restricting the generality of the foregoing, the court, in estimating the amount of the expenses, may include such sum as appears to be reasonable in respect of overhead expenses and in respect of any work or services performed personally by the party incurring the expenses.  R.S.O. 1990, c. F.34, s. 3 (2). Benefits (3) If, before the parties were discharged, any of them has, by reason of anything done by any other party in connection with the performance of the contract, obtained a valuable benefit other than a payment of money, the court, if it considers it just to do so having regard to all the circumstances, may allow the other party to recover from the party benefitted the whole or any part of the value of the benefit.  R.S.O. 1990, c. F.34, s. 3 (3). Assumed obligations (4) Where a party has assumed an obligation under the contract in consideration of the conferring of a benefit by any other party to the contract upon any other person, whether a party to the contract or not, the court, if it considers it just to do so having regard to all the circumstances, may, for the purposes of subsection (3), treat any benefit so conferred as a benefit obtained by the party who has assumed the obligation.  R.S.O. 1990, c. F.34, s. 3 (4). Insurance (5) In considering whether any sum ought to be recovered or retained under this section by a party to the contract, the court shall not take into account any sum that, by reason of the circumstances giving rise to the frustration of the contract, has become payable to that party under any contract of insurance unless there was an obligation to insure imposed by an express term of the frustrated contract or by or under any enactment.  R.S.O. 1990, c. F.34, s. 3 (5). Special contractual provisions (6) Where the contract contains a provision that upon the true construction of the contract is intended to have effect in the event of circumstances that operate, or but for the provision would operate, to frustrate the contract, or is intended to have effect whether such circumstances arise or not, the court shall give effect to the provision and shall give effect to this section only to such extent, if any, as appears to the court to be consistent with the provision.  R.S.O. 1990, c. F.34, s. 3 (6). Where contract severable (7) Where it appears to the court that a part of the contract can be severed properly from the remainder of the contract, being a part wholly performed before the parties were discharged, or so performed except for the payment in respect of that part of the contract of sums that are or can be ascertained under the contract, the court shall treat that part of the contract as if it were a separate contract that had not been frustrated and shall treat this section as applicable only to the remainder of the contract.  R.S.O. 1990, c. F.34, s. 3 (7). ______________  Français