Algo Ssstablecoinsss

AI First Flight #2
Beginner FriendlyDeFi
EXP
View results
Submission Details
Impact: medium
Likelihood: low
Invalid

DSC mint/set_minter is owner-controlled with no engine binding, enabling unlimited unbacked mint by a compromised owner

DSC mint/set_minter are owner-controlled with no engine binding, so a compromised owner can mint unlimited unbacked DSC

Description

The DSC token exports mint and set_minter guarded only by snekmate's ownable/erc20 minter role, and the engine is never hard-wired as the sole minter at construction.

# decentralized_stable_coin.vy:33-41 (exports)
exports: (
erc20.IERC20,
erc20.IERC20Detailed,
erc20.burn_from,
erc20.mint, # @> mintable by any configured minter
erc20.set_minter, # @> owner can add minters
ow.owner,
ow.transfer_ownership,
)

Ownership and minter rights are off-chain operational settings; nothing in the contract guarantees the DSCEngine is the only address that can mint, so the stablecoin's backing depends entirely on the deployer correctly transferring ownership/minter to the engine and never re-granting it.

Risk

Likelihood:
Low. Requires owner key misuse or a deployment that forgets to renounce/transfer minter control to the engine exclusively.

Impact:
Medium. A minter other than the engine can mint DSC with no collateral backing, instantly depegging the stablecoin and stealing value from every holder. This is a centralization / trust-assumption risk inherent to the privileged minter design.

Proof of Concept

After deployment, the owner grants itself minter and mints unbacked DSC.

dsc.set_minter(attacker, True) # owner-only
dsc.mint(attacker, 1_000_000 * 10**18) # no collateral in engine, pure inflation

Recommended Mitigation

Bind the engine as the immutable sole minter and renounce owner mint rights at deployment, or at minimum document and gate set_minter.

@deploy
def __init__():
ow.__init__()
erc20.__init__(NAME, SYMBOL, DECIMALS, NAME, EIP712_VERSOIN)
+ # set the DSCEngine as the only minter and transfer ownership to it / renounce
+ erc20._set_minter(engine_address, True)
+ ow._transfer_ownership(engine_address)
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 5 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!