SIP-2: Implement a Samurai native OTC NFT solution

Motivation

Currently, the only secondary NFT market that is compatible with Samurai Node NFTs is tofuNFT, where Samurai Node NFTs and all of its tiers (Buke, Musha, and Mononofu) can be acquired and exchanged. While utilizing tofuNFT was a wise decision at the specific point in time, there are a few problems that need to be fixed.

  1. The inability to acquire or trade Samurai Node NFTs in large amounts is a major drawback and a demotivating issue for many of Samurai's active users who wish to be able to acquire, get rid of, or swap Samurai Node NFTs fast, effectively, and at scale.

  2. Instead of using xHNR, the protocol's native governance token, the TofuNFT market and its collections use FTM (Fantom). The utility of the xHNR token would be increased by following this proposal as the Samurai Node NFTs would be acquired and disposed using the protocol's native xHNR governance token.

  3. Because TofuNFT is an outside service provider, Samurai becomes more dependent on that party's technological capabilities, reputational standing, and terms of service. Samurai's goal is to be decentralized and function autonomously and independenťy, hence the project should support alternatives that promote no dependency on central middlemen and intermediaries.

  4. Samurai Node NFTs are subject to a 3% royalty collection on TofuNFT. Samurai might have more control over its royalties by using its own, independently owned service.

  5. Users are unable to conveniently and readily manage and control their Samurai Node NFTs within the primary point of engagement with the protocol (the Samurai dApp) because of the existing solution's inadequate integration capability.

Specification

Maintain and keep the Samurai Node NFT collection on tofuNFT while enhancing it with a second, independent, autonomous OTC NFT substitute that makes use of the xHNR governance token. All of the aforementioned pain issues would be addressed and resolved by the OTC NFT marketplace alternative, which would rely on a set of smart contracts that are described in more detail below.

With the help of the suggested smart contracts, OTC NFT events might happen inside of Samurai's dApp at a pre-set moment when the contract would be buying Samurai Node NFTs from its users at a set xHNR price. By selecting many Node NFTs at once, the solution would allow users to sell and dispose of their Node NFTs at scale within the dApp interface in exchange for xHNR tokens. The protocol would purchase Node NFTs using its treasury, and the treasury would then hold the purchased NFTs. To purchase Node NFTs and promote the suggested OTC NFT alternative, 3 000 000 xHNR tokens should be issued to the Treasury for the acquisition purposes.

The protocol should then sell the acquired Node NFTs that are held by the treasury to new or existing users within Samurai's dApp at a predetermined, scheduled time, at a fixed xHNR price, using the smart contracts. By choosing several NFTs at once, users would be able to quickly acquire Samurai's Node NFTs in exchange for xHNR tokens at scale. This could also potentially lead to a lower acquisition price by removing the need to pay fees associated with using the tofuNFT platform and would substantially increase the utility of the xHNR governance token.

The pricing of the Node NFTs within the OTC NFT solution should be set in xHNR token terms and according to the floor price of the NFTs on TofuNFT -~ 15% to incentivise and encourage the use of Samurai’s OTC NFT alternative.

The tokens would be kept by the treasury if there is a positive price difference between the purchase price and the selling price of Node NFTs, which might be viewed as an xHNR-native alternative to a royalty collection.

Setting precise acquisition and selling goals, while taking into account the state of the treasury, current activity (volatility and volume) in the tofuNFT market, can all be used to predict the length of OTC NFT events and the numbers of Node NFTs attained.

I have developed the following smart contracts which take into account and are in line with the practices and technological stack observed in the protocol’s verified and publicly accessible smart contracts, codebase and governance proposals.

The proposed smart contract/Solidity code:

pragma solidity 0.8.10;

contract SamuraiOTC { uint256 public buyPrice; uint256 public sellPrice;

IERC721 public hnrNodes; IERC20 public xHnr;

constructor( uint256 _buyPrice, uint256 _sellPrice, address _hnrNodes, address _xHnr ) { buyPrice = _buyPrice; sellPrice = _sellPrice; hnrNodes = IERC721(_hnrNodes); xHnr = IERC20(_xHnr); }

function sell(uint256[] memory _tokenIds) public { address nodeSeller = msg.sender; uint256 amount = uint256(_tokenIds.length) * sellPrice; batchTransfer(_tokenIds, true); xHnr.transfer(nodeSeller, amount); }

function buy(uint256[] memory _tokenIds) public { address nodeBuyer = msg.sender; uint256 amount = uint256(_tokenIds.length) * buyPrice; xHnr.transferFrom(nodeBuyer, address(this), amount); batchTransfer(_tokenIds, false); }

function batchTransfer(uint256[] memory _tokenIds, bool isSell) public { uint256 length = _tokenIds.length; address sender = msg.sender; address contractAddress = address(this);

isSell
  ? hnrNodes.transferFrom(sender, contractAddress, _tokenIds)
  : hnrNodes.transferFrom(contractAddress, sender, _tokenIds);

} }

Last updated