Skip to content
Access control Audit finding Intermediate

Admin Privilege in minting to arbitrary address allows operator to dilute tokens

The veTokenMinter contract lets any address added as an operator mint new tokens to any address. Because the admin can add themselves as an operator, they could mint excess tokens and dilute existing holders.

Alex the Entreprenerd Follow

Originally disclosed on Code4rena

Submitted by Alex the Entreprenerd, also found by IllIllI

veTokenMinter allows any operator to mint new tokens, that’s fine in the context of it being used for:

  • having VeAssetDepositor deposit for the user and mint
  • Having the Booster mint reward tokens

However because of the open ended system that allows any address to be set as operator, the system allows the admin to set themselves as the operator and to mint an excess amount of tokens, diluting other users.

Because this seems to be used exclusively by the VeAssetDepositor and the Booster hardcoding these two addresses would provide stronger security guarantees.

Proof of Concept

addOperator(malicious, {“from”: gov})

mint(malicious, AMOUNT, {“from”: malicious})

Recommended Mitigation Steps

Set the minters as immutable to provide stronger security guarantees.

jetbrain10 (veToken Finance) acknowledged, but disagreed with severity and commented:

Admin will be controlled by DAO to prevent this happen.

Alex the Entreprenerd (judge) commented:

Because am judging the contest am forfeiting any winnings.

I do believe that the system would be best if the minters where hardcoded (it would also save gas).


The original report as published on Code4rena, by Alex the Entreprenerd. 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

Likely the minter role is not restricted to the two contracts that need it, so the admin can grant minting rights to any address, including their own.

Impact

The admin could mint excess tokens and dilute other holders; the project argued the admin is controlled by a DAO, which they said prevents this.

What the attacker needed

Admin or DAO controls the minter role

The fix

The minters should be hardcoded or immutable so only the intended depositor and booster contracts can mint.

How it was found

  1. The admin adds a chosen address as an operator.
  2. That operator mints a large amount of tokens to itself.

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.

A token contract has a special role called an operator that is allowed to create new tokens. The report says the admin can give themselves this role and create extra tokens, which makes everyone else's share worth less. This is a trust problem rather than a break-in, because the admin already has power over the contract.

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.

More by Alex the Entreprenerd

View all

7 more disclosed reports, best first.

More from veToken Finance contest

View all

The newest disclosed reports for this program.

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.