Bloomberg News has reported Ireland and Apple are close to a deal to protect the government from any losses that could occur while it holds as much as €15 billion of the iPhone maker’s money during its appeal over an EU state aid ruling.

The European Commission last year slapped Apple with a multi billion-euro bill, saying Ireland granted unfair deals that reduced the company’s effective corporate tax rate. Both Apple and the government have denied any illegal state aid was granted. The National Treasury Management Agency will place the money in an escrow account pending an appeal.

If the appeal, which could take as long as five years, is successful, the money will be returned to Apple. Ireland wants to make sure it isn’t liable for any drop in the value of the fund while the case winds its way through the EU courts. An agreement on the issue may come within weeks, Bloomberg reported, citing a source who spoke on condition of anonymity because the negotiations on the structure of the proposed account have yet
to be finalized.

"We continue to cooperate with Ireland on the recovery process the commission has mandated but remain confident that once the General Court of the EU has reviewed all the evidence it will overturn the commission’s decision," Apple said in a statement. It declined to comment on the funds.