Whenever the money in the funds is insufficient to meet the outstanding certificates of indebtedness and interest coupons as they mature, it shall be the duty of the state treasurer to borrow temporarily a sufficient sum to make such payment, and for such purposes the said treasurer is hereby authorized and empowered to make and negotiate the necessary loan on the best terms obtainable, at a rate of interest not to exceed six per centum per annum; provided, that any surplus money in the interest on deposits fund and any surplus of any other fund on hand not otherwise appropriated shall be first used to pay said deficit before borrowing money to make such payments. The secretary of finance and administration shall countersign any and all necessary papers for the negotiation of such loan, and charge the proceeds to the treasurer, and the treasurer shall redeem such paper out of the interest fund whenever there shall be money in such fund available.