Skip to content
Business logic Audit finding Beginner

Reward can be vested even after endTime

The reward vesting contract allowed funding after the vesting end time, so any funds added then would never be distributed as rewards. An attacker could deposit funds that become permanently stuck, causing a loss to the depositor.

Anurag Jain Follow

Originally disclosed on Code4rena

Submitted by csanuragjain

AuraVestedEscrow.sol#L96

Reward vesting should end once endTime is reached, this is not done currently.

Proof of Concept

  1. Observe the fund function
  2. Observe that there is no check to disallow funding once endTime has been reached

Recommended Mitigation Steps

Add below check

require(block.timestamp<=endTime, "Reward vesting period over");

0xMaharishi (Aura Finance) acknowledged, but disagreed with severity and commented:

This report is kind of invalid, because there would be no utility in this.. it’s specifically left open ended. With that being said, adding a check to ensure that funding is made BEFORE START TIME would be good.

This should be a 0 or 1 at most.

LSDan (judge) commented:

As far as I can tell, this is totally valid. Funding in this state would cause a loss of funds in that they would never go towards a reward.

0xMaharishi (Aura Finance) resolved:

code4rena aurafinance/aura-contracts#84 All code4rena fixes code-423n4/2022-05-aura#6


The original report as published on Code4rena, by csanuragjain. 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 fund function lacks a check to prevent funding after the vesting end time.

What the attacker needed

Ability to call the fund function; Vesting period has ended

The fix

A check should be added to require that funding occurs before the end time.

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 vesting contract releases rewards over a set period. If you add money after that period ends, the contract has no way to pay it out, so the money is stuck. This report points out that missing check.

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 Anurag Jain

View all

63 more disclosed reports, best first.

More from Aura 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.