COF is the implied interest rate paid by the bank on the funds that it uses in it's business. Banks get these funds from sources like Savings & Current Accounts (Cheapest sources), Fixed Deposits, Bonds, Debt instruments etc.
Now the bank has to lend money at a rate higher than its COF to make profits.
Let's understand NIMs:
Net Interest Margin is difference between investment returns earned and interest paid divided by Average Earning Assets.
NIM will be 100-70/1000 = 3%.
Preference should be given to a bank which has stable NIM along with stable asset quality (lower NPA ratios)