Discord Escrow Bot Powered by STEEM Blockchain

in #utopian-io6 years ago (edited)

cover.png

Repository

https://github.com/CodeBull/EscrowBot

EscrowBot can be used to facilitate safe exchange of asset(s) between two members (both steem user) from Discord server using Steem Blockchain's escrow functionalities. This bot was inspired by my other project BDCommunityDiscordBot and currently is in use on STEEM.com.bd and Steemit Bangladesh Discord server.

How it works?

A registered user can initiate any amount of STEEM or SBD escrow transfer to another registered user. Both will get a DM with escrow transaction preview and a SteemConnect link to initiate or approval. After that, the beneficiary can do the agreed task(s) (eg. transfer of fiat to the initiator) and notify the initiator. Initiator if satisfied can release the escrowed fund to the beneficiary or can dispute the transfer. If the initiator doesn't release after the job was done, the beneficiary can also dispute too. If disputed by any party, a Dispute Handler of that server will try to solve the issue(s) and decide who should get the escrowed fund.

This bot can be added on multiple servers, users need to register only once. When the bot is added to a new server, it will try to create User and Dispute Handler roles and automatically assign server owner as Dispute Handler. Each server can have different dispute handlers, they can only release escrows created from their respective servers.

Commands

This bot has 3 levels of users. General User, Dispute Handlers, and Owner(s). Every registered user is General user and gets a predefined role. Server owner gets Dispute Handler role automatically.

General User

register [STEEM USERNAME]

Links Discord account with Steem account.

verify [STEEM USERNAME]

Verifies if a Discord member owns the Steem account.

balance [STEEM USERNAME]

Shows STEEM and SBD the account holds.

exchange [AMOUNT] [CURRENCY] [DISCORD MEMBER]

Initiates an escrow transfer. Both parties will get a DM from the Bot with the respective link to initiate or approve.

release [ESCROW ID]

Generates a hot sign link to release the escrowed fund.

dispute [ESCROW ID]

Generates a hot sign link to dispute the transaction.

status [ESCROW ID]

Shows current status of the escrow from blockchain.

price [AMOUNT] [CURRENCY]

Shows the current price of X amount of Y currency in USD and BDT (can be changed).

Dispute Handler

agent-release [ESCROW ID] [DISCORD MEMBER]

Release the escrowed fund to the Discord member (his/her steem username) after dispute resolution.

Owner

set [KEY] [VALUE]

Saves or changes setting key and value in the database.

invite

Generate invite link to add the Bot on other servers.

servers

Generate a table with servers and their owners who are currently using the bot.

Usage Examples

  • Peer to Peer STEEM/SBD to Fiat exchange
  • Exchange of service for STEEM/SBD
  • Valuables exchange between two peers
  • Safe domain transfer

and many more...

Technologies

  • Node JS
  • Discord.js
  • Discord.js Commando
  • MongoDB
  • Mongoose
  • SteemConnect SDK
  • Steem JS

Installation

  • Create a Discord bot and grab its token.
  • Get your Bitly API token. Bitly is used to shorten long SteemConnect links as those look ugly in Discord DMs.
  • Rename env.example to .env and add you Bot token there
  • Make required changes to .env file
  • Change OWNER_ID in src/config.js to your Discord user ID.
  • Make other changed in src/config.js if needed.
  • Open terminal and type npm install to install all the dependencies.
  • Run npm start to start the bot in production mode or npm run dev to start in development mode.

You can run this bot on Heroku. I included Heorku Procfile too.

Roadmap

  • Add more administration commands
  • Add statistics commands

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue or any other method with the (owner) of this repository. But you are free to make your own copy and use it.

GitHub Account

https://github.com/CodeBull

Icon made by Smashicons from flaticon.com is licensed by CC 3.0 BY

Sort:  

Thank you for your contribution. A great Bot for the BD Community. Though how you are doing a dispute fix, someone might have said they have transferred the amount whereas the other party might have said that they have not received the money.

Why are you using BITLY?, you should also explain that in your post.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Yes, I should have talked about it. SteemConnect links are very long and scary for some users, also looks very bad in a Discord DM, That is the reason I am using Bitly.

In our servers we are asking for payment proofs (for fiat currency), some digital assets can be verified through blockchain e.g. SteemMonstesr cards.

Thank you for looking into it and for your valuable feedback. :)

Hey @reazuliqbal
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

que buena informacion de mucho interés y ayuda

YOU JUST GOT UPVOTED

Congratulations,
you just received a 22.50% upvote from @steemhq - Community Bot!

Wanna join and receive free upvotes yourself?
Vote for steemhq.witness on Steemit or directly on SteemConnect and join the Community Witness.

This service was brought to you by SteemHQ.com

sneaky-ninja-sword-xs.jpg
Sneaky Ninja Attack! You have just been defended with a 6.06% upvote!
I was summoned by @newbiegames. I have done their bidding and now I will vanish...

woosh
A portion of the proceeds from your bid was used in support of youarehope and tarc.

Abuse Policy
Rules
How to use Sneaky Ninja
How it works
Victim of grumpycat?

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by reazuliqbal from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

This is awesome! You are definitely thinking about the future with this type of creation. Are there any competitors for this type of escrow service or is this the first of its kind? I remember Ross #Ulbricht had something like this in place for Silk Road which was constantly dealing with shipping confirmations of tangible goods. Doe this just handle digital assets or can this escrow service be applied to the handling/transferring of physical goods purchased through #Steem ?

It could be the first if you are thinking about Steem blockchain and Discord. Its main purpose is to protect exchange of digital assets like STEEM/SBD, but I think you can extend it to support physical goods too.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63743.08
ETH 2657.15
USDT 1.00
SBD 2.87