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

deth_ctf - Vault cannot be locked again by its owner #26

Open
ghost opened this issue Aug 12, 2024 · 1 comment
Open

deth_ctf - Vault cannot be locked again by its owner #26

ghost opened this issue Aug 12, 2024 · 1 comment
Labels
invalid This doesn't seem right

Comments

@ghost
Copy link

ghost commented Aug 12, 2024

Description of the Bug:

A Vault contract has a public boolean locked which indicates whether the contract can accept ether or not. Using unlock will change its value to false allowing future transactions. However, if an owner of Vault wants to lock it once again, there is no functionality that allows it.

Impact:

There is no way owner lock its Vault contract again.

Solution:

Create a new event Locked(address owner) and a new function which can lock a Vault again

function lock() external onlyOwner {
        locked = true;
        emit Locked(msg.sender);
    }
@ghost ghost changed the title deth_ctf - Vault cannot be locked again deth_ctf - Vault cannot be locked again by its owner Aug 12, 2024
@0xdeth 0xdeth added the invalid This doesn't seem right label Aug 17, 2024
@0xdeth
Copy link
Contributor

0xdeth commented Aug 17, 2024

This is design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant