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

Chainsecurity fixes #7

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions specs/BurnerRouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ The Burner Router allows redirecting the slashed collateral tokens to different
- Before the Vault's creation, deploy a new Burner Router via `BurnerRouterFactory` with the same collateral address as the Vault will use
- Deploy the Vault inputting the received `BurnerRouter` address and `IBaseSlasher.BaseParams.isBurnerHook` set to `true`

2. Slashing
2. Update setup

- Change global receiver, network-specific receivers, operator-network-specific receivers with the configured delay (in case of pending set requests, they are overrided with the new ones)
- Change `delay` itself after the delay (in case of pending set requests, they are overrided with the new ones)

3. Slashing

- The router is called via `onSlash()` function
- It determines the needed address for redirection and saves the redirection amount for it

3. Trigger transfer
4. Trigger transfer

- Transfers a given account's whole balance from the router to this account

Expand Down
6 changes: 5 additions & 1 deletion src/contracts/router/BurnerRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ contract BurnerRouter is OwnableUpgradeable, IBurnerRouter {
*/
mapping(address receiver => uint256 amount) public balanceOf;

constructor() {
_disableInitializers();
}

/**
* @inheritdoc IBurner
*/
Expand Down Expand Up @@ -172,7 +176,7 @@ contract BurnerRouter is OwnableUpgradeable, IBurnerRouter {
*/
function setDelay(
uint48 newDelay
) external {
) external onlyOwner {
_tryAcceptDelay();

if (pendingDelay.timestamp != 0) {
Expand Down
Loading