What is the total amount of EOS staked on the network?
You can check the balance of eosio.stake e.g.
$ cleos get account eosio.stake
So the remaining EOS can be seen as just sitting on the exchanges?
No, the remaining EOS is unstaked EOS. Exchanges don't need to influence the amount of staked coins: exchanges may offer an option for their users to ...
This problem I have solved by using table query. I hope my solution can help you.
First I publish my stake contract to account A, it has "stake, unstake" actions, and has "stat, staking_log, unstaking_log, account" tables. "stat" save the total staking and unstaking data, "staking_log" save user staked quantity, "unstaking_log" save user unstaking data, "...
Once you have buy REX token you just have to wait for the rex token price to goes up in the market with this formula
REX price = (Total Lent + Total Unlent) / Total REX
To withdraw the dividend you would have to calculate and sell just the amount of the REX price that has been added to your REX total
I think the extra REX is calculated live, so you get ...
If you see the system_contract::delegatebw, you will know that Stake is transfer to a third party account and make a record.
If you want do the things you mentioned:
have trusted stake account
hold the sellerer's value in stake account
hold the buyer's price in stake account
make an inline transaction to exchange them
You can use cleos to undelegatebw:
cleos -u https://api.eosbean.com:443 system undelegatebw youraccount1 otheraccount "0.1 EOS" "0.2 EOS" -p youraccount1@active
In which, youraccount1 is your own EOS account name, otheraccount is the other (child) account name, 0.1 EOS is the amount of EOS to undelegate for NET, '0.2 EOS' is the amount of EOS to undelegate ...
Here is my basic incident response plan if an EOS account I control is hacked:
Regain control of the hacked account by changing the owner/active key pairs
Identify all transactions if any that were done without my real authorization but with my active or previous owner key pairs
Contact block producers on the telegram channel @EOSProsto and get further ...
As I never did this, do I load my OWNER private key into a new wallet and then change the active key to something else to prevent the hacker from doing anything?
Or is there another step I do not know about?
If you want to or if you believe that the wallet you used may be insecure, you can generate new key(s) for the owner and reset your owner ...