Skip to content
Business logic Audit finding Beginner

Incorrect deployment parameters

The deployment scripts for the veToken project contained outdated addresses for G-Uni tokens, which are used to configure staking pools. An attacker could not directly exploit this, but using the wrong addresses would cause a loss of yield for users.

Picodes Follow

Originally disclosed on Code4rena

Submitted by Picodes

https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/migrations/25_deploy_angle_pools.js#L68

https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/migrations/25_deploy_angle_pools.js#L80

Impact

The address of G-Uni tokens in the deployment scripts are not up to date.

Proof of Concept

For example for agEUR/USDC it is 0xedecb43233549c51cc3268b5de840239787ad56c and not 0x2bD9F7974Bc0E4Cb19B8813F8Be6034F3E772add.

Recommended Mitigation Steps

For safety why not fetching directly the LP token from the staking contract?

jetbrain10 (veToken Finance) confirmed

Alex the Entreprenerd (judge) commented:

The warden has shown how a configuration file shows that the settings for the project are using an old address.

While the finding pertains to a setup script (generally out of scope), given that:

  • The sponsor has confirmed
  • The finding is valid in that using older deployments will cause at the very least a loss of yield
  • We already had an instance of bringing an out-of-scope file into scope via Sponsor-Confirming (See: #209)

With the information I have, I believe the finding to be of Medium Severity and believe the sponsor will mitigate by updating to the Warden suggested addresses.


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

Impact

Using the outdated addresses would cause at least a loss of yield for the project and its users.

What the attacker needed

Deployment script executed with old addresses

The fix

The deployment script should be updated to use the correct current addresses, or the LP token should be fetched directly from the staking contract.

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.

This report is about a mistake in a configuration file used when setting up a cryptocurrency project. The file listed old addresses for some tokens, which would cause the project to connect to the wrong tokens and lose money (yield). It is not a hack that an attacker can trigger, but a bug that would harm users over time.

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 Picodes

View all

17 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.

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.