code-423n4 / 2023-12-ethereumcreditguild-findings

9 stars 5 forks source link

Upgraded Q -> 2 from #258 [1706641667381] #1276

Closed c4-judge closed 5 months ago

c4-judge commented 5 months ago

Judge has assessed an item in Issue #258 as 2 risk. The relevant finding follows:

[L-8] Please use targetTotalSupply instead of totalSupply.

When applying loss, we calculate the newCreditMultiplier based on the loss and total supply. https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/governance/ProfitManager.sol#L331-L333

function notifyPnL() {
    uint256 creditTotalSupply = CreditToken(_credit).totalSupply();
    uint256 newCreditMultiplier = (creditMultiplier *
        (creditTotalSupply - loss)) / creditTotalSupply;
}

If there are unminted tokens, the correct total supply should be targetTotalSupply.

c4-judge commented 5 months ago

Trumpero marked the issue as duplicate of #292

c4-judge commented 5 months ago

Trumpero marked the issue as satisfactory

Trumpero commented 5 months ago

This issue should receive only 50% partial credit due to its lack of quality and maximum impact

c4-judge commented 5 months ago

Trumpero marked the issue as partial-50