Giter VIP home page Giter VIP logo

governance's Introduction

CodeQL Discord Twitter Follow GitPOAP Badge

Kwenta

A dApp enabling derivatives trading โ€” powered by the Synthetix protocol.

The decentralized trading UI is available at kwenta.eth.limo.

ENS link: kwenta.eth.

The latest IPFS hash can be found under releases.

Contributing

Kwenta welcomes contributors. Regardless of the time you have available, everyone can provide meaningful contributions to the project by submitting bug reports, feature requests or even the smallest of fixes! To submit your contribution, please fork, fix, commit and create a pull-request describing your work in detail. For more details, please have a look at the Contribution guidelines.

Tech stack

  • Next.js
  • React
  • Redux
  • Kwenta SDK
  • Styled-Components

Ethereum stack

Development

Install dependencies

pnpm install

Set up environment variables

Copy the .env.local.example file in the packages/app directory to .env.local (which will be ignored by Git):

cd packages/app
cp .env.local.example .env.local

Then, open .env.local and add the missing environment variables:

Required:

  • NEXT_PUBLIC_PROVIDER_ID - Specifies the default provider, options are INFURA or BLAST_API
  • NEXT_PUBLIC_INFURA_PROJECT_ID - Infura project id (get it from infura.io) or
  • NEXT_PUBLIC_BLASTAPI_PROJECT_ID - Blast API project id (get it from blastapi.io)
  • NEXT_PUBLIC_SOCKET_API_KEY - Socket API key (get it from socket.tech
  • NEXT_PUBLIC_SATSUMA_API_KEY - API key for Satsuma subgraph queries
  • NEXT_PUBLIC_THEGRAPH_API_KEY - API key for The Graph's decentralized service
  • NEXT_PUBLIC_DEFAULT_PRICE_SERVICE - Specifies the default price server, options are KWENTA or PYTH
  • NEXT_PUBLIC_SERVICES_PROXY - Specify Kwenta proxy server

Run

cd packages/app
pnpm dev

Open http://localhost:3000 to view it in the browser.

Build

cd packages/app
pnpm build
pnpm start

Unit Testing

cd packages/app
pnpm test:jest

For unit tests we use a combination of Jest and React Testing Library

Page tests should be added to the testing folder at the root as it is not possible to co-locate tests and pages in nextjs. Other tests should be co-located in a __tests__ folder next to their related file.

Contact

Join the community on the Kwenta Discord server!

governance's People

Contributors

cmontecoding avatar jcmonte avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

0xclem

governance's Issues

AutomatedVoting.sol

AutomatedVoting.sol

Current Flows

Scheduled Elections - A vote would automatically be triggered at the end of an epoch.

An Elite Council member steps down - Elite Council members will gain access to a UI within Kwenta via their council address, where they can step down, burning their right to vote and triggering an election for a community member to replace them.

An Elite Council member is removed via the Elite Council - Elite Council members will gain access to a UI via their council address within Kwenta, enabling them to vote to remove an Elite Council member. If a majority ruling is reached amongst Elite Council members, the impacted Elite Council member will have their voting rights burned, triggering an election for a community member to replace them.

An Elite Council member is removed via a CKIP - Stakers will gain access to a UI within Kwenta where an election can be triggered at any time. If quorum amongst stakers is reached, all Elite Council members will have their ability to vote burnt, and a new election will be triggered for stakers to vote in a new council.

During a scheduled election, Elite Council members will continue to have the right to vote while the election takes place. In the event of an unscheduled election, the impacted Elite Council member will lose their ability to vote on DAO proceedings immediately, and they will not be able to vote during an election.

Elections will be surfaced inside the Kwenta UI, where anyone can submit an Ethereum address for nomination. Stakers will use their staked Kwenta to submit votes. The Ethereum addresses that receive the most support for the positions available (5 for a scheduled election, 1 for an unscheduled election, 5 for an unscheduled CKIP election) will be added to the Elite Council multi-sig, enabling them to vote on DAO proceedings.

If there are multiple overlapping elections, the UI will display individual unscheduled elections separately, while all ongoing elections will be wiped out and replaced in the event a scheduled election goes into effect.

Technical Requirements

  • Election state lasts for two weeks
  • Scheduled election every 6 months (26 weeks)
    • Regardless of current epoch situation
  • Ability to remove council member which triggers subsequent election
  • Issue each council member an SBT NFT
    • Burn this when council member is removed
  • Two types of elections (scheduled and unscheduled)
    • Unscheduled elections immediately remove council member
    • Scheduled elections no actions until election is complete
    • Scheduled election overwrites active election
  • Upgradeable

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.