Skip to content
Business logic Audit finding Intermediate

Owner of project NFT has no purpose

The project NFT minted to a builder can be transferred, but the builder role remains with the original address, so the new NFT owner has no permissions. If the original builder becomes unable to act, funds could be locked because there is no way to change the builder.

berndartmueller Follow

Originally disclosed on Code4rena

Submitted by berndartmueller, also found by byndooa and rbserver

Creating a new project mints a NFT to the _sender (builder). The builder of a project has special permissions and is required to perform various tasks.

However, if the minted NFT is transferred to a different address, the builder of a project stays the same and the new owner of the transferred NFT has no purpose and no permissions to access authorized functions in Rigor.

If real-world use-cases require a change of the builder address, there is currently no way to do so. Funds could be locked in the project contract if the current builder address is unable to perform any more actions.

Proof of Concept

HomeFi.sol#L225

function createProject(bytes memory _hash, address _currency)
    external
    override
    nonReentrant
{
    // Revert if currency not supported by HomeFi
    validCurrency(_currency);

    address _sender = _msgSender();

    // Create a new project Clone and mint a new NFT for it
    address _project = projectFactoryInstance.createProject(
        _currency,
        _sender
    );
    mintNFT(_sender, string(_hash));

    // Update project related mappings
    projects[projectCount] = _project;
    projectTokenId[_project] = projectCount;

    emit ProjectAdded(projectCount, _project, _sender, _currency, _hash);
}

Recommended Mitigation Steps

Consider preventing transferring the project NFT to a different address for now as long as there is no use-case for the NFT owner/holder or use the actual NFT owner as the builder of a project.

zgorizzo69 (Rigor) disputed and commented:

Builders are kyc’ed that’s why just by transferring the NFT you don’t get any of the builder privileges.

parv3213 (Rigor) commented:

As the warden said, Owner of project NFT has no purpose is true and is the intended behavior. Owning this NFT does not change anything.

Jack the Pug (judge) confirmed as valid


The original report as published on Code4rena, by berndartmueller. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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

How it worked

Root cause

The builder address is stored separately from the NFT ownership and is never updated when the NFT is transferred.

Impact

The NFT owner cannot use builder functions, and if the original builder can no longer act, funds could be locked in the project contract.

What the attacker needed

Project NFT is transferred; original builder cannot act

The fix

The report recommends preventing transfers of the project NFT until there is a use case, or using the actual NFT owner as the builder.

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 report has not been written yet. The Original tab links to the source.

When a project is created, the creator gets a special digital token (an NFT) and is recorded as the 'builder' with special rights. If they sell or give away that token, the new owner gets the token but not the builder rights, because the system still remembers the original builder. This means the token is useless for access, and if the original builder disappears, the project's money could get stuck.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by berndartmueller

View all

97 more disclosed reports, best first.

More from Rigor Protocol contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.