Skip to content
Access control Write-up Intermediate

Alchemist

The TimelockConfig.confirmChange() function lacked access control and did not verify that a change had been proposed, allowing anyone to set critical configuration values to zero. An attacker could brick the mint recipient, causing Alchemist.advance() to revert and permanently halt $MIST inflation for staking rewards.

dacian.me

Published on dacian.me

Alchemist is a web3 community who developed the notable Fjord Foundry platform and a DeFi ecosystem composed of at least:

The author, on dacian.me

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the confirmChange() function lacked the onlyAdmin modifier and failed to verify that a pending change existed, so reading a non-existent map entry returned default zero values.

Impact

The attacker could permanently stop the flow of $MIST inflation for staking rewards by causing advance() to revert.

What the attacker needed

No special access

The fix

The function should have the onlyAdmin modifier and should verify that a change has been proposed before confirming it.

How it was found

  1. Wait until the timelock period has passed.
  2. Call confirmChange() with the ADMIN_CONFIG_ID to set the admin to zero.
  3. Call confirmChange() with the RECIPIENT_CONFIG_ID to set the recipient to zero.
  4. The advance() function now reverts because it tries to mint to the zero address.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

In a smart contract, a timelock is a safety delay before changes take effect. This contract allowed anyone to confirm a change, and it didn't check that a change had actually been requested first. Because missing data in Solidity returns zero instead of an error, an attacker could set important settings to zero, breaking the system.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.