Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: high
Invalid

Flawed And Operator DOSes minting and burning of Debt token

Description

While the overriden _update() function in DebtToken prevent debt transfers, but it also prevents debt minting and burning. Because the && operator is used instead of ||.

As a result, the code requires both from and to to be zero_address. On the other hand either one of them is zero_address while minting or burning operations.

// https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/tokens/DebtToken.sol#L256-L259
function _update(address from, address to, uint256 amount) internal virtual override {
if (from != address(0) && to != address(0)) {
revert TransfersNotAllowed(); // Only allow minting and burning
}
...
}

Recommendations

function _update(address from, address to, uint256 amount) internal virtual override {
- if (from != address(0) && to != address(0)) {
+ if (from != address(0) || to != address(0)) {
revert TransfersNotAllowed(); // Only allow minting and burning
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Appeal created

inallhonesty Lead Judge 6 months 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!