code-423n4 / 2022-07-yield-findings

0 stars 0 forks source link

QA Report #94

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Typos

The same typos (overriden and specialised) occur in all three lines referenced below:

Witch.sol: L213

Witch.sol: L267

Witch.sol: L462

    /// Useful as a method so it can be overriden by specialised witches that may need to do extra accounting or notify 3rd parties

Change overriden by specialised to overridden by specialized in each case. This assumes that a decision has been made to use standard American English throughout Yield Witch v2.


Witch.sol: L220

    /// @dev Calculates the auction initial values, the 2 non-trivial values are how much art must be repayed

Change repayed to repaid


Witch.sol: L385

    /// @dev transfers funds from the ilkJoin to the liquidator (and potentially the auctioneer if they're differente people)

Change differente to different


Witch.sol: L520

    /// @dev quoutes hoy much ink a liquidator is expected to get if it repays an `artIn` amount

Change quoutes hoy to quotes how


Long single line comments

For the sake of readability, long comments over 79 characters should wrap using multi-line comment syntax

Examples

Below are ten of the longest comments whose readability could be improved by converting them to multi-line comments:

Witch.sol: L213

    /// Useful as a method so it can be overriden by specialised witches that may need to do extra accounting or notify 3rd parties

Recommendation:

    /// Useful as a method so it can be overridden by specialized witches
    ///    that may need to do extra accounting or notify 3rd parties.

Witch.sol: L230

        // We store the proportion of the vault to auction, which is the whole vault if the debt would be below dust.

Recommendation:

        // We store the proportion of the vault to auction, which is the whole vault
        //    if the debt would be below dust.

Witch.sol: L284

    /// @return auctioneerCut Amount paid to whomever started the auction. 0 if it's the same address that's calling this method

Recommendation:

    /// @return auctioneerCut Amount paid to whomever started the auction:
    ///    0 if it's the same address that's calling this method.

Witch.sol: L335

    /// @dev Pay up to `maxArtIn` debt from a vault in liquidation using fyToken, getting at least `minInkOut` collateral.

Recommendation:

    /// @dev Pay up to `maxArtIn` debt from a vault in liquidation using fyToken, 
    ///    getting at least `minInkOut` collateral.

Witch.sol: L385

    /// @dev transfers funds from the ilkJoin to the liquidator (and potentially the auctioneer if they're differente people)

Recommendation:

    /// @dev transfers funds from the ilkJoin to the liquidator
    ///    (and potentially the auctioneer if they're different people).

Witch.sol: L407

    /// @notice Update accounting on the Witch and on the Cauldron. Delete the auction and give back the vault if finished.

Recommendation:

    /// @notice Update accounting on the Witch and on the Cauldron. Delete the auction
    ///    and give back the vault if finished.

Witch.sol: L408

    /// This function doesn't verify the vaultId matches the vault and auction passed. Check before calling.

Recommendation:

    /// This function doesn't verify that the vaultId matches the vault 
    ///    and the auction has passed. Check both before calling.

Witch.sol: L526

    /// @return auctioneerCut How much collateral the auctioneer is expected to get. 0 if liquidator == auctioneer

Recommendation:

    /// @return auctioneerCut How much collateral the auctioneer is expected to get: 
    ///    0 if liquidator == auctioneer.

Witch.sol: L544

        // If the vault hasn't been auctioned yet, we calculate what values it'd have if it was started right now

Recommendation:

        // If the vault hasn't been auctioned yet, we calculate what values it'd have 
        //     if it was started right now.

Witch.sol: L567

        // Calculate how much collateral to give for paying a certain amount of debt, at a certain time, for a certain vault.

Recommendation:

        // Calculate how much collateral to give for paying a certain amount of debt, 
    ///    at a certain time, for a certain vault.

alcueca commented 2 years ago

Thanks for the typo check.

I'm a 120 character per line maxi.

ultrasecreth commented 2 years ago

specialised is not a typo :)