Antonio is the merchant who is very generous, particularly with his good friends. Bassanio needs money in order to woo Portia. Even though all of Antonio's money is tied up in products yet to be sold, he agrees to help Bassanio because they are such close friends. Antonio is such a loyal friend to Bassanio that he agrees to borrow money from Shylock with the stipulation that Shylock can exact a pound of flesh from Antonio if he does not repay the loan within the agreed-upon time frame.
Bassanio is more impulsive and irresponsible (especially with money). And although he is loyal to Antonio, he does take advantage of his generosity; the attempt to woo Portia (and thereby inherit the vast amount of money of her estate by marrying her) is a gamble that he is willing to take with Antonio's money and the pound of flesh. However, Bassanio does reveal that he is more than a self-indulgent gambler who takes advantage of his friend. He is a very loyal friend just as Antonio is to him. He offers Shylock twice the amount he'd loaned to Antonio. Shylock refuses and then Bassanio offers to give his own flesh instead of Antonio's:
Good cheer, Antonio! What, man! Courage yet!
The Jew shall have my flesh, blood, bones, and all,
Ere thou shalt lose for me one drop of blood. (IV.i.113-15)
In the end, neither Antonio nor Bassanio are cut because a disguised Portia discovers a technicality in the agreement that no blood can be shed. In the earlier case, Bassanio needs money and Antonio helps him. In the later case, Antonio is facing a potentially fatal injury and Bassanio offers to take his place.