 ## 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](https://github.com/CodeBull/BDCommunityDiscordBot) and currently is in use on [STEEM.com.bd](https://discord.gg/6zWpukW) and [Steemit Bangladesh](https://discord.gg/aTBDUPF) 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](https://discordapp.com/developers/applications/me) and grab its token. - Get your [Bitly API](https://dev.bitly.com/) 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 <sup>Icon made by [Smashicons](https://www.flaticon.com/authors/smashicons) from [flaticon.com](https://www.flaticon.com) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)</sup>
author | reazuliqbal |
---|---|
permlink | discord-escrow-bot-powered-by-steem-blockchain |
category | utopian-io |
json_metadata | {"community":"busy","app":"steemit/0.1","format":"markdown","tags":["utopian-io","development","steem","busy","bot"],"links":["https://github.com/CodeBull/EscrowBot","https://github.com/CodeBull/BDCommunityDiscordBot","https://discord.gg/6zWpukW","https://discord.gg/aTBDUPF","https://discordapp.com/developers/applications/me","https://dev.bitly.com/","https://github.com/CodeBull","https://www.flaticon.com/authors/smashicons","https://www.flaticon.com","http://creativecommons.org/licenses/by/3.0/"],"image":["https://ipfs.busy.org/ipfs/QmT4AJ39zk6Hgcu1fqqG59ixEL1ShGhQSEmHGcqnhqMX2L"]} |
created | 2018-07-11 08:14:36 |
last_update | 2018-07-12 10:06:09 |
depth | 0 |
children | 9 |
last_payout | 2018-07-18 08:14:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 84.059 HBD |
curator_payout_value | 26.390 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4,540 |
author_reputation | 61,984,354,446,410 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,258,070 |
net_rshares | 52,318,292,158,585 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
azizbd | 0 | 52,809,862,352 | 70% | ||
yuxi | 0 | 2,981,144,793 | 10% | ||
shadowmyst | 0 | 465,971,415 | 100% | ||
busy.org | 0 | 7,810,558,101 | 0.64% | ||
minnowsupport | 0 | 23,379,606,999 | 0.6% | ||
magicstone1412 | 0 | 855,748,876 | 100% | ||
rival | 0 | 8,094,830,498 | 5% | ||
doughtaker | 0 | 18,323,283,611 | 100% | ||
dreamarif | 0 | 93,181,884 | 9.9% | ||
steemitbd | 0 | 30,269,497,873 | 99% | ||
crokkon | 0 | 27,383,624,659 | 50% | ||
sneaky-ninja | 0 | 733,358,588,815 | 6.06% | ||
gregan | 0 | 7,759,451,373 | 100% | ||
loshcat | 0 | 2,981,869,139 | 100% | ||
sourovafrin | 0 | 1,192,286,289 | 3.7% | ||
utopian-io | 0 | 51,165,916,209,655 | 33.04% | ||
jaff8 | 0 | 64,511,780,291 | 100% | ||
steemtaker | 0 | 4,265,955,902 | 9.9% | ||
ayasha | 0 | 1,551,332,258 | 49.5% | ||
jahedkhan | 0 | 280,716,649 | 9.9% | ||
ajayyy | 0 | 0 | 100% | ||
greenorange | 0 | 609,471,115 | 100% | ||
steemitstats | 0 | 3,286,874,496 | 5% | ||
murtalaumar | 0 | 764,392,485 | 100% | ||
r351574nc3 | 0 | 1,126,651,466 | 3% | ||
kujou | 0 | 1,746,079,394 | 100% | ||
mamun123456 | 0 | 694,051,578 | 20% | ||
liberviarum | 0 | 7,950,830,035 | 50% | ||
reazuliqbal | 0 | 26,893,366,914 | 100% | ||
salty-mcgriddles | 0 | 1,470,304,989 | 3% | ||
sbi2 | 0 | 23,355,676,906 | 4% | ||
zcool | 0 | 235,633,269 | 10% | ||
duque | 0 | 73,105,957 | 100% | ||
statsexpert | 0 | 1,014,024,364 | 25% | ||
codebull | 0 | 521,109,846 | 100% | ||
mhossain | 0 | 587,440,231 | 100% | ||
dexterdoggy | 0 | 2,003,449,010 | 100% | ||
sherbanu | 0 | 3,776,391,863 | 100% | ||
sheikhsayem | 0 | 609,233,332 | 100% | ||
steemhq | 0 | 10,212,869,874 | 22.5% | ||
ifte | 0 | 601,031,459 | 100% | ||
jackmillerbot | 0 | 510,836,515 | 3% | ||
tanzil2020 | 0 | 217,178,907 | 70% | ||
electronicsworld | 0 | 6,355,330,082 | 100% | ||
abdurrahim2 | 0 | 602,389,775 | 100% | ||
steemcanvas | 0 | 397,016,877 | 100% | ||
sfturzo | 0 | 115,667,904 | 20% | ||
bdcommunity | 0 | 316,114,243 | 100% | ||
roc.green | 0 | 356,090,462 | 80% | ||
riverland | 0 | 601,503,623 | 100% | ||
alexran | 0 | 432,386,156 | 100% | ||
wrestleredoy | 0 | 241,033,669 | 50% | ||
noblebot | 0 | 440,620,668 | 100% | ||
steemitbdex | 0 | 576,432,226 | 29.7% | ||
zayedsakib | 0 | 590,901,230 | 100% | ||
developspanish | 0 | 596,567,380 | 100% | ||
avengersayem | 0 | 602,955,741 | 100% | ||
fuzzythumb | 0 | 449,706,309 | 100% | ||
boomtube | 0 | 588,389,934 | 100% | ||
particleman | 0 | 59,012,048,846 | 100% | ||
randomberserker | 0 | 600,539,991 | 100% | ||
cosmosteemer | 0 | -103,638,013 | -100% | ||
m-hammurabi | 0 | 634,963,649 | 100% | ||
m-ashurbanipal | 0 | 637,772,841 | 100% | ||
bdcommunity2 | 0 | 479,173,389 | 100% | ||
mhmuhib | 0 | 277,443,750 | 49.5% | ||
thanku | 0 | 284,458,278 | 1% | ||
smulu | 0 | 225,424,014 | 100% | ||
gamerbd | 0 | 493,184,407 | 100% | ||
bestwebmaster | 0 | -57,824,283 | -100% |
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](https://join.utopian.io/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](https://review.utopian.io/result/3/2222232). ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
author | codingdefined |
---|---|
permlink | re-reazuliqbal-discord-escrow-bot-powered-by-steem-blockchain-20180712t095259246z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2222232","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2018-07-12 09:53:00 |
last_update | 2018-07-12 09:53:00 |
depth | 1 |
children | 1 |
last_payout | 2018-07-19 09:53:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.043 HBD |
curator_payout_value | 0.001 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 804 |
author_reputation | 544,331,111,861,777 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,390,132 |
net_rshares | 21,193,754,640 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
espoem | 0 | 5,254,553,552 | 5% | ||
vishalsingh4997 | 0 | 2,346,368,229 | 100% | ||
reazuliqbal | 0 | 13,592,832,859 | 50% |
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. :)
author | reazuliqbal |
---|---|
permlink | re-codingdefined-re-reazuliqbal-discord-escrow-bot-powered-by-steem-blockchain-20180712t100004710z |
category | utopian-io |
json_metadata | {"community":"busy","app":"busy/2.5.2","format":"markdown","tags":["utopian-io"],"users":[],"links":[],"image":[]} |
created | 2018-07-12 10:00:06 |
last_update | 2018-07-12 10:00:06 |
depth | 2 |
children | 0 |
last_payout | 2018-07-19 10:00:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 387 |
author_reputation | 61,984,354,446,410 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,390,794 |
net_rshares | 0 |
que buena informacion de mucho interรฉs y ayuda
author | duque |
---|---|
permlink | re-reazuliqbal-discord-escrow-bot-powered-by-steem-blockchain-20180711t081507876z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-07-11 08:15:51 |
last_update | 2018-07-11 08:15:51 |
depth | 1 |
children | 0 |
last_payout | 2018-07-18 08:15:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 46 |
author_reputation | 787,503,542,576 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,258,173 |
net_rshares | 0 |
<p>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 <a href="https://discord.gg/HYj4yvw"> Peace, Abundance, and Liberty Network (PALnet) Discord Channel</a>. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.</p> <p>If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: <a href="https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=minnowsupport&vesting_shares=102530.639667%20VESTS">50SP</a>, <a href="https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=minnowsupport&vesting_shares=205303.639667%20VESTS">100SP</a>, <a href="https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=minnowsupport&vesting_shares=514303.639667%20VESTS">250SP</a>, <a href="https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=minnowsupport&vesting_shares=1025303.639667%20VESTS">500SP</a>, <a href="https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=minnowsupport&vesting_shares=2053030.639667%20VESTS">1000SP</a>, <a href="https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=minnowsupport&vesting_shares=10253030.639667%20VESTS">5000SP</a>. <br><strong>Be sure to leave at least 50SP undelegated on your account.</strong></p>
author | minnowsupport |
---|---|
permlink | re-discord-escrow-bot-powered-by-steem-blockchain-20180716t190809z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.48"}" |
created | 2018-07-16 19:08:09 |
last_update | 2018-07-16 19:08:09 |
depth | 1 |
children | 0 |
last_payout | 2018-07-23 19:08:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,707 |
author_reputation | 148,902,805,319,183 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,904,630 |
net_rshares | 0 |
 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]( https://steemit.com/steemit/@sneaky-ninja/new-sneaky-ninja-abuse-policy-must-read-for-all-users) [Rules]( https://steemit.com/steemit/@sneaky-ninja/sneaky-ninja-reminder-of-rules) [How to use Sneaky Ninja]( https://steemit.com/steemit/@sneaky-ninja/reminder-how-to-use-sneaky-ninja) [How it works]( https://steemit.com/steemit/@sneaky-ninja/sneaky-ninja-reminder-of-how-he-works-vote-worth-usd160-now) [Victim of grumpycat?](https://steemit.com/we-resist/@firedream/resistance-started)
author | sneaky-ninja |
---|---|
permlink | re-reazuliqbal-discord-escrow-bot-powered-by-steem-blockchain-20180715t065454811z |
category | utopian-io |
json_metadata | {"app":"postpromoter/2.0.0"} |
created | 2018-07-15 06:54:54 |
last_update | 2018-07-15 06:54:54 |
depth | 1 |
children | 0 |
last_payout | 2018-07-22 06:54:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 877 |
author_reputation | 6,929,108,306,933 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,728,097 |
net_rshares | 0 |
 **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](https://steemit.com/~witnesses) or directly on [SteemConnect](https://steemconnect.com/sign/account-witness-vote?witness=steemhq.witness&approve=1 "This link will take you away from steemit.com") and join the [Community Witness](https://www.steemhq.com/witness).  This service was brought to you by [SteemHQ.com](https://www.steemhq.com)
author | steemhq |
---|---|
permlink | re-reazuliqbal-discord-escrow-bot-powered-by-steem-blockchain-20180712t032227188z |
category | utopian-io |
json_metadata | {"app":"communitybot/1.1.0"} |
created | 2018-07-12 03:22:27 |
last_update | 2018-07-12 03:22:27 |
depth | 1 |
children | 0 |
last_payout | 2018-07-19 03:22:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 667 |
author_reputation | 4,219,992,220,673 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,359,141 |
net_rshares | 0 |
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 ?
author | trigabytesteemit |
---|---|
permlink | re-reazuliqbal-discord-escrow-bot-powered-by-steem-blockchain-20180808t132356855z |
category | utopian-io |
json_metadata | {"tags":["utopian-io","ulbricht","steem"],"app":"steemit/0.1"} |
created | 2018-08-08 13:23:57 |
last_update | 2018-08-08 13:23:57 |
depth | 1 |
children | 1 |
last_payout | 2018-08-15 13:23:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 478 |
author_reputation | 60,410,025,083 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 67,526,967 |
net_rshares | 0 |
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.
author | reazuliqbal |
---|---|
permlink | re-trigabytesteemit-re-reazuliqbal-discord-escrow-bot-powered-by-steem-blockchain-20180808t132911387z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-08-08 13:29:18 |
last_update | 2018-08-08 13:29:18 |
depth | 2 |
children | 0 |
last_payout | 2018-08-15 13:29:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 212 |
author_reputation | 61,984,354,446,410 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 67,527,451 |
net_rshares | 0 |
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.** <a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
author | utopian-io |
---|---|
permlink | re-discord-escrow-bot-powered-by-steem-blockchain-20180712t095508z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.42"}" |
created | 2018-07-12 09:55:09 |
last_update | 2018-07-12 09:55:09 |
depth | 1 |
children | 0 |
last_payout | 2018-07-19 09:55:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 303 |
author_reputation | 152,955,367,999,756 |
root_title | "Discord Escrow Bot Powered by STEEM Blockchain" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,390,339 |
net_rshares | 5,073,842,492 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
espoem | 0 | 5,073,842,492 | 5% |