Cyanobacteria are the simplest known cellular systems that regulate their biological activities in daily cycles. For the cyanobacterium Synechococcus elongatus, it has been shown by in vitro and in vivo experiments that the basic circadian timing process is based on rhythmic phosphorylation of KaiC hexamers. Despite the excellent experimental work, a full systems level understanding of the in vitro clock is still lacking. In this work, we provide a mathematical approach to scan different hypothetical mechanisms for the primary circadian oscillator, starting from experimentally established molecular properties of the clock proteins. Although optimised for highest performance, only one of the in silico-generated reaction networks was able to reproduce the experimentally found high amplitude and robustness against perturbations. In this reaction network, a negative feedback synchronises the phosphorylation level of the individual hexamers and has indeed been realised in S. elongatus by KaiA sequestration as confirmed by experiments.