A was arrested by the police for committing an offence and was subsequently granted bail by the court. One of the conditions imposed by the court for granting bail was that A arrange for a surety for Rs. 50,000. A approached B to be a surety. B agreed, but insisted that they enter into a contract whereby A would deposit Rs.50,000 into B's account, which would be returned to A by B after the case was over.