NFT fractionalization protocol with guaranteed liquidity and price based buyout.
Platform: Code4rena
Start Date: 21/06/2022
End Date: 24/06/2022
Period: 3 days
Status: Completed
Pot Size: $30,000 USDC
Participants: 96
Reporter: itsmetechjay
Judge: HardlyDifficult
Id: 140
League: ETH
xiaoming90 | 1/96 | $3,657.41 | 4 | 0 | 0 | 3 | 1 | - | 0 | 0 |
hansfriese | 2/96 | $3,019.73 | 4 | 0 | 0 | 2 | 1 | - | - | 0 |
reassor | 3/96 | $2,424.37 | 3 | 0 | 0 | 1 | 1 | - | - | 0 |
unforgiven | 4/96 | $2,368.15 | 2 | 0 | 0 | 1 | 1 | - | 0 | 0 |
itsmeSTYJ | 5/96 | $2,339.34 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
WatchPug | 6/96 | $1,914.55 | 3 | 0 | 0 | 3 | 0 | 0 | 0 | 0 |
Lambda | 7/96 | $1,328.64 | 4 | 0 | 0 | 2 | 0 | - | - | 0 |
cccz | 8/96 | $1,312.51 | 3 | 0 | 0 | 2 | 0 | - | 0 | 0 |
ych18 | 9/96 | $1,098.21 | 3 | 0 | 0 | 1 | 0 | - | - | 0 |
Picodes | 10/96 | $1,098.21 | 3 | 0 | 0 | 1 | 0 | - | - | 0 |
Auditor per page
Nibbl is a fractionalization protocol that creates ERC20 tokens representing fractional ownership of an ERC721.
Nibbl uses a Bonding curve to facilitate trading of the ERC20 tokens.
The protocol also implements a valuation-based buyout mechanism so that the ERC721 isn’t locked in a contract/vault forever. A user can initiate a buyout and they need to pay an upfront cost for that. The cost is decided based on the current valuation of tokens. If the valuation goes above a certain level within a predefined duration the buyout is rejected. Therefore, the community can buy more tokens in order to reject a buyout. If the buyout isn’t rejected it is automatically considered successful and the user who initiated the buyout can withdraw the asset.
Code Repository: https://github.com/NibblNFT/nibbl-smartcontracts
Documentation: https://github.com/NibblNFT/nibbl-smartcontracts/blob/master/README.md
Code and Architecture Walkthrough: https://youtu.be/dJFOgo58qVg
Product Beta: http://beta.nibbl.xyz/
To run tests, run following commands:
$ npm install $ npx hardhat test
File | LoC | External Calls | Description |
---|---|---|---|
NibblVaultFactory.sol | 70 | 0 | Vault Factory that deploys vault and handles governance and access control. |
NibblVault.sol | 290 | 0 | Vault which holds NFT and has logic for trading and buyout |
Basket.sol | 80 | 0 | Basket that can be used to fractionalize multiple NFTs. |
Twav.sol | 25 | 0 | Implements time-weighted valuation to be consumed in NibblVault for buyouts |
ProxyVault.sol | 17 | 0 | Proxy contract that gets deployed with implementation as NibblVault |
ProxyBasket.sol | 17 | 0 | Proxy contract that gets deployed with implementation as Basket |
AccessControlMechanism.sol | 19 | 0 | Inherited in NibblVaultFactory for access control on certain actions |
EIP712Base.sol | 21 | 0 | To implement permit functionality with EIP712 signing. |
Upgradablity, pausability and access control
TWAV