Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing events for critical operations #42

Closed
code423n4 opened this issue Nov 18, 2021 · 1 comment
Closed

Missing events for critical operations #42

code423n4 opened this issue Nov 18, 2021 · 1 comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

WatchPug

Vulnerability details

Across the contracts, there are certain critical operations that change critical values that affect the users of the protocol.

It's a best practice for these setter functions to emit events to record these changes on-chain for off-chain monitors/tools/interfaces to register the updates and react if necessary.

Instances include:

https://github.com/code-423n4/2021-11-yaxis/blob/146febcb61ae7fe20b0920849c4f4bbe111c6ba7/contracts/v3/alchemix/AlToken.sol#L93-L95

function setBlacklist(address _toBlacklist) external onlySentinel {
        blacklist[_toBlacklist] = true;
    }

https://github.com/code-423n4/2021-11-yaxis/blob/146febcb61ae7fe20b0920849c4f4bbe111c6ba7/contracts/v3/alchemix/AlToken.sol#L78-L80

function setWhitelist(address _toWhitelist, bool _state) external onlyAdmin {
        whiteList[_toWhitelist] = _state;
    }

https://github.com/code-423n4/2021-11-yaxis/blob/146febcb61ae7fe20b0920849c4f4bbe111c6ba7/contracts/v3/alchemix/AlToken.sol#L107-L109

function setCeiling(address _toSetCeiling, uint256 _ceiling) external onlyAdmin {
        ceiling[_toSetCeiling] = _ceiling;
    }
@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Nov 18, 2021
code423n4 added a commit that referenced this issue Nov 18, 2021
@Xuefeng-Zhu Xuefeng-Zhu added the duplicate This issue or pull request already exists label Dec 1, 2021
@Xuefeng-Zhu
Copy link
Collaborator

#34

@0xleastwood 0xleastwood added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation and removed 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments labels Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants