Skip to content

Commit 2ee5bc0

Browse files
vzotovacygnusv
andcommitted
Apply suggestions from code review
Co-authored-by: David Núñez <[email protected]>
1 parent 265529a commit 2ee5bc0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contracts/reward/StableYield.sol

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import "../staking/IStaking.sol";
2020
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
2121
import "@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.
2626
contract 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

Comments
 (0)