Created
September 7, 2019 15:43
-
-
Save iicc1/453b9b169431a0372b5454da79b67d2d to your computer and use it in GitHub Desktop.
Matlab Script created to evaluate LTO Network staking techniques graphically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
close all; | |
clc; | |
initial_amount = 50000; | |
apr = 0.07; | |
divisions = 24; | |
n = [1:1:divisions]; | |
divisions_apr = apr / divisions; | |
end_amount_nostake = initial_amount; | |
end_amount_nocompound = initial_amount * (1 + (divisions_apr .* n)); | |
end_amount_standard = initial_amount * ((1 + divisions_apr).^(n)) - n; | |
end_amount_continuous = initial_amount * exp((divisions_apr) * n); | |
figure | |
plot(n, end_amount_nostake) | |
hold on | |
plot(n, end_amount_nocompound, 'r', 'LineWidth', 1) | |
hold on | |
plot(n, end_amount_standard, 'b', 'LineWidth', 1) | |
hold on | |
plot(n, end_amount_continuous, 'g', 'LineWidth', 1) | |
title('LTO staking interest comparison over a year') | |
xlabel('15 day timeframes'); | |
ylabel('Total LTO amount'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment