Marmara Staking Calculation
Including Yearly Return of Investment (ROI)

Calculation of Marmara (MCL) Staking on Marmara Chain

Anyone can calculate the estimated staking on Marmara Chain.

In this blog, We will show the software developers on how to calculate estimated earnings from staking on Marmara Chain. If you want to build a startup on Marmara Chain, it might be useful to add that.   

Step 1: Get the Marmara Stats

In order to calculate the estimated earnings for staking, you need to get the snapshot of Marmara Stats. You can see the stats below. There are two parameters used to calculate the estimation of staking rewards. For calculating earnings, you need to get them from json data. You can use any of three Marmara Blockchain explorer sites to get the required json data. They are Explorer Stats, Explorer 2 Stats and Explorer3 stats. The content of json looks like as follows:- 


Marmara Stats showing the Marmara (MCL) coin supply

Step 2: Calculating the Staking Rewards for MCL

Two parameters are required from the json data. They are TotalActivated and TotalLockedInLoops. These are the total locked coins in Activated and Credit Loop Contracts. The following formula is used to calculate the daily earnings from staking on Marmara Chain.

The user needs to provide two values namely user_coins_activated and user_coins_loops. The parameters are explained in the formula. They are straightforward to calculate.

Step 3: Code to Calculate Staking Rewards for MCL

The simple code is provided for Python.

import requests

def fetch_marmara_data():
    url = ""
    response = requests.get(url)
    if response.ok:
        data = response.json()
        return data["info"]
        raise Exception("Failed to fetch Marmara data")

def calculate_yearly_expected_roi(user_coins_activated, user_coins_loops):
    marmara_data = fetch_marmara_data()
    total_activated = marmara_data["TotalActivated"]
    total_locked_in_loops = marmara_data["TotalLockedInLoops"]

    daily_staking_rewards = (((user_coins_activated / total_activated) + (user_coins_loops / total_locked_in_loops) * 3) / 4) * 30 * 60 * 24 * 0.75
    yearly_staking_rewards = daily_staking_rewards * 365
    total_investment = user_coins_activated + user_coins_loops
    yearly_roi = (yearly_staking_rewards / total_investment) * 100
    expected_mcl_coins = total_investment + yearly_staking_rewards

    return daily_staking_rewards, yearly_roi, expected_mcl_coins

user_coins_activated = float(input("Enter User Coins Locked in Activated: "))
user_coins_loops = float(input("Enter User Coins Locked in Credit Loops: "))

daily_staking_rewards, yearly_roi, expected_mcl_coins = calculate_yearly_expected_roi(user_coins_activated, user_coins_loops)

print(f"Original Investment: {user_coins_activated + user_coins_loops:.2f} MCL")
print(f"Daily MCL Earning: {daily_staking_rewards:.2f} MCL")
print(f"Yearly Expected ROI: {yearly_roi:.2f}%")
print(f"Expected MCL Coins at the End of the Year: {expected_mcl_coins:.2f} MCL")
Experience the Power of MCL Staking on Marmara Chain
Unlocking Unique Benefits in the Crypto Economy