Closed sherlock-admin3 closed 3 months ago
note we no longer use the token supply from the bank module but rather use the max supply of 1e9 allo / 1e27 uallo
this change was made in https://github.com/allora-network/allora-chain/pull/479
note we no longer use the token supply from the bank module but rather use the max supply of 1e9 allo / 1e27 uallo
this change was made in allora-network/allora-chain#479
Does it mean that the issue was valid before this change? So this should be considered a valid issue. If I am wrong, please correct me. Thank you. @relyt29 @mystery0x @WangSecurity
GetTotalCurrTokenSupply
in the repo at that time called bankKeeper.GetSupply(ctx, params.BaseCoinUnit)
off the top of my head I don't know if an IBC transfer would change the bankKeeper's total supply count for that token. I would assume it wouldn't, since the supply of the token is the same no matter which chain it's on but if it indeed does change the bank keepers accounting of the total supply of the token then yes this bug would be valid bug, in my opinion
LZ_security
Medium
By transferring uallo tokens to another chain via IBC, the reward amount is affected.
Summary
By transferring uallo tokens to another chain via IBC, the reward amount is affected.
Vulnerability Detail
We can see that the monthly release of tokens is influenced by the circulating supply. By transferring uallo tokens to another chain via IBC, the total supply is reduced, thereby decreasing the circulating supply. Specifically, in GetTargetRewardEmissionPerUnitStakedToken, the reduction in circulating supply leads to a decrease in the overall release amount.”
An attacker can reduce the monthly release amount by transferring uallo tokens to another chain via IBC, thereby reducing the monthly rewards for topics, workers, and reputers.
Impact
An attacker can reduce the monthly release amount by transferring uallo tokens to another chain via IBC, thereby reducing the monthly rewards for topics, workers, and reputers.
Code Snippet
https://github.com/sherlock-audit/2024-06-allora/blob/main/allora-chain/x/mint/module/abci.go#L12C1-L86C2
https://github.com/sherlock-audit/2024-06-allora/blob/main/allora-chain/x/mint/keeper/emissions.go#L146
Tool used
Manual Review
Recommendation
Consider the impact of cross-chain transfers on reward distribution.