Nibbl contest - dipp's results

NFT fractionalization protocol with guaranteed liquidity and price based buyout.

General Information

Platform: Code4rena

Start Date: 21/06/2022

Pot Size: $30,000 USDC

Total HM: 12

Participants: 96

Period: 3 days

Judge: HardlyDifficult

Total Solo HM: 5

Id: 140

League: ETH

Nibbl

Findings Distribution

Researcher Performance

Rank: 87/96

Findings: 1

Award: $28.28

🌟 Selected for report: 0

🚀 Solo Findings: 0

L-01: Check _minBuyoutTime

Line References

NibblVault.sol#L173-L204

Impact

When initializing the vault, a user could set minBuyoutTime < block.timestamp unintentionally which could lead to an immediate buyout attempt.

Consider checking _minBuyoutTime >= block.timestamp in the NibblVault.sol's initialize function.

L-02: Use call instead of transfer for payable addresses

Line References

Basket.sol#L80

Impact

Since the transfer function for a payable address has a gas limit of 2300, it could fail in the event the receiving address has a fallback/receive function that requires more than 2300 gas.

As in NibblVault.sol and NibblVaultFactory.sol, use the ```call`` method to send ether.

L-03: ERC20 transfer return values not checked

Line References

NibblVault.sol#L517

NibblVault.sol#L526

Basket.sol#L87

Basket.sol#L94

Impact

Some ERC20 transfer functions may return false on an unsuccessful transfer instead of reverting.

It is recommended to either use OpenZeppelin's safeTransfer method or use a require statement to check the transfer's return value.

N-01: Incorrect revert messages

Line References

NibblVault.sol#L147

NibblVault.sol#L399

Impact

In the boughtOut modifier, if buyoutEndTime > block.timestamp the condition will fail and the transaction will revert. Currently the message displays "NibblVault: buyoutEndTime <= now" on failure which could lead to confusion as the buyOutEndtime would be more than now.

In initiateBuyout, if block.timestamp < minBuyoutTime the condition will fail and the message "NibblVault: minBuyoutTime < now" is displayed indicating that the transaction failed because the minBuyoutTime has been reached which is not true.

Change the message on line 147 to "NibblVault: buyoutEndTime > now" and the message on line 399 to "NibblVault: minBuyoutTime > now".

#0 - HardlyDifficult

2022-07-04T15:53:22Z

Valid considerations

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