Giter Site home page Giter Site logo

1inch's Introduction

1inch Limit Order Protocol + NFT Tickets Smart Contract with dynamic pricing and discounts

Definition Hackathon, MLSWAT team

CI

NFTicket

NFTicket Diagrams:

NFT Sell

Sale expiration ( Predicate )

Variable price depending on the market conditions (getTakerAmount)

VIP Ticket

Whitelist

Presentation

Due to time constraints we cloned https://github.com/1inch/limit-order-protocol and added our contract and tests. You can find the original README below.


1inch network

1inch Limit Order Protocol Smart Contract

Build Status Coverage Status

About

You can find general overview and docs on 1inch limit orders protocol here.

This repository contains a smart contract for EVM based blockchains (Ethereum, Binance Smart Chain, etc.), this contract is core part of 1inch limit order protocol.

Contract allows users to place limit orders, that later could be filled on-chain. Limit order itself is a data structure created off-chain and signed according to EIP-712.

Key features of the protocol is extreme flexibility and high gas efficiency that achieved by using following order types.

Limit Order

Extremely flexible limit order, can be configured with:

  1. Order execution predicate.
    • Typical usage is checking that certain time stamp or block number. With this you can set certain expiration time.
    • You can specify construct any predicate that you want, for example check that certain price is higher than oracle price, to implement stop loss or take profit strategies
  2. Helper function for asset price evaluation.
    • Function that will allow to extract assets price from arbitrary on-chain source
  3. Callback, for to notify maker on order execution.

RFQ order

Gas optimized order with restricted capabilities suitable for market makers

  • Support expiration time
  • Support cancellation by order id
  • RFQ Order could be filled only once
  • Partial Fill is possible (once)

Supported tokens

  • ERC 20
  • ERC 721
  • ERC 1155
  • Other token standards could be supported via external extension

Deployments & audits:

You can find 1inch limit order protocol deployments here:

You can find audit reports on etherscan and in the separate audit repository.

Utils library

Plenty of utils that helps create & sign orders are available in our typescript utils library:

1inch's People

Contributors

dkozlov avatar ivanpsurtcev avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

all-and-proust

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.