Debt DAO contest - yurahod's results

A cryptonative credit marketplace for fully anon and trustless loans to DAOs.

General Information

Platform: Code4rena

Start Date: 03/11/2022

Pot Size: $115,500 USDC

Total HM: 17

Participants: 120

Period: 7 days

Judge: LSDan

Total Solo HM: 1

Id: 174

League: ETH

Debt DAO

Findings Distribution

Researcher Performance

Rank: 100/120

Findings: 1

Award: $61.35

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Missing events

Issue Details

Events are inheritable members of contracts. When you call them, they cause the arguments to be stored in the transaction’s log — a special data structure in the blockchain. These logs are associated with the address of the contract which can then be used by developers and auditors to keep track of the transactions. The contract LineFactoryLib was found to be missing these events on the function transferModulesToLine which would make it difficult or impossible to track these transactions off-chain.

Piece of code:

function transferModulesToLine(address line, address spigot, address escrow) external { (bool success, bytes memory returnVal) = spigot.call( abi.encodeWithSignature("updateOwner(address)", address(line) )); (bool success2, bytes memory returnVal2) = escrow.call( abi.encodeWithSignature("updateLine(address)", address(line) )); (bool res) = abi.decode(returnVal, (bool)); (bool res2) = abi.decode(returnVal2, (bool)); if(!(success && res && success2 && res2)) { revert ModuleTransferFailed(line, spigot, escrow); } if(SecuredLine(payable(line)).init() != LineLib.STATUS.ACTIVE) { revert InitNewLineFailed(address(line), spigot, escrow); } }
function deploySecuredLine( address oracle, address arbiter, address borrower, address payable swapTarget, address s, address e, uint ttl, uint8 revenueSplit ) external returns(address){ return address(new SecuredLine(oracle, arbiter, borrower, swapTarget,s, e, ttl, revenueSplit)); }

Remediation

Consider emitting events for the functions mentioned above. It is also recommended to have the addresses indexed.

#0 - c4-judge

2022-12-06T14:33:15Z

dmvt marked the issue as grade-b

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