If all the conditions are satisfied, a money transfer is created from the lender to the borrower. A bank is willing to lend money only if the borrower has some assurance and little or no debt to the other agents. The amount of money a bank will lend is proportional to the borrower's assurance. If an agent borrows from a friend less than a couple of hundred dollars for a couple of months, no interest will be charged. If the lender is not specified and the amount of money to be borrowed is more than a couple of hundred dollars, then the lender is a bank.
Rules is triggered whenever there is a demand for bartering.
The agent who wants to barter should specify the item he wants, know the owner of that item, and offer one of his items in exchange. If the other agent accepts this offer, the barter takes place. If both agents agree on the barter, two item transfers occur. Rules is triggered when a money or item transfer is created by the want.buy.rules and fills the required slots of these transfers. If the seller of an item transfer has not been specified during a buying and selling process, a group in this class of rules deduces the commonsense knowledge of whom the seller is.