Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(examples/ocean-dbtc-burning-bot): DFIP 2201-A, an automated wallet bot to burn dBTC #981

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

fuxingloh
Copy link
Contributor

@fuxingloh fuxingloh commented Jan 16, 2022

What this PR does / why we need it:

Ocean dBTC Burning Bot, part of DFIP 2201-A requirement; an automated wallet bot to burn dBTC.

DFIP 2201-A: Solving unbacked dBTC

This is a very simple dBTC burning bot that is deployed on df1qc8ptw6vc9588w6f53fvcjsjx0fntv3men407a9 address.

Implementation

BURN-DFI -> DFI Rewards -> BTC Swap -> BTC Burn

With a predefined main() as the entry function, this bot take all DFI accumulated from BURN-DFI pool rewards (3.5% from BTC-DFI). Swapping them from DFI to BTC and then finally sending it to the burn address 8defichainBurnAddressXXXXXXXdRQkSm.

Deployment

Deployed on AWS lambda, this bot is compiled with vercel/ncc via build.js which produce a single file that support TypeScript and binary addons (tiny-secp256k1).

npm i
npm run build

# Upload ./dist/main.zip into AWS Lambda

@defichain-bot defichain-bot added area/examples kind/docs Non feature documentation change labels Jan 16, 2022
@codeclimate
Copy link

codeclimate bot commented Jan 16, 2022

Code Climate has analyzed commit be0c402 and detected 0 issues on this pull request.

View more on Code Climate.

@netlify
Copy link

netlify bot commented Jan 16, 2022

✔️ Deploy Preview for jellyfish-defi ready!

🔨 Explore the source changes: 443430c

🔍 Inspect the deploy log: https://app.netlify.com/sites/jellyfish-defi/deploys/61e418e56a840eb5437e7a1a

😎 Browse the preview: https://deploy-preview-981--jellyfish-defi.netlify.app

@codecov
Copy link

codecov bot commented Jan 16, 2022

Codecov Report

Merging #981 (be0c402) into main (1fb168e) will increase coverage by 4.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #981      +/-   ##
==========================================
+ Coverage   92.15%   96.20%   +4.04%     
==========================================
  Files         158      158              
  Lines        4820     4820              
  Branches      634      634              
==========================================
+ Hits         4442     4637     +195     
+ Misses        358      176     -182     
+ Partials       20        7      -13     
Impacted Files Coverage Δ
packages/jellyfish-transaction/src/tx_composer.ts 80.00% <0.00%> (+1.66%) ⬆️
packages/jellyfish-api-core/src/category/wallet.ts 100.00% <0.00%> (+2.35%) ⬆️
packages/jellyfish-testing/src/testing.ts 100.00% <0.00%> (+2.63%) ⬆️
...ages/jellyfish-api-core/src/category/masternode.ts 100.00% <0.00%> (+4.76%) ⬆️
...es/jellyfish-api-core/src/category/icxorderbook.ts 100.00% <0.00%> (+4.76%) ⬆️
...ckages/jellyfish-transaction/src/script/mapping.ts 97.97% <0.00%> (+5.40%) ⬆️
...ages/jellyfish-api-core/src/category/blockchain.ts 100.00% <0.00%> (+6.06%) ⬆️
...ages/jellyfish-transaction/src/script/dftx/dftx.ts 98.48% <0.00%> (+6.06%) ⬆️
...ellyfish-transaction/src/script/dftx/dftx_token.ts 100.00% <0.00%> (+6.97%) ⬆️
...action-builder/src/txn/txn_builder_icxorderbook.ts 100.00% <0.00%> (+7.14%) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fb168e...be0c402. Read the comment docs.

@netlify
Copy link

netlify bot commented Jan 16, 2022

✔️ Deploy Preview for jellyfish-defi ready!

🔨 Explore the source changes: be0c402

🔍 Inspect the deploy log: https://app.netlify.com/sites/jellyfish-defi/deploys/61e4192ee65002000700c589

😎 Browse the preview: https://deploy-preview-981--jellyfish-defi.netlify.app

@fuxingloh fuxingloh marked this pull request as ready for review January 16, 2022 15:23
@fuxingloh fuxingloh changed the title docs(ocean-dbtc-burning-bot): DFIP 2201-A, an automated wallet bot to burn dBTC docs(examples/ocean-dbtc-burning-bot): DFIP 2201-A, an automated wallet bot to burn dBTC Jan 17, 2022
@fuxingloh fuxingloh merged commit c356328 into main Jan 17, 2022
@fuxingloh fuxingloh deleted the fuxingloh/ocean-dbtc-burning-bot branch January 17, 2022 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/examples kind/docs Non feature documentation change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants