Code Monkey home page Code Monkey logo

ton-delegation-pool's Introduction

TON Delegation Pool Platform

Try here Image of Pool

Answers on Telegram Contest Key points

Describes your project and how users will interact with it

This project allows anyone to create delegation pool and become validator. Also it allows anyone to earn interest by delegating Grams to potential Validators. (Risks will be handled by reputation system and security deposits). It is non-custodial solution, it is web based solution (all private keys and operations with it are on client side). It is WEB platform features like:

  1. Cross-platform client side wallet
  2. Integrated Dapp that allows to delegate and withdraw funds without CLI

Users will interact with it in two ways. Delegators will just use web based platform or any compatible wallet. They just need to find a delegation pool and send funds to it. They can track statuses of pool via Web platform or can subscribe to the bot notification. Validators can deploy delegation pool via WEB platform. However, to ensure that everything is ok, they will need to use terminal to sign all neccesary data to stake funds from delegation pool to elector pool.

Explains how your code should be used to deploy and use your smart contract.

THE BEST WAY to run everything locally is use docker compose

docker-compose up

We assume that anyone who is going to run this project from scratch is familiar with: C++, Python, Angular, JS, Fift, Func, Go Bash and Zsh as well as MongDB. To run from scracth you will need light client, that will be used by contracts and by api folder. Also you need to have npm installed to build frontend.

To deploy smart contract go to: https://github.com/button-tech/ton-delegation-pool/contracts

To run backend go to: https://github.com/button-tech/ton-delegation-pool/api

To run frontend go to: https://github.com/button-tech/ton-delegation-pool/front

It is possible to deploy smart contract via WEB frontend only. We use our own backend wrappers over light client to send Boc and run some methods.

Video

Interaction with production elector smart contract (from web)

Deposits and stake to elect

Alt text

Recover stake and withdrawals

Alt text

Interaction with production elector smart contract (from terminal)

Alt text

Interaction with elector smart contract (mocked for fast tests)

Alt text

Presentation

Availible here

Telegram: https://t.me/ton2Contest/2

Local: GitHub

Demo

Try it here

  1. Create account, use short address and send funds on it
  2. Go to Defi => Delegation

If you have Validator Node - you can create Delegation Pool

If you do not have it - you can delegate funds by going to Delegate

Each Delegation pool have multiple statuses for user:

โœณ๏ธ Raising - open to send funds on it. Later Validator will send funds to elector

๐Ÿ”ด Fail - If deadline will be exceeded or something went wrong. You can withdraw your funds

๐Ÿ•” Waiting - Wait for your funds to be unfrozen

๐Ÿ’ธ Withdraw - Get your funds back with rewards

We assume that the real commission fees will be significantly lower than right now

Run and Build

fast way (use our image for run api):

# docker-compose up

full build:

# docker-compose -f docker-compose-full-build.yml build
# docker-compose -f docker-compose-full-build.yml up

Open your browser at http://127.0.0.1 - front Open your browser at http://127.0.0.1:3000/docs - API(Swagger)

ToDo:

  • Validator fee commission
  • Security deposit
  • Sub delegation Charity pool and ICO pool

3rd party libs:

Thanks to https://github.com/EmelyanenkoK

With https://github.com/EmelyanenkoK/ValeriTon that was used as a base for web version.

We customized these library to deploy our contract and run functions on it

Authors

Nick Kozlov - CTO and Co-founder of BUTTON Wallet (@enormousrage, [email protected])

Kirill Kuznecov - Co-founder of BUTTON Wallet (@krboktv, [email protected])

Alexey Prazdnikov - Fullstack developer at BUTTON Wallet (@noprazd, [email protected])

ton-delegation-pool's People

Contributors

enorage avatar krboktv avatar prazd avatar

Watchers

 avatar

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.