#64 Add smart-contract for Crabble dapp

Summary

Bytepitch is proposing to add a smart-contract that enables NFT lending on the Agoric chain. This contract will enable Bytepitch’s mainnet dapp Crabble.

Crabble redefines the utility of NFTs by introducing a short-term rental model akin to Airbnb, but for non-fungible tokens. Designed to alleviate the market liquidity issues faced by NFTs with practical utility, Crabble allows NFT owners to monetize their digital assets when they are not actively using them.

Crabble will be the second mainnet partner dapp launching on the Agoric chain with a targeted release date of: 18th December 2023

Application Overview

NFTs with clear utility can have low market liquidity, making it difficult for owners to make use of their assets. Crabble’s marketplace will make an NFTs utility more beneficial for its owner through short-term rentals.

Crabble’s platform empowers NFT holders to lucratively engage with their tokens by offering them as short-term rentals. Owners easily list their NFTs, set their availability, and let the automated system handle the rental transactions. This streamlined process makes it very convenient for owners to earn passive income.

On the safety front, Crabble gets it right by ensuring that all rentals are backed by collateral, as determined by the NFT owner. This collateral system serves as a security measure to protect owners against potential loss of their valuable assets during the rental period.

When a borrower finds an NFT he wishes to rent, the platform facilitates a swift transfer of ownership upon payment. This speed ensures that the borrower can quickly access the utility he or she is after without the long-term binding investment in owning the NFT. Meanwhile an owner enjoys the financial benefits of renting out his dormant asset with peace of mind knowing that his NFT is safeguarded by collateral.

The Crabble ecosystem flourishes as it caters to a win-win situation: borrowers receive temporary access to utility without the burdens of ownership, and owners earn from assets that would otherwise be idle.

In essence, Crabble is evolving the NFT landscape by unlocking the potential of short-term rentals for digital assets, offering a practical and profitable solution to both NFT owners and users.

Note: this will be a technical launch to get the associated contracts deployed on chain. Inventory will be added at a later date.

Background

Bytepitch is a blockchain development and consulting firm with six years of robust presence in the Web3 space. Established by a team of innovative minds, Bytepitch has carved out a niche in delivering custom blockchain solutions that align with diverse business needs. With a workforce of over fourty software engineers, Bytepitch brings technical prowess and strategic insight to the table, propelling projects from ideation to successful launches on mainnets. Bytepitch services span from conceptualizing and developing decentralized platforms to managing the intricacies of operating blockchain nodes.

The company joined the Agoric ecosystem two years ago, contributions include successfully completed bounties such as a Lending Pool Protocol, Inter-Blockchain Communication (IBC) Liquidity Mining, and Automated Market Maker (AMM) Stop Loss functionalities. Initiating its journey with public bounties and subsequently developing an Agoric curriculum into its Chainboard Academy, an online bootcamp tailored for developers. Bytepitch’s latest venture, Crabble, exemplifies its commitment to fostering innovation within the sector. As a crypto-native startup, Crabble reflects Bytepitch’s mission to enhance the utility of NFTs through a user-friendly short-term rental protocol, showcasing the practical application of blockchain technology beyond the conventional scope.

Contract/Component Details

The contract is designed to manage the short-term rental process of NFTs automating several key features to make the system easy, safe, and fast for the users:

  1. Listing and Availability Management: Allows NFT owners to list their assets on the platform and set availability schedules for rental.

  2. Rental Agreement Execution: Manages the agreements between the NFT owners and borrowers, incorporating terms like rental duration and cost.

  3. Collateral Handling: Collects and holds the agreed-upon collateral from the borrower to ensure the safety of the NFT during the rental period.

  4. NFT Transfer Mechanism: Temporarily transfers the control or access rights of the NFT to the borrower for the duration of the rental period.

  5. Rental Termination and Asset Return: Ensures that after the rental period ends, the NFT is returned to the owner, and the collateral is released back to the borrower if the NFT is returned.

The contract incorporates elements of smart contract programming related to ICS721 once Agoric integration is in place and in later release with the Interchain Accounts and Interchain Queries. It may also integrate with other DeFi protocols for collateral management or utilize oracle services for off-chain data.

The components of Crabble’s smart contract are designed with modularity and interoperability in mind so that other projects can reuse and adapt them to their specific needs. This could be accomplished by:

  • Making the code base available on GitHub, so other developers can use and modify it for their projects.

  • Develop a library of smart contract functions that handle generic tasks like collateral management, NFT transfers, and payment distribution.

  • Establishing a set of standards for NFT rentals that could be widely adopted by the industry, making the system interoperable with different NFT marketplaces and platforms.

  • Offering templates or builder tools that allow other projects to customize the rental contract according to their specific use case without needing to code from scratch.

By addressing these areas, Crabble will position itself not just as a platform for NFT rentals, but also as a provider of infrastructure that other projects in the NFT space could leverage to introduce rental features into their ecosystems. This would further enhance the utility and flexibility of NFTs across various markets and applications.

2 Likes

Deployment Checklist and Security Review

Bytepitch and Agoric OpCo have jointly completed the Mainnet-2 partners checklist. Relevant GH tickets include

Code Review of Contract Code

1 Like

Resources

Bytepitch website: https://blockchain.bytepitch.com/
Crabble website is ‘coming soon’ (pending inventory)
Crabble github: CrabblePitch · GitHub

1 Like

Agoric OpCo has worked with the Bytepitch team on contract validation and working through the deployment checklist . Everything requested was completed. OpCo product and engineering is supportive of this deployment.

Congrats Bytepitch team on getting this far as our 2nd MN2 partner launch!

Tests executed after deployment on Agoric Xnet

Greetings Agoric community! As you know we’re on our way to the Agoric mainnet and we’ve been testing our application on Xnet test network. Figured it’s better to keep the community involved. Here are the scenarios we’ve tested and issues we’ve identified so far. Thanks!

End to End testing:

  • List utility on catalog
    • NFT brand and items held on user wallet are listed as an option
    • UI adapts to different renting durations
    • Catalog is updated, adding new utility
    • Utility will be shown in On Rent > Owned
  • Update utility configuration
  • Unsuccessfully try to list or update utility with invalid parameters
    • Configuration rules are enforced
  • Borrow utility
    • Catalog is updated, removing utility
    • Utility will be shown in On Rent > Borrowed
    • Collateral and rentalFee will be displayed on Owner On Rent balances
  • Return utility after defined period
    • Catalog is updated, adding utility
    • Utility will be removed from On Rent > Borrowed
    • Collateral will no longer be displayed on Owner On Rent balances
  • Withdraw rental fee
    • Rental fee will no longer be displayed on Owner On Rent balances
    • User wallet balance is updated
  • Withdraw utility
    • Catalog is updated, removing utility
    • Utility will be removed from On Rent > Owned
  • Rental is liquidated after utility is not returned
    • Utility phase will be updated to liquidation on the On Rent > Owned
  • Withdraw collateral after liquidation
    • Collateral will no longer be displayed on Owner On Rent balances
    • User wallet balance is updated
  • Unsuccessfully try to update configuration of rented or removed utilities
  • Unsuccessfully try to borrow with invalid duration
  • Unsuccessfully try to borrow without the required collateral and fee
  • Transaction offer parameters are correctly built in the above operations
  • Make sure that specific operations in the contract can be paused through a governance voting in case of emergencies
    • A committee member asks the community to pause offers arriving from the invitations tagged make rental
    • Other community members vote positve
    • make rental offers paused
    • Another committee member asks to remove the filter on make rental
    • The others agree
    • Filter is removed

Issues Identified:

  • The following assets USDT, USDC, stATOM, DAI_axl and DAI_grv are listed as possible options, but they cannot be used as collateral or rentalFee brands.
    • Reason: they are published under the agoricNames brands but not under the boardAux.
  • The Offer With Error message triggered when an invalid operation is executed is not consistent. Sometimes it will not be shown, but the invalid operation will not be executed
  • When the owner of the utility withdraws the collateral or the utility itself of a rental that still has rentalFee in its balance, it will not be possible to withdraw the rentalFee later.
    • Reason: after the rental phase is updated to removed , it will no longer be visible to owner wallet.
    • Solution: the visible rental will not be filtered by phase but instead by the rentalBalance
  • When listing a new rental the Auction tier is available to be selected, but if the owner does it, the utility will not be published into the catalog
    • Reason: although the contract is able to handle rentals with the auction tier, the UI does not support that feature yet and will not build the offer as expected by the contract.

Note:

The issues identified above were originated by the frontend, wish is still under development and will be updated soon.
The contract has shown the expected behaviour during the tests.

2 Likes