konoha
konoha copied to clipboard
New Staking Curve
New Staking Curve that implements linear decay. Allows for you to create a lock that sets the staking amount and time you will lock it for (create_lock(amount, lock_time). Basically queries when you do so and keeps track of locked amount and lock creation time. Then if you call get_balance_of, it applies linear decay formula which to calculate your current amount at this time stamp.
IMPORTANT:
by changing the functions like set_staking_curve, it affected almost all other test files that used these functions like test_treasury.
Not sure what we must do about this, since both curves are different.