Venice was not founded as a republic but as a protectorate of the Byzantine empire. The development of venice from a quasi monarchical city state to oligarchic republic was a long and involved process which in my opinion only finished with the execution of Marino Faliero in 1355. There were many points at which Venice might have become a monarchy early in its history with many Doges such as Maurizio Galbaio (r. 764-87) appointing their sons as Co-Doge during their lifetime following the fashion of the Byzantine emperors. However, due to the maritime-trading nature of the city it was fundamentally unsuited to a feudal monarchy since it did not possess the land required to sustain a feudal structure of allegiances and duties. Instead there was a bunch of competing magnate families of great wealth and none of them came to dominate. The political system thus becamea closed oligarchy around the Dogeship and the civic cult of St Mark, where any one of their number could become Doge. Slowly, the powers of the Doge began to be whittled away (he was not allowed to open official correspondence without at least two minders present to ensure that he did not mislead the council) and hereditary succession was banned. As I mentioned the process was completed when Marino Faliero attempted to overthrow the Republic. He was angry because he was unable to execute someone who had written an erotic poem about his wife. The coup attempt was defeated and Venice retained its oligarchic government unlike many other city states such as Florence.
Sources: J.J. Norwich, "A History of Venice"