Kinetic Disclosed Report

Audit report Kinetic Audit Contest

`depositTokens` May Lead to Sending Excessive Tokens

Company
Created date
Feb 17 2025

Target

https://github.com/kinetic-market/public-money-market-contracts

Vulnerability Details

Description

In the CTokenRewards contract, the depositEther function includes the following check:

require(totalAmount == msg.value, "insufficient amount");

This ensures that the deposited Ether is equal to the total reward amount. However, in the depositTokens function, the check is as follows:

require(actualTransferredAmount >= totalAmount, "Invalid deposit");

This condition could potentially allow for more tokens to be deposited than the total reward amount. As a result, it may cause an excessive deposit of tokens beyond the intended reward. Moreover, since the contract does not have a function to withdraw the excess tokens, this could result in wasted tokens for the owner.

Recommendation

To prevent this issue, the contract should ensure that deposits are strictly limited to the total reward amount.

Validation steps

https://github.com/kinetic-market/public-money-market-contracts/blob/d46f5223344ff6502349549ad858588e496483df/contracts/Tokenomics/rewards/CTokenRewards.sol#L73

CommentsReport History
Comments on this report are hidden
Details
Statedisclosed
Severity
None
Bounty$143
Visibilitypartially
VulnerabilityBlockchain
Participants (3)
company admin
author