Nibbl contest - Varun_Verma'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: 84/96

Findings: 1

Award: $28.28

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Lines of code

https://github.com/NibblNFT/nibbl-smartcontracts/blob/master/contracts/Basket.sol#L80

Vulnerability details

Impact

The use of the deprecated transfer() function for an address will inevitably make the transaction fail when:

The claimer smart contract does not implement a payable function. The claimer smart contract does implement a payable fallback which uses more than 2300 gas unit. The claimer smart contract implements a payable fallback function that needs less than 2300 gas units but is called through proxy, raising the call’s gas usage above 2300. Additionally, using higher than 2300 gas might be mandatory for some multisig wallets.

Proof of Concept

So I held my NFT is held in Basket.sol and accrues ETH as described in this line

https://github.com/NibblNFT/nibbl-smartcontracts/blob/master/contracts/Basket.sol#L77

I then want to withdraw this ETH however, my wallet implementation requires more than 2300 gas and I cannot get the ETH my wallet.

Tools Used

Manual Review

Use .call instead

#0 - mundhrakeshav

2022-06-26T17:22:01Z

#18

#1 - HardlyDifficult

2022-07-03T23:01:22Z

Agree that using .transfer is now discouraged. I think a difference here as compared to other contests is that the _to address is simply an input to this function call -- so if it reverts they could try again with a EOA and then transfer manually to the contract. Lowering risk and converting this into a QA report for the warden.

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