Kittyswaps.org: Uniswap for ERC-1155 multi-token protocol and liquidity-minable NFT market


Kittyswaps is uniswap for ERC-1155 multi-token protocol and liquidity-minable NFT market. Uniswap is for trading ERC-20 tokens, while Kittyswaps is a protocol for ERC-1155 tokens.

Official Site: https://kittyswaps.org

What is Bonus Period and Bonus Multiplier?

  • Bonus Period: From block height 11,200,000 to 12,000,000.
  • How many days is Bonus Period: ~125 days.
  • Bonus Multiplier: 3.0 (In bonus period, you can get 3 times KITTYs.)

What is Threshold Strategy?

  • Threshold Strategy: When the liquidity is too low for KITTY-ETH UNI-LP Pool, a Threshold is applied to limit the mining rate. Threshold Strategy is designed to incentivize bigger liquidity providers and make the distribution of KITTYs fair. The rules are as follows:
  • Liquidity Threshold $0 ~ $9,999: 5% Mining rate
  • Liquidity Threshold $10,000 ~ $19,999: 10% Mining rate
  • Liquidity Threshold $20,000 ~ $29,999: 20% Mining rate
  • Liquidity Threshold $30,000 ~ $39,999: 30% Mining rate
  • Liquidity Threshold $40,000 ~ $49,999: 40% Mining rate
  • Liquidity Threshold $50,000 ~ $59,999: 50% Mining rate
  • Liquidity Threshold $60,000 ~ $69,999: 60% Mining rate
  • Liquidity Threshold $70,000 ~ $79,999: 70% Mining rate
  • Liquidity Threshold $80,000 ~ $99,999: 80% Mining rate
  • Liquidity Threshold $100,000 ~ $200,000: 90% mining rate
  • Liquidity Threshold $200,000 and above: 100% mining rate, no Threshold

How many KITTYs are spawned per HOUR?

  • Notice Note that a Threshold can be applied to all the following mining rate.
  • In bonus period: There are ~3 KITTYs spawned per hour(~72 KITTYs per day).
  • After bonus period: There is only ~1 KITTY spawned per hour(~24 KITTYs per day).
  • KITTY/ETH UNI-LP pool spawns ~48 (2/3 of all) KITTYs every day.
  • Other UNI-LP And SUSHI-LP Pools ~1 KITTY every day.
  • KITTY Genesis Pools are most suitable for defi newbies and spawns ~1 KITTY every 2 days.

What is the totalsupply of KITTYs?

  • Cap: KITTYs will be capped on ~20,000. Can only be increased if agreed by the community.
  • First Year: At 1st year, there are only ~14,760 KITTIES spawned.
  • Calculations: 24 x 3 x 125 + 24 x 1 x (365–125) = ~14,760 KITTYs
  • Reserve allocation: 25%, for whales who invest and provide liquidity, lock/burn the rest.
  • Dev allocation: only 5%. For the hard working devs.

What is KittyCat NFTs and how can I get it?

  • KittyCats are extremely rare NFTs.
  • NFTs(non-fungible tokens) represents collectibles with limited edition.
  • For each KITTY token you have, you can collect a limited edition of KittyCat NFT.
  • 0.05% of all tx fee in KittySwaps(Upcoming) goes to KITTY holders.
  • KittyCat NFTs can be traded in markets like opensea(and soon our own Kittyswaps NFT market).
  • Special Thanks(Credits) To: Uniswap, Niftyswap, Sushiswap, YAM, Opensea…etc. Without you, our project will not be possible.

Protocol Specification

Kittyswaps is a fork of Uniswap, a protocol for automated token exchange on Ethereum. While Uniswap is for trading ERC-20 tokens, Kittyswaps is a protocol for ERC-1155 tokens. Both are designed to favor ease of use and provide guaranteed access to liquidity on-chain.

Most exchanges maintain an order book and facilitate matches between buyers and sellers. Kittyswaps smart contracts hold liquidity reserves of various tokens, and trades are executed directly against these reserves. Prices are set automatically using the constant product $x*y = K$ market maker mechanism, which keeps overall reserves in relative equilibrium. Reserves are pooled between a network of liquidity providers who supply the system with tokens in exchange for a proportional share of transaction fees.

An important feature of Kittyswaps is the utilization of a factory/registry contract that deploys a separate exchange contract for each ERC-1155 token contract. These exchange contracts each hold independent reserves of a single fungible ERC-1155 currency and their associated ERC-1155 token id. This allows trades between the Currency and the ERC-1155 tokens based on the relative supplies…

Differences with Uniswap

There are some differences compared to the original Uniswap that we would like to outline below:

  1. For ERC-1155 tokens, not ERC-20s
  2. Base currency is not ETH, but needs to be an ERC-1155
  3. Liquidity fee is 0.5% instead of 0.3%
  4. All fees are taken from base currency (Uniswap takes trading fees on both sides). This will lead to some small inneficiencies which will be corrected via arbitrage.
  5. Users do not need to set approvals before their first trade
  6. 100% native meta-tx friendly for ERC-1155 implementations with native meta-tx functionalities
  7. Front-end implementations can add arbitrary fee (in addition to the 0.5%) for tokens with native meta-transactions.
  8. Less functions than Uniswap

There are pros and cons to these differences and we welcome you to discuss these by openning issues in this repository.

Contracts

KittyswapsExchange.sol: The exchange contract that handles the logic for exchanging assets for a given base token. KittyswapsFactory.sol: The exchange factory that allows the creation of nifyswap exchanges for the tokens of a given ERC-1155 token conract and an ERC-1155 base currency.

Dev / running the tests

  1. git clone https://github.com/kittyswaps/kittyswaps
  2. yarn build
  3. yarn ganache
  4. in another terminal run, yarn test - executes test suite
  5. yarn install