This territorial expansion was accompanied by a great development of the Catalan trade, centered in Barcelona, creating an extensive trade network across the Mediterranean which competed with those of the maritime republics of Genoa and Venice. In this line, institutions were created that would give legal protection to merchants, such as the Consulate of the Sea and the Book of the Consulate of the Sea, one of the first compilations of maritime law. The trade allowed the formation of banking, while at the beginning of the 15th century the response of the local authorities of Barcelona to the crisis was to create the first public bank of Europe, the Taula de Canvi, in 1401.