Skip to content

Commit f620beb

Browse files
Amxxarr00
andcommitted
Documentation fixes for audit findings H-01, N-09, L-07 (#6634)
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
1 parent 96e6657 commit f620beb

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎contracts/governance/extensions/GovernorCountingOverridable.sol‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import {IGovernor, Governor} from "../Governor.sol";
1212
/**
1313
* @dev Extension of {Governor} which enables delegators to override the vote of their delegates. This module requires a
1414
* token that inherits {VotesExtended}.
15+
*
16+
* NOTE: Override votes can only be cast while the proposal is active. Mechanisms that shorten the voting duration,
17+
* such as the early closure implemented in {GovernorSuperQuorum}, may therefore prevent token holders from overriding
18+
* the votes cast with their tokens by their delegates.
1519
*/
1620
abstract contract GovernorCountingOverridable is GovernorVotes {
1721
bytes32 public constant OVERRIDE_BALLOT_TYPEHASH =

‎contracts/token/ERC20/extensions/ERC4626.sol‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ import {Math} from "../../../utils/math/Math.sol";
6464
* * If {previewRedeem} is overridden to revert, {maxWithdraw} must be overridden as necessary to ensure it
6565
* always return successfully.
6666
* ====
67+
*
68+
* [CAUTION]
69+
* ====
70+
* Any mechanism that mints shares without a corresponding increase in the vault's assets (collateral) will alter the
71+
* exchange rate and may open the door to vulnerabilities. In particular, this contract
72+
* must NOT be combined with {ERC20FlashMint}: flash-minting shares temporarily inflates the total supply without
73+
* increasing collateral, corrupting the exchange rate applied during the flash loan.
74+
* ====
6775
*/
6876
abstract contract ERC4626 is ERC20, IERC4626 {
6977
using Math for uint256;

‎contracts/utils/cryptography/signers/SignerWebAuthn.sol‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {WebAuthn} from "../WebAuthn.sol";
1010
* @dev Implementation of {SignerP256} that supports WebAuthn authentication assertions.
1111
*
1212
* This contract enables signature validation using WebAuthn authentication assertions,
13-
* leveraging the P256 public key stored in the contract. It allows for both WebAuthn
14-
* and raw P256 signature validation, providing compatibility with both signature types.
13+
* leveraging the P256 public key stored in the contract.
1514
*
1615
* The signature is expected to be an abi-encoded {WebAuthn-WebAuthnAuth} struct.
1716
*

0 commit comments

Comments
 (0)