public override Envelope Prepare()
        {
            Log.Debug($"{nameof(Prepare)} (enter)");

            var message = MessageFactory.GetMessage <UpdateLeaderBoardMessage>(Config.GetInt(Config.BROKER_PROCESS_NUM), 0) as UpdateLeaderBoardMessage;

            message.ConversationID = Conversation.Id;


            var leaders = new List <LeaderboardRecord>();

            try
            {
                foreach (var portfolio in PortfolioManager.Portfolios)
                {
                    var record = LeaderboardManager.GetLeaderboardRecord(portfolio.Value);
                    leaders.Add(record);
                }
            } catch (Exception e)
            {
                Log.Error(e);
            }

            leaders.Sort((a, b) => a.TotalAssetValue.CompareTo(b.TotalAssetValue));

            var sigServ = new SignatureService();

            message.SerializedRecords = Convert.ToBase64String(sigServ.Serialize(leaders));

            var env = new Envelope(message)
            {
                To = this.To
            };

            Log.Debug($"{nameof(Prepare)} (exit)");
            return(env);
        }