DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: low
Invalid

[L-2] State modifying function calls should emit events

Instances(9)

FILE: FILE: 2023-09-ditto/contracts/facets/VaultFacet.sol
function depositZETH(address zeth, uint88 amount) external nonReentrant {
// ...
// + @audit should emit event e.g emit DepositedZeth();
// + emit DepositedZeth();
}

VaultFacet.sol#L46

function depositAsset(address asset, uint104 amount)
external
onlyValidAsset(asset)
isNotFrozen(asset)
nonReentrant
{
// ...
// @audit should emit event e.g emit DepositedAsset();
// + emit DepositedAsset();
}

VaultFacet.sol#L65

function withdrawZETH(address zeth, uint88 amount) external nonReentrant {
// ...
// @audit should emit event e.g emit WithdrawnZeth();
// + emit WithdrawnZeth();
}

VaultFacet.sol#L88

function withdrawAsset(address asset, uint104 amount)
external
onlyValidAsset(asset)
nonReentrant
{
// ...
// @audit should emit event e.g emit WithdrawnAsset();
// + emit WithdrawnAsset();
}

VaultFacet.sol#108

FILE: 2023-09-ditto/contracts/facets/YieldFacet.sol
function withdrawDittoReward(uint256 vault) external nonReentrant {
// ...
// @audit should emit event e.g emit WithdrawnDittoReward();
// + emit WithdrawnDittoReward();
}

YieldFacet.sol#197

FILE: 2023-09-ditto/contracts/facets/OrdersFacet.sol
function cancelBid(address asset, uint16 id)
external
onlyValidAsset(asset)
nonReentrant
{
// ...
// @audit should emit event e.g emit CanceledBid();
// + emit CanceledBid();
}

OrdersFacet.sol#45

function cancelAsk(address asset, uint16 id)
external
onlyValidAsset(asset)
nonReentrant
{
// ...
// @audit should emit event e.g emit CanceledAsk();
// + emit CanceledAsk();
}

OrdersFacet.sol#69

function cancelShort(address asset, uint16 id)
external
onlyValidAsset(asset)
nonReentrant
{
// ...
// @audit should emit event e.g emit CanceledShort();
// + emit CanceledShort();
}

OrdersFacet.sol#120

FILE: 2023-09-ditto/contracts/facets/ERC721Facet.sol
function mintNFT(address asset, uint8 shortRecordId)
external
isNotFrozen(asset)
nonReentrant
onlyValidShortRecord(asset, msg.sender, shortRecordId)
{
// ...
// @audit should emit event e.g emit MintedNFT();
// + emit MintedNFT();
}

ERC721Facet.sol#283

Tools Used

Manual review/ VsCode

Recommendations

Emit events after change of current states

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.