Git Product home page Git Product logo

tokility's People

Contributors

vilijan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

bmscis

tokility's Issues

Initial tokility proof of concept application.

Use case:

  • User X issues an ASA with a fixed number of supply N. This means that X is the initial owner of the ASA.
  • X can sell the ASA to other users U1, U2, ... for some fixed price P of ALGOs.
  • Some arbitrary user U1 can sell the ASA to another arbitary user U2 for some price P. However the initial user X can setup some rules on this transaction, such as some amount P1 of the price of the transaction goes to X while the remaining amount P2 goes to the seller, in this case U1.

Advanced use cases:

  • The ASA should have an expiere date i.e end date to when they are not aplicable any more.
  • If some user wants to use the ASA in the physical/digital world it should transfer it to X without any fees.

Requirements:

  • 1. Define a service that creates the ASA.
  • 2. Define configuration for selling the ASA (this is creator to end user).
  • 3. Define configuration for selling the ASA between 3rd parties (this is between two users).
  • #3
  • 5. Define a services that provide reselling of the ASA given the configuration created in Step 3. If there is profit different owner fee is applied.

Advanced requirements:

  • 1. On end date return all of the ASAs to the user X and destroy them.
  • 2. Use an ASA in the physical/digital world meaning that this ASA should not be used anymore thus needs to be burned.

4. Define a services that does the initial selling of the ASA given the configuration created in Step 2.

ASAInitialOfferingConfiguration has the following properties:

  • asa_price - defines the selling price of the asa on a initial offering.
  • max_asa_per_user - defines how many ASAs can a single address hold.

Based on this configuration, we should build a service that provides the initial offering for the ASA.

Use cases:

  1. We have one account i.e address which represents the seller of the ASA. The seller of the ASA can sell the ASA only if the selling transaction meets the criteria defined in the ASAInitialOfferingConfiguration for that particular ASA.
  2. We have one address that receives the money from the sold ASA.
  3. At this point, the buyers who have bought the ASA should not be able to transfer it to another account.

Usage

Atomic transfer with 2 transactions:

  1. The buyer submits a payment transaction to the address that is responsible for receiving the funds.
  2. A stateless smart contract signs an asset transfer transaction with it is logic. The logic checks whether the buyer's payment meets the criteria defined in the configuration. If that is the case the smart contract transfers the ASA to the buyer.

Implementation

  1. Create the ASA of intereset with its corresponding ASAInitialOfferingConfiguration.
  2. Create a stateless smart contract that validates the logic defined in the ASAInitialOfferingConfiguration.
  3. Update the management properties of the ASA. We want the transfer of this ASA to happen only throgh the clawback address which will be the contract defined in step 2. Additionally, this means that the ASA should be frozen.
  4. Implement a service that executes the Atomic transfer defined previously.

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.