Skip to content

Commit

Permalink
Merge pull request #7 from symbioticfi/chainsecurity-fixes2
Browse files Browse the repository at this point in the history
Chainsecurity fixes
  • Loading branch information
1kresh authored Nov 5, 2024
2 parents 57a3f88 + aa7a864 commit 60a5eb8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
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

0 comments on commit 60a5eb8

Please sign in to comment.