types of potential borrowers

suppose that there are two types of potential borrowers, each one making up half of the population. when they receive a loan of 100\$, risky borrowers will get a return of 150\$ with a probability of .5, and a return of zero with probability .5. Safe borrowers are not completely safe: they get 150\$ with probability of .9, but still get zero with probability of .1. Suppose that both types have zero wealth, and have an outside option in the labor market worth 10\$. both borrowers are risk neutral.
a. Suppose there is a bank that can differentiate between the borrowers’ types. For simplicity, assume that the bank’s gross cost of capital is k = 1 in other words, the bank’s gross cost of lending 100\$ is 100\$. Assuming the bank faces perfect competition, which of the two borrower types will it lend to?
b. Now suppose the bank cannot differentiate between types. Which of the borrowers types will it lend to?
c. Suppose that there is another lending option in this community: moneylender. This moneylender offers loans with a new feature: if you do not pay back your debt to the moneylender, he will smash your kneecaps. The value to the borrower of smashed kneecaps is -200\$. The value to the moneylender is zero. in all other ways, the moneylender is identical to the bank. would the moneylender be willing to lend in the first place, and would anyone enter into such a dangerous contract with the moneylender? Briefly explain your answer.
d. Assuming that neither banks nor moneylenders can distinguish between borrowers’ types, are borrowers better off or worse off when kneecapping contracts are available? Explain why and what kind of problem, if any, kneecapping solves