private function saveState($lastTick, $balance)
    {
        $this->lastTick->set($lastTick);
        $this->balance->set($balance);
        $this->cache->saveDeferred($this->lastTick);
        $this->cache->saveDeferred($this->balance);
        $this->cache->commit();
    }