vacp2p / staking-reward-streamer

MIT License
0 stars 0 forks source link

Introduce a YEAR constant to represent tropical year in seconds #57

Open 3esmit opened 1 month ago

3esmit commented 1 month ago

Currently the contract uses 365 days for calculations, this is a very rough estimate of an year.

While the impact of this value being not accurate would be negligible, there is no reason for using the correct value for 1 full year..

I suggest introducing a constant:

//time in seconds for a tropical year
uint256 public constant T_YEAR = 365 days + 5 hours + 48 minutes + 45 seconds;

And use whenever is needed to calculate over 1 year.