Skip to content

Commit

Permalink
chore: spell check
Browse files Browse the repository at this point in the history
  • Loading branch information
HrikB committed Feb 5, 2024
1 parent ad18069 commit f2d6561
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ jobs:
uses: codespell-project/[email protected]
with:
check_filenames: true
ignore_words_list: wee
skip: ./.git
ignore_words_list: we
skip: ./.git,./lib,./certora

validate-links:
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions src/InterestRate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ contract InterestRate {
slopeNumerator = collateralApyRayInSeconds - ilkData.adjustedProfitMargin - ilkData.adjustedBaseRate;
}

// Underflow occured
// If underflow occured, then the Apy was too low or the profitMargin was too high and
// Underflow occurred
// If underflow occurred, then the Apy was too low or the profitMargin was too high and
// we would want to switch to minimum borrow rate. Set slopeNumerator to zero such
// that adjusted borrow rate is below the minimum borrow rate.
if (slopeNumerator > collateralApyRayInSeconds) {
Expand Down
2 changes: 1 addition & 1 deletion src/YieldOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ contract YieldOracle is IYieldOracle, Ownable2Step {

/**
* @notice Creates a new `YieldOracle` instance.
* @param _historicalExchangeRates An intitial set of values for the
* @param _historicalExchangeRates An initial set of values for the
* historical exchange rates matrix.
* @param _wstEth Address of the wstETH contract.
* @param _stader Address of the Stader deposit contract.
Expand Down
2 changes: 1 addition & 1 deletion src/flash/handlers/SwEthHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract SwEthHandler is UniswapFlashswapHandler, BalancerFlashloanDirectMintHan
* @param _ionPool `IonPool` contract address.
* @param _gemJoin `GemJoin` contract address associated with swETH.
* @param _whitelist Address of the `Whitelist` contract.
* @param _swEthPool Adderess of the swETH/ETH Uniswap V3 pool.
* @param _swEthPool Address of the swETH/ETH Uniswap V3 pool.
*/
constructor(
uint8 _ilkIndex,
Expand Down
2 changes: 1 addition & 1 deletion src/flash/handlers/WstEthHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ contract WstEthHandler is UniswapFlashswapHandler, BalancerFlashloanDirectMintHa
* @param _ionPool `IonPool` contract address.
* @param _gemJoin `GemJoin` contract address associated with wstETH.
* @param _whitelist Address of the `Whitelist` contract.
* @param _wstEthUniswapPool Adderess of the wstETH/ETH Uniswap V3 pool.
* @param _wstEthUniswapPool Address of the wstETH/ETH Uniswap V3 pool.
*/
constructor(
uint8 _ilkIndex,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ abstract contract BalancerFlashloanDirectMintHandler is IonHandlerBase, IFlashLo

// It is technically possible to accrue slight dust amounts more of debt
// than maxResultingDebt because you may need to borrow slightly more at
// the IonPool level to receieve the desired amount of WETH. This is
// the IonPool level to receive the desired amount of WETH. This is
// because the IonPool will round in its favor and always gives out dust
// amounts less of WETH than the debt accrued to the position. However,
// this will always be bounded by the rate of the ilk at the time
Expand Down
2 changes: 1 addition & 1 deletion src/flash/handlers/base/IonHandlerBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.s
/**
* @notice The base handler contract for simpler interactions with the `IonPool`
* core contract. It combines various individual interactions into one compound
* interaction to faciliate reaching user end-goals in atomic fashion.
* interaction to facilitate reaching user end-goals in atomic fashion.
*
* @dev To actually borrow from `IonPool`, a user must submit a "normalized" borrow
* amount. This contract is designed to be user-intuitive and, thus, allows a user
Expand Down
4 changes: 2 additions & 2 deletions src/flash/handlers/base/UniswapFlashswapHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ abstract contract UniswapFlashswapHandler is IonHandlerBase, IUniswapV3SwapCallb
}

/**
* @notice Transfer collateral from user -> initate swap for collateral from
* @notice Transfer collateral from user -> initiate swap for collateral from
* WETH on Uniswap (contract will receive collateral first) -> deposit all
* collateral into `IonPool` -> borrow WETH from `IonPool` -> complete swap
* by sending WETH to Uniswap.
Expand Down Expand Up @@ -201,7 +201,7 @@ abstract contract UniswapFlashswapHandler is IonHandlerBase, IUniswapV3SwapCallb
}

/**
* @notice Handles swap intiation logic. This function can only initiate
* @notice Handles swap initiation logic. This function can only initiate
* exact output swaps.
* @param zeroForOne Direction of the swap.
* @param amountOut Desired amount of output.
Expand Down
2 changes: 1 addition & 1 deletion src/join/GemJoin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.s
* @notice Collateral deposits are held independently from the `IonPool` core
* contract, but credited to users through `gem` balances.
*
* @dev Seperating collateral deposits from the core contract allows for
* @dev Separating collateral deposits from the core contract allows for
* handling tokens with non-standard behavior, if needed.
*
* This contract implements access control through `Ownable2Step`.
Expand Down
2 changes: 1 addition & 1 deletion src/oracles/reserve/ReserveOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ abstract contract ReserveOracle {
}

/**
* @notice Intializes the `currentExchangeRate` state variable.
* @notice Initializes the `currentExchangeRate` state variable.
* @dev Called once during construction.
*/
function _initializeExchangeRate() internal {
Expand Down
9 changes: 5 additions & 4 deletions src/reward/RewardModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,11 @@ abstract contract RewardModule is ContextUpgradeable, AccessControlDefaultAdminR
uint256 _supplyFactor = $.supplyFactor;
address _treasury = $.treasury;

// Compared to the normal mint, we don't check for rounding errors.
// The amount to mint can easily be very small since it is a fraction of the interest accrued.
// In that case, the treasury will experience a (very small) loss, but it
// wont cause potentially valid transactions to fail.
// Compared to the normal mint, we don't check for rounding errors. The
// amount to mint can easily be very small since it is a fraction of the
// interest accrued. In that case, the treasury will experience a (very
// small) loss, but it won't cause potentially valid transactions to
// fail.
_mintNormalized(_treasury, amount.rayDivDown(_supplyFactor));

emit Transfer(address(0), _treasury, amount);
Expand Down

0 comments on commit f2d6561

Please sign in to comment.