bot
bot copied to clipboard
RSK + API3 bounty: Enable p2p transfers on RSK network + use API3 price feeds
Prize Bounty
$0.1627 RBTC (equivalent to 4000USD)
Assigned reviewers: @Ashar2shahid, @camronh, @jgcogsystematictrading, @shenshin, and @bguiz
Challenge Description
p2plnbot is a Telegram bot which allows people to trade with other people using telegram over the lightning network - github.com/grunch/p2plnbot.
The base task:
Fork the p2plnbot such that it works on RSK. This bot must be able to:
- Enable peer-to-peer transfers between RSK network accounts of RBTC.
- Enable peer-to-peer transfers between RSK network accounts of whitelisted ERC20 tokens. This whitelist must include RBTC and RIF.
- (Optional) Enable transfers between RSK network accounts using RNS addresses (e.g.
*.rsk
), in addition to standard addresses (0x…
)
The fair market price task:
- The bot currently requires the seller to manually input the price in a p2p trade
- Instead of this, use price feeds from API3 to query the current price for the trade
- Display this as “fair market price” within the bot, however the seller may still override it
- The buyer should be able to see both the seller’s price and the fair market price
Submission Requirements
The base task:
- The code must be publicly visible in a repo on github.com
- The repo must be licenced with one of the following open source licences: GPL-3.0, or MIT
- The submission must maintain the baseline functionality of, and support features of, the p2plnbot
- apart from switching from LN to RSK, if any features need to be removed, please clarify with the reviewers first.
- The bot must have a live deployment, and the
@
-name of the bot must be included in the README within the repo - Record a video (screen capture) demonstrating the use of the Telegram bot
- Any smart contracts used must be live on an RSK public network, either RSK Testnet or RSK Mainnet; localhost and/or RSK Regtest is insufficient
The fair market price task:
- The fair market price feature must make use of the price feeds from API3
- Trades occurring on this bot should use RSK Testnet or RSK Mainnet (your choice)
- Prices displayed in this feature of the bot should access the RBTC and RIF API3 price feeds available on RSK Mainnet only
- API3 price feeds for RBTC and RIF on RSK Testnet are available using the following Beacon IDs:
-
RBTC/BTC:
0x4aaf6e2ef7fc8280aa99d321e53ef2e4f111b7805677a262eb5882b1a27b5108
-
RBTC/USD:
0x5295f30436b2077a67c02001f62e8aabcc6688d87a8ce8db6f2b7a7cad4f0b01
-
RIF/USD:
0x3c7ba811cb33ad3784389a580af1a657ce0ebd701b1eb415eafabe5a4885e92f
-
RBTC/BTC:
- Other relevant smart contract addresses for API3 on RSK Testnet are:
-
DapiServer:
0x3A09C138609F4b944EB7B8F0730e1972C243B33a
-
selfServeDapiServerWhitelister:
0x928922A4e2D3f96Ce72002A5EA7481BEF4F12fD6
-
DapiServer:
- API3 price feed for RBTC and RIF are not available on RSK Mainnet for the purposes of this bounty.
- To access prices feeds:
- Use the API3
readDataFeedWithId()
method. - Use the API3
readDataFeedValueWithId()
method. - For your convenience, a demo repo is available, which demonstrates how to do this.
- Use the API3
Do you have questions, comments, or clarifications?
Reach out to the reviewers on the RSK community slack: developers.rsk.co/slack in the #bounties
channel;
and on the API3 discord: discord.com/invite/qnRrcfnm5W in the #dev-support
channel.
Timeline
- This bounty starts on 15/08/2022
- This bounty accepts submissions until 15/09/2022
:wave: @grunch hey, hope you don't mind me posting this bounty directly on your repo. I've checked against the contributing guidelines for this repo, and it sounds like this is cool. I'll be posting this bounty on gitcoin shortly.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Workers have applied to start work.
These users each claimed they can complete the work by 1 week, 5 days ago. Please review their action plans below:
1) wallace-df has applied to start work (Funders only: approve worker | reject worker).
I will:
- Study and analysis the existing Telegram bot's documentation and source code to have a deep understanding of it.
- Propose the design and architectural changes needed to make it work on the RSK ecosystem, while keeping most of the existing use cases working as expected.
- Implement and test the functionalities accordingly. 2) voanhcung has applied to start work (Funders only: approve worker | reject worker).
0xf9C001323f9bF58eaf90B23AF831A626d9e8d435 3) hhio618 has applied to start work (Funders only: approve worker | reject worker).
I'm an experienced solidity developer interested in doing these tasks. 4) tdhp has applied to start work (Funders only: approve worker | reject worker).
I will:
First version: In this first version, the bot will have a static conversion rate of the RBTC (No usage of API3) 1 Install lnp2bot and run on Test Net 2 Test it out on the MainNet at my expenses 3 Derive a test plan from the execution of all the use cases of lnp2pbot running on LND 4 Create Acceptance Criterias for the new implementation based on the results 5 Document the interactions between lnp2pbot and LND and identify the API calls used by the bot 6 Identify the equivalent API calls offered by the RSK 7 Implement a test dApp on RSK using the same API calls 8 Accurately use all those APIs calls or reiterate back to step 5 9 Extract a library from the test dApp which contains all the API calls to RSK 10 Connect the forked bot to that library 9 Run the test plan on the new implementation of the bot running on RSK
Second Version: In this version, the bot will use API3 in order to obtain the market value of RBTC in real time.
- Integrate the API3
- Define the acceptance criterias based on the description of this task
- Define the acceptance criterias for handling the errors of the API
- Review of the acceptance criterias with the reviewers
- Implementation
- Execution of the test plan and comparison of the results with Previous version
- Changes to the test plan and validation 5) ahmad646-ux has applied to start work (Funders only: approve worker | reject worker).
yes i am redi to express internet 6) grek1313 has applied to start work (Funders only: approve worker | reject worker).
0xadafb2765fCd50426fC4aF5fF3FbdF688Ae8e537
Learn more on the Gitcoin Issue Details page.
Updated bounty description to add helpful info about API3:
- Other relevant smart contract addresses for API3 on RSK Testnet are:
- **DapiServer**: `0x3A09C138609F4b944EB7B8F0730e1972C243B33a`
- **selfServeDapiServerWhitelister**: `0x928922A4e2D3f96Ce72002A5EA7481BEF4F12fD6`
:wave: @leetdev @wallace-df @hhio618 @littlezigy @tdhp - thank you for applying to this bounty, and thanks for the detailed descriptions of your work plan. We're treating this bounty as an open bounty, so please start! The best submission will win the bounty. When you're ready to submit your repo, or request a review, add a comment right here in this github issue!
You may also choose to reach me RSK community slack: developers.rsk.co/slack in the #bounties
channel, or DM me there (same username on slack and github).
@voanhcung @ahmad646-ux @grek1313 @elementalbrian - thank you for applying to this bounty, and thanks for the detailed descriptions of your work plan. We're treating this bounty as an open bounty, so please start! The best submission will win the bounty. When you're ready to submit your repo, or request a review, add a comment right here in this github issue!
You may also choose to reach me RSK community slack: developers.rsk.co/slack in the #bounties
channel, or DM me there (same username on slack and github).
Hi. I'd like to confirm the submission of my work here: https://github.com/wallace-df/rskp2pbot
Hi. I'd like to confirm the submission of my work here: https://github.com/wallace-df/rskp2pbot
Congratulations wallace for the work, I think we can move this and new conversations on this new repository.
Also I think we should have a new logo for the rsk bot to avoid confusions to the users.
Como me sumo??
Here is my implementation: https://github.com/tdhp/rskp2pbot
Congratulations wallace for the work, I think we can move this and new conversations on this new repository.
@grunch There might still be a few more submissions who'll reply in this ticket, hope you do not mind! We'll take any further discussion on those directly on those repos instead.
Also I think we should have a new logo for the rsk bot to avoid confusions to the users.
Yeah good idea!
I think we can close this issue
@grunch I'm trying to pay out the bounty now, but the "submit work" button is disabled for @wallace-df - and it might be because this issue is closed. Could you re-open it temporarily, please?
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 0.1627 RBTC (3211.84 USD @ $20074.0/RBTC) has been submitted by:
@bguiz please take a look at the submitted work:
- PR by @wallace-df
- Learn more on the Gitcoin Issue Details page
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin's Discord
- $1,003,907,345.07 more funded OSS Work available on the Gitcoin Issue Explorer