Ethereum Credit Guild - Giorgio's results

A trust minimized pooled lending protocol.

General Information

Platform: Code4rena

Start Date: 11/12/2023

Pot Size: $90,500 USDC

Total HM: 29

Participants: 127

Period: 17 days

Judge: TrungOre

Total Solo HM: 4

Id: 310

League: ETH

Ethereum Credit Guild

Findings Distribution

Researcher Performance

Rank: 88/127

Findings: 1

Award: $59.60

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: SBSecurity

Also found by: 0xanmol, 0xpiken, Giorgio, NentoR, TheSchnilch, alexzoid, asui, btk, ether_sky, grearlake, kaden, santipu_, sl1

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
edited-by-warden
duplicate-1001

Awards

59.6005 USDC - $59.60

External Links

Lines of code

https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/tokens/GuildToken.sol#L197-L200

Vulnerability details

Impact

The GuildToken is supposed to registers the losses of the different gauges through the ProfitManager. There is one ProfitManager per market(credit token). The protocol intends to have several markets, however can only have one ProfitManager at a time.

/// @notice reference to ProfitManager address public profitManager;

This shortcoming will severely restrict the protocol breadth and only allow for one market to be operated, instead of several.

Proof of Concept

Tools Used

Use a mapping for registering different ProfitManager that are allowed to report to the GuildToken such as: mapping(address => bool) public isProfitManagers;

The function for add/remove a ProfitManger needs to be implemented as well.

function setManager(address profitManager, bool allowed) external role { isProfitManager[profitManager] = allowed; }

Now functions that rely on ProfitManagers need to be changed accordingly as well. To do so, associating a gauge to a profit in a mapping will make it easy to access the relevant ``profit. mapping(address => address) public gaugeToProfit;`

function _incrementGaugeWeight( address user, address gauge, uint256 weight ) internal override { address profitManager = gaugeToProfit[gauge]; . . .

Assessed type

Other

#0 - c4-pre-sort

2024-01-03T19:56:55Z

0xSorryNotSorry marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-01-03T19:57:21Z

0xSorryNotSorry marked the issue as duplicate of #1001

#2 - c4-judge

2024-01-29T21:37:49Z

Trumpero marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter