Skip to content
Access control Audit finding Beginner

Anyone Can Avoid All Vether Transfer Fees By Adding Their Address to the Vether ExcludedAddresses List.

The Vether smart contract's addExcluded function lacked access control, allowing any user to add their own address to the fee-exemption list. This let an attacker bypass all transfer fees.

Vader Protocol contest

Originally disclosed on Code4rena

Vether.sol implements a fee on every token transfer, unless either the sender or the recipient exists on a list of excluded addresses (mapAddress_Excluded). However, the addExcluded() function in Vether.sol has no restrictions on who can call it. So any user can call addExcluded with their own address as the argument, and bypass all transfer fees.

Alice calls:

(1) Vether.addExcluded(aliceAddress), which adds Alice’s address to mapAddress_Excluded. (2) Alice can now freely transfer Vether with no fees.

Recommend adding restrictions to who can call addExcluded, perhaps by restricting it to a caller set by DAO.sol

strictly-scarce (vader) commented:

Vether contract is outside of contest

dmvt (judge) commented:

https://github.com/code-423n4/2021-04-vader-findings/issues/3#issuecomment-849043144

The warden should be paid out on this issue, in my opinion, because the code was included in the repo to be reviewed. The work to review the contract was done despite the fact that the team has addressed the issue and has already deployed vether.sol. I do not think that any issues related to Vether.sol should be included in the final report generated by @code423n4.

It was unclear to me (and obviously most of the wardens) that Vether.sol was considered out of scope.

moneylegobatman (C4 Editor) commented:

Leaving report and discussion in for transparency, since finding was awarded.

The original report as published on Code4rena. 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 addExcluded function lacked any access control, allowing any caller to modify the fee-exemption list.

Impact

Any user could avoid all Vether transfer fees, reducing the intended fee revenue.

What the attacker needed

None

The fix

The addExcluded function should be restricted to an authorised caller, such as one set by DAO.sol.

How it was found

  1. Call Vether.addExcluded with your own address.
  2. Transfer Vether tokens without paying fees.

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.

In many blockchain tokens, a small fee is taken on transfers. The contract keeps a list of addresses that don't have to pay this fee. The function to add an address to that list could be called by anyone, so a user could simply add themselves and avoid all fees.

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 from Vader Protocol 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.