A receiver is functi officio when they have paid all preferential debts and the secured creditors plus any other creditors who rank ahead of the security under which they are appointed and once the receiver has retained sufficient funds (in their account) to cover remaining liabilities, remuneration and other expenses.
A receiver will only put themself at risk of being a “trespasser” if they continue to act and make payments to the general pool of creditors (receiver may be at risk of contravening schedule 7 of the Companies Act 1993) after they have paid all preferential debts and secured debts as well as retained enough funds to cover their fees and contingencies (creating a fund for their indemnity). 
The Court will not likely make an order directing a receiver to pay over funds to the company or a liquidator unless it can be determined that on no possible basis the receiver could be liable for claims arising out of the receivership (with a consequent continuing right to indemnity). Until there has been an accounting, the Court will not order a receiver to pay over a sum estimated to be in excess of the receiver’s needs.
If a receiver is removed by the secured creditor (under the security agreement), the powers of the receiver will cease except to the extent that they are needed to pay any preferential creditors and fees and expenses or to obtain indemnity for liabilities. The indemnity, and the right to a lien to secure it, continue until the receiver is free of liability and has been paid.
Case law analysis
Fistonich v Gibston & Jackson  NZHC 1422 [16 June 2022]
Following the sale of the business of FFWL, the secured creditor was repaid. There was a surplus of $40mil following repayment. The receivers intended to retire, however proposed that the surplus be paid back to the company, subject to the retention of $5.16 mil to pay the receivers’ fees and legal costs they expect to incur in claims brought or to be brought against them by Sir George and FFWL.
Sir George commenced proceedings against the receivers and the company seeking documents, and a separate proceeding alleging that the receiver had breached their duties by frustrating Sir George’s power to exercise his right of redemption, and that they had failed to act in good faith in selling the business. Sir George was also intending to file a further proceeding against the receivers.
The receivers are ordinarily entitled to an indemnity and lien in respect of their costs as recognised by the Court of Appeal in R A Price Securities Ltd v Henderson.
The right to the lien subsists until it has been determined that the receiver has liability for breaching their duties. The Court therefore held that the receivers had a right to retain the funds to defend allegations of neglect, default or breach of duty against them.
The Court held that it would be against public policy to have the receivers fund their own defence to any allegations of breach of duty, no matter how trivial, and bear the risk that, if the claim were to be without substance but the company had no funds, the receiver would not be able to recover costs incurred in the exercise of the receivership.
A receiver will not be at risk of any liability arising from trespassing, should he/she remain in office to make distributions to preferential creditors and to realise funds in the receivership necessary to cover his/her remaining liabilities, fees and expenses (including future), which may arise from on-going legal proceedings commenced against him/her, regardless of whether their appointer has been repaid in full.
However, once the receiver has accumulated sufficient funds in the receivership to cover their estimated legal costs in respect of on-going legal proceedings, the receiver should then resign.
The decision in Fistonich v Gibston & Jackson confirms that a receivers will be entitled to retain funds from the receivership to cover their legal fees (even if the claim against them relates to them breaching their statutory duties).
Section 20(b) of the Receiverships Act 1993 will then deal with the situation where the receiver has used company funds to defend claims against them, and the Court finds that they have in fact breached their duties. The receiver will then be required to return these funds to the company.