StakeBTS 2.1 Update and Release Notes

in #bitshares3 years ago

by BitShares Management Group

As promised a month ago in first announcement of bugs and updates that we will perform, StakeBTS bot update came with much more changes than we originally planned. We've compiled the essential highlights for you in the below, while full and very detailed readme for this project can be found on the official BitShares GitHub.

StakeBTS bot is a tool for BitShares token holders (stakeholders) to lock their tokens into a fund pool, managed under corporate terms. Users who pledge to lock amounts of tokens are provided with rewards of upto 96% APY. (8% month). These returns are made through active corporate management of market making, trading, and fee pool profits.

StakeBTS bot is ran predominantly from automations with managerial controls, some of which are described below.


  • Enhanced whereby all future payouts occur in 30 day intervals from beginning of contract
  • All payout amounts will be rounded down to nearest whole BTS
  • User will receive receipt as memo with 1 BTS upon creating a new contract
  • All payouts will come from
  • In the event of payout failure, 1 BTS will be sent with additional support info
  • Client sends an invalid amount or invalid memo he will be refunded less 50 BTS penalty
  • Manager can use bot to transfer funds to and from bittrex to brokerage account
  • Manager can use bot to personally loan funds to the brokerage account
  • New database format, all payouts are added to database at start of contract
  • New database format, all outbound payment details are kept as receipts


It's recommended to use the provided form on the BTSMG website for StakeBTS. The bot charges a fee of 50 BTS and returns your funds if:

  • Sending invalid stake amount
  • Sending invalid memo
  • Sending admin request without being in MANAGER list
  • Sending admin loan_to_bmg without lifetime member (LTM) status on your account
  • Bot ignores bittrex to bmg and vice versa transfer requests if not LTM



  • in a seperate script import withdrawal and balances definitions:
  • unit test post_withdrawal_bittrex() and post_withdrawal_pybitshares()
  • unit test get_balance_bittrex() and get_balance_pybitshares()


  • reset database
  • in set DEV = True
  • send 0.1 BTS to broker, ensure script hears it arrive to the BROKER account.
  • check state of receipts and stakes database tables


  • in set DEV = True
  • reset database
  • load old contracts:
    • python3.8
  • print database contents:
    • sqlite3 stake_bitshares.db
    • SELECT * FROM stakes;
  • via sql, change the due date on a single payment to 0, see that it gets paid
    • sqlite3 stake_bitshares.db
    • UPDATE stakes SET due=0 WHERE client='user1234' AND number=6;
  • check state of receipts and stakes database tables


  • reset database
  • in set DEV = True
  • in test True, False, int() of REPLAY
  • ensure script starts at correct block number
  • script should not create duplicates in stakes database when replaying
  • check state of receipts and stakes database tables


  • reset database
  • with set DEV = False and 100 added to the list of INVEST_AMOUNTS
  • send an invalid amount 99
  • send an invalid memo fail_memo
  • send a valid amount 100 and valid memo to start a new stake
  • send memo to stop a stake


  • using a MANAGER account test admin memos (with and without LTM)
  • bmg_to_bittrex
  • bittrex_to_bmg
  • loan_to_bmg
  • check state of receipts and stakes database tables


  • reset database
  • send 1000 BTS to Bittrex
  • with set DEV = False and 100 added to the list of INVEST_AMOUNTS
  • insert line item in stakes table with amount ~500 BTS more than balance of BROKER:
    • stakes
    • (client, token, amount, type, start, due, processed, status, block_start, block_processed, number)
    • VALUES
    • ('user1234', 'BTS', BALANCE_BROKER, 'interest', 0, 0, 0, 'pending', 0, 0, 1)
  • empty the broker account
  • send memo to stop a stake
  • bot should move funds from bittrex to pybitshares wallet, then to client to cover
  • ideally this should be tested with various amounts in all 3 Bittrex wallets


  • automatically move funds from bittrex to hot wallet to cover payments due
  • does not allow non-ltm users to administrate
  • allows replay from current block, last block in database, or user specified block.
  • prevents double entries during replay

StakeBTS BOT - August Update and release notes
StakeBTS Public proof of 2nd round of Nominator rewards (Source: BitShares open-source wallet)

Other StakeBTS Bot Features

  • Automatically move funds from bittrex to hot wallet to cover payments due
  • Does not allow non-LTM users to administrate
  • Allows replay from current block, last block in database, or user specified block.
  • Prevents double entries during replay


Concept design and logic


This software is sponsored and managed by BitShares Management Group Limited


v1.0 initial prototype

v2.0 refactor, refinement, added features


StakeBTS has come from a humble start to a polished automation platform for the holders of BTS who were never rewarded in the past - in just a few short weeks. All credit goes to the development and BitShares Management Group for the initiative, legal coverage and delivery of this project. For more about the rise of BitShares technology, see the recent publications linked in the below, and on the BitShares News website.

Posted from BitShares News with Exxp :