sablier-labs / v1-protocol

Core smart contracts of the Sablier V1 protocol
https://sablier.finance
GNU General Public License v3.0
263 stars 78 forks source link

Streamed atomic swaps #29

Closed vs77bb closed 1 year ago

vs77bb commented 4 years ago

What?

Proposal to create a bounty for this tweet. A part of the Take Back The Web with a $1K reward, in DAI. Potential for future collaborations for those interested.

Description

Sablier currently works like this:

  1. Alice locks up some amount of tokens
  2. After a pre-defined start time, the smart contract starts "streaming" money to Bob
  3. Bob is allocated a lil' bit of money every second - he has the right to withdraw, that is
  4. Alice can cancel the stream at any time

What if there was an additional action that streamed (or printed) ERC-20 tokens to the creator of the stream, once every second? Doing this would turn the financial contract into an investment vehicle; an interesting continuation to Vitalik's DAICO idea.

The bounty consists of writing a proxy smart contract (or a modified version of Sablier.sol) that adds this additional ERC-20 dynamic.

Useful Links

Requirements

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1000.0 DAI (1000.0 USD @ $1.0/DAI) attached to it.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 week, 2 days ago. Please review their action plans below:

1) igetgames has been approved to start work.

I would like to work on this project, very interesting! I will study the Sablier protocol and the inner working of the smart contracts and I will try to implement the minting mechanism. 3) masaun has been approved to start work.

I will build a dApp which is integrated printed token into streaming money by using Sablier Protocol. 4) waynenilsen has been approved to start work.

I am going to take a look at this in two steps.

My understanding of the scenario will be fleshed out via chat discussions over the implementation period. 5) waynenilsen has been approved to start work.

I am going to take a look at this in two steps.

My understanding of the scenario will be fleshed out via chat discussions over the implementation period. 6) yashnaman has been approved to start work.

1) understand sablier protocol 2) create proxy smart contract 7) tgrecojs has been approved to start work.

hey,

I will clone the repository and made modifications to the smart contract so that it allows streaming the payments as the stream continues, rather than providing payment all at once at the end. 8) mul1sh has been approved to start work.

Will create a contract that does the expected functionality

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1000.0 DAI (1000.0 USD @ $1.0/DAI) has been submitted by:

  1. @masaun

@vs77bb please take a look at the submitted work:


PaulRBerg commented 4 years ago

Hey @masaun thanks for your submission! I cloned your repository, added my own mnemonic and ran it like this:

npm install
npm run migrate:ropsten

But got this error:

Error: ProviderSubprovider - no provider specified
    at new o (/Users/paulrberg/Pad/streamed-atomic-swaps/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/Users/gnidan/src/work/truffle/node_modules/web3-provider-engine/subproviders/provider.js:11:1)
    at new b (/Users/paulrberg/Pad/streamed-atomic-swaps/node_modules/truffle-hdwallet-provider/dist/webpack:/truffle-hdwallet-provider/src/index.js:157:1)
    at Object.provider (/Users/paulrberg/Pad/streamed-atomic-swaps/truffle-config.js:36:16)
    at Object.getProvider (/Users/paulrberg/.nvm/versions/node/v10.17.0/lib/node_modules/truffle/build/webpack:/packages/provider/index.js:20:1)
    at Object.create (/Users/paulrberg/.nvm/versions/node/v10.17.0/lib/node_modules/truffle/build/webpack:/packages/provider/index.js:13:1)
    at TruffleConfig.get [as provider] (/Users/paulrberg/.nvm/versions/node/v10.17.0/lib/node_modules/truffle/build/webpack:/packages/config/dist/configDefaults.js:189:1)
    at Object.detect (/Users/paulrberg/.nvm/versions/node/v10.17.0/lib/node_modules/truffle/build/webpack:/packages/environment/environment.js:19:1)
    at Contracts.compile.then (/Users/paulrberg/.nvm/versions/node/v10.17.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:193:1)
Truffle v5.1.5 (core: 5.1.5)
Node v10.17.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zepkit@1.0.0 migrate:ropsten: `truffle migrate --reset --network ropsten`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zepkit@1.0.0 migrate:ropsten script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/paulrberg/.npm/_logs/2020-01-25T15_54_33_917Z-debug.log
PaulRBerg commented 4 years ago

I tried to run the client dapp, but I got two errors:

  1. There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.
  2. Error: Cannot find module 'acorn'

I fixed 1 by removing eslint from package.json, but installing acorn did not fix the 2nd issue.

Then, I one question. Why did you import everything from the Sablier repository when you only needed the ERC-1620 interface? Even if there is a reason I'm not aware of for importing all contract code, the payroll contracts should not be needed for this bounty.

If it makes communication easier, please feel free to email me or join our community Discord server.

gitcoinbot commented 4 years ago

⚡️ A tip worth 100.00000 DAI (100.0 USD @ $1.0/DAI) has been granted to @masaun for this issue from @vs77bb. ⚡️

Nice work @masaun! Your tip has automatically been deposited in the ETH address we have on file.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This Bounty has been completed.

Additional Tips for this Bounty:


PaulRBerg commented 1 year ago

Closing due to inactivity.