What stops someone from giving their friend a billion dollars credit?
Nothing. In fact, two people who have a high level of trust in each other could easily grant each other infinite credit. This does not in any way undermine the Ripple system. To understand this point, you must understand that in Ripple, credit with a friend is only useful if you want to buy something directly from that friend, or if other people have granted that friend credit in the same amount. An example: Suppose I grant you a million dollars credit, and you want to use it to buy a yacht from Elsa, who happens to be connected to me on Ripple. However, for you to pay Elsa one million dollars through me, I would have to have one million dollars of credit with Elsa, and the decision to grant that credit is hers alone. As it turns out, Elsa has only decided to grant me $100 credit, and I have already used $50 of it. That means you ability to pay Elsa through me is limited my $50 remaining credit, regardless of how much credit I offer you. You might be able to find other paths to Elsa in