This bounty is no longer available
Web3 DAO | lnp2pbot Logo

RSK + API3 bounty: Enable p2p transfers on RSK network + use API3 price feeds

Organization

lnp2pbot

Deadline

almost 2 years ago

Status

ENDED

4043.58 USD

INSTRUCTIONS

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
  • API3 price feed for RBTC and RIF are not available on RSK Mainnet for the purposes of this bounty.
  • To access prices feeds:

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