Inspiration

Decentralized finance (DeFi) is a system that uses blockchain and cryptocurrency to manage financial transactions without the involvement of intermediaries like banks. DeFi aims to democratize finance by replacing centralized institutions with peer-to-peer relationships

What it does

  • Create a developer account with Hedera Portal
    • Create a Hedera account on Testnet.
  • Create a developer account with Twitter Portal
    • Create a new Project. Enable OAuth1.0, OAuth2.0, Automated App or Bot, and Direct Message.
  • Insert the callback url: http://localhost:3000/api/auth/callback/twitter. Update the localhost accordingly on prod or ngrok.
  • Create an account with MongoDB.
    • Create a new database and collection.

How we built it

  • install Hashpack browser extension
  • install Ngrok
  • cd contract & yarn install
  • rename .env.sample to .env and fill in the variable from the pre-requisite.
  • yarn build
    • to build (rollup) the stratojs and .sol into a dist/*.js library for web-browser usage
  • copy dist/hedera-strato.hashpack.js to nextapp/public/hedera-strato.hashpack-esm.js.
  • cd nextapp & yarn install
  • rename .env.local.sample to .env.local and fill in the variable
    • not that twitter DM has limited quota per day. DISABLE_DM if not necessary for development.
  • yarn dev
  • start ngrok http 3000
    • This is needed due to "HashPack" only validate from https://.

Challenges we ran into

We use Hedera smart contract. More specifically, we use the Strato library to communicate with the smart contract. We use Twitter API which to validate the user and send a notification to them when there is a fund transferred to their name.

Accomplishments that we're proud of

  • This maybe costly (gas fee) if not optimize to query from MongoDB.
    • Certain API depends on reading the value from Smart Contract.
    • Can consider check for changes before update smart contract to reduce cost.
  • Additional work flow for user to directly update Hedera Account within the DM.
  • Expanding similar use case to other social media platform.

What we learned

What's next for Money-3.0-TwittBar

The thought of using a smart contract and linking the Twitter handle(username) to a wallet address helps to make the transfer easy. At the same time, we also get the benefit of transferring funds using a recognizable name.

Built With

Share this project:

Updates