Blanchard Kahn error and timing of models

I run my model but I get a Blanchard Kahn error.eeetaylor.mod (3.9 KB)
I’m checking the timng of model to fix this error.Help me if you can.Thank you in advance for your kindness

There is a banking section in my model.The profit function of banks is as follows:

BD=debt to central bank
And we have a balance sheet constraint as follows:
I have designed and solved the problem as follows:

Is my design correct?
Is the second method not correct?
I have seen in some articles that they have used the second method.for example:
Page 14 in
aaa.pdf (2.7 MB)

Which method do you think is right?
Thank you for helping me

I don’t understand the logic of the very first equation. if everything on the right is dated t-1, then the left is also dated t-1

I introduced that profit function for simplicity. In fact, the bank profit function in my model is of the BGG type

1- Lending in t-1
2- the firm produces and sells its goods. In t
3-If the firm was able to repay its debt to the bank, the bank income is:


4-If the firm is unable to repay, the bank will take over the firm’s assets


Of course, in my model, bank debt to the central bank follows a dynamic process:


So I solve the problem as follows:


Have I solved the problem correctly?

Is the second method wrong: