Giter VIP home page Giter VIP logo

kass's Introduction

🪗 Kass - Starknet NFT bridge

This repo contains the reference implementation of the Kass protocol.


Kass is a bridge between Ethereum and Starknet allowing the transfer of ERC721 and ERC1155 tokens. Kass is compatible with both L1 and L2 native tokens.

🎡 Architecure overview

Kass protocol is composed of 2 smart contracts on Ethereum and Starknet, offering approximately the same interface.

%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'mainBkg': '#0D1114',
      'primaryTextColor': '#f7f7f7',
      'primaryBorderColor': '#7C03AE',
      'secondaryColor': '#7C03AE',
      'tertiaryColor': '#fff',
      'noteTextColor': '#f7f7f7',
      'noteBkgColor': '#191B1D',
      'noteBorderColor': '#909193'
    }
  }
}%%
classDiagram
  class L1Kass["L1 Kass"] {
    createL1Wrapper()
    requestL2Wrapper()

    claimL1Ownership()
    requestL2Ownership()

    deposit()
    requestDepositCancel()
    cancelDeposit()

    withdraw()
  }

  class L2Kass["L2 Kass"] {
    createL2Wrapper()
    requestL1Wrapper()

    claimL2Ownership()
    requestL1Ownership()

    deposit()

    withdraw()
  }
Loading

Wrapper Creation

In order to successfuly bridge assets through chains, Kass needs to deploy an equivalent token contract (either ERC721 or ERC1155) on the target chain. This process is called the wrapper creation.

L2 Wrapper creation

%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'mainBkg': '#0D1114',
      'primaryTextColor': '#f7f7f7',
      'primaryBorderColor': '#7C03AE',
      'secondaryColor': '#7C03AE',
      'tertiaryColor': '#fff',
      'noteTextColor': '#f7f7f7',
      'noteBkgColor': '#191B1D',
      'noteBorderColor': '#909193',
      'sequenceNumberColor': '#0D1114'
    }
  }
}%%
sequenceDiagram
  box rgb(25, 27, 29) Ethereum / L1
    participant L1 User
    participant L1 Kass
    participant Starknet Core
  end

  box rgb(25, 27, 29) Starknet / L2
    participant L2 Kass
  end

  autonumber
  L1 User ->> L1 Kass: requestL2Wrapper()
  L1 Kass ->> Starknet Core: send message
  Starknet Core ->> L2 Kass: createL2Wrapper()
  Note over L2 Kass: Deploy wrapper
Loading

Creation of a wrapper on Starknet, in order to deposit L1 native tokens to Starknet.

L1 Wrapper creation

%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'mainBkg': '#0D1114',
      'primaryTextColor': '#f7f7f7',
      'primaryBorderColor': '#7C03AE',
      'secondaryColor': '#7C03AE',
      'tertiaryColor': '#fff',
      'noteTextColor': '#f7f7f7',
      'noteBkgColor': '#191B1D',
      'noteBorderColor': '#909193',
      'sequenceNumberColor': '#0D1114'
    }
  }
}%%
sequenceDiagram
  box rgb(25, 27, 29) Ethereum / L1
    participant L1 User
    participant L1 Kass
    participant Starknet Core
  end

  box rgb(25, 27, 29) Starknet / L2
    participant L2 Kass
    participant L2 User
  end

  autonumber
  L2 User ->> L2 Kass: requestL1Wrapper()
  L2 Kass ->> Starknet Core: send message
  L1 User ->> L1 Kass: createL1Wrapper()
  L1 Kass ->> Starknet Core: consume message
  Note over L1 Kass: Deploy wrapper
Loading

Creation of a wrapper on Ethereum, in order to deposit L2 native tokens to Starknet.

⚠️ Disclaimer

This repo contains highly experimental code. Use at your own risk.

kass's People

Contributors

0xchqrles avatar

Stargazers

pia avatar Brussho avatar  avatar Baakey avatar FoxT3c avatar MoZa avatar Gabin Marignier avatar  avatar 0xAurelou avatar NICOLAS Oscar avatar  avatar AHMED HASSAN avatar Edi Sinovcic avatar  avatar Peteris Erins avatar Roger Ballard avatar Rémi Roycourt avatar

Watchers

 avatar Mattis Babin avatar NICOLAS Oscar avatar

kass's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.