Coder Social home page Coder Social logo

amirgamil / accountable Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 415 KB

Stay accountable for your tasks/goals by putting your money on the line. Literally.

Home Page: https://keepmeaccountable.xyz

License: MIT License

Solidity 33.56% TypeScript 64.01% JavaScript 0.37% CSS 1.69% Makefile 0.28% Nix 0.09%

accountable's Introduction

Accountable

Description

This is a tool that keeps you accountable by putting your money on the line. Literally.

You pick an accountability partner, someone who you trust and deposit some money into the contract (or "stake it"). This locks your money in the contract.

If you successfully complete the agreed upon task (by agreed on date), your accountability partner marks the task as successful and you get your money back.

If you fail, they mark it as failed and your money gets donated directly to Khan Academy. In other words, the tool is a forcing function to get something done and keep you accountable by actually putting money on the line.

How do I use it?

If you want to create a stake to stay accountable:

  1. navigate to home page
  2. enter your accountability buddy address (who you trust), a name, and the amount to stake

1

  1. click "stake"

  2. wait for the stake to be processed and the stake id to be generated

2

  1. navigate to keepmeaccountable.xyz/stake?id=[stake id] where [stake id] is your id. If you entered the wrong buddy address, you can recover your deposited funds by aborting the stake. Otherwise, have your accountability budy confirm to lock your money in the contract. You the stakee will not be able to recover the funds now without the buddy.

3

  1. upon completion or failure, the accountability buddy will mark the task as successful (โœ“) or failed (โœ—) to return your money or donate the money respectively.

4

So in the example where the stakee accomplished the task, this is what it would look like

5

And this is what a failed stake will look like.

fail

Note

Note the address listed in the contract for Khan Academy was taken straight from their donate page.

Screen Shot 2022-04-29 at 11 37 28 PM

Stack

Smart contracts are written in Solidity, with foundry for testing, and Hardhat for deployments. Run forge test to run the test suite. Note however that foundry does not play nice with call which limited the number of tests that could be covered, so I did more complete testing via a local Hardhat node.

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been formally audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information. I am not liable for any of the foregoing. Users should proceed with caution and use at their own risk.

Attribution

Thanks to Walden for taking a glance at the contract and Aadil and Morgan for the idea.

accountable's People

Contributors

amirgamil avatar

Stargazers

Roman avatar bageltoes avatar jaclyn avatar  avatar

Watchers

 avatar  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.