@@ -20,7 +20,7 @@ import "../staking/IStaking.sol";
2020import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol " ;
2121import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol " ;
2222
23- /// @title Stable yield contract
23+ /// @title StableYield contract
2424/// @notice Contract that mints and distributes stable yield reward for participating in Threshold Network.
2525/// Periodically mints reward for each application based on authorization rate and destributes this rewards based on type of application.
2626contract StableYield is OwnableUpgradeable {
@@ -124,7 +124,7 @@ contract StableYield is OwnableUpgradeable {
124124 status == IStaking.ApplicationStatus.APPROVED,
125125 "Application is not approved "
126126 );
127- uint96 reward = caclulateReward (application, info.stableYield);
127+ uint96 reward = calculateReward (application, info.stableYield);
128128 /* solhint-disable-next-line not-rely-on-time */
129129 info.lastMint = block .timestamp ;
130130 //slither-disable-next-line incorrect-equality
@@ -156,19 +156,19 @@ contract StableYield is OwnableUpgradeable {
156156 distributor.functionCall (data);
157157 }
158158
159- function caclulateReward (address application , uint256 stableYield )
159+ function calculateReward (address application , uint256 stableYield )
160160 internal
161161 view
162162 returns (uint96 reward )
163163 {
164- uint96 authrorizedOverall = tokenStaking.getAuthorizedOverall (
164+ uint96 authorizedOverall = tokenStaking.getAuthorizedOverall (
165165 application
166166 );
167167 uint256 totalSupply = token.totalSupply ();
168168 // stableYieldPercent * authorizationRate * authorizedOverall =
169- // (stableYield / STABLE_YIELD_BASE) * (authrorizedOverall / totalSupply) * authorizedOverall
169+ // (stableYield / STABLE_YIELD_BASE) * (authorizedOverall / totalSupply) * authorizedOverall
170170 reward = uint96 (
171- (stableYield * authrorizedOverall * authrorizedOverall ) /
171+ (stableYield * authorizedOverall * authorizedOverall ) /
172172 totalSupply /
173173 STABLE_YIELD_BASE
174174 );
0 commit comments