Closed JackyWYX closed 2 years ago
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 174102.9244 ONE (30009.08 USD @ $0.17/ONE) attached to it.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 264 years, 10 months from now. Please review their action plans below:
1) ndionxerz99 has started work.
Saya akan melakukan apa saja untuk memikki tiket 2) aungjr has started work.
What is the minimum amount of staking? 3) peekpi has started work.
great idea, I'll take care of it. 4) maxmustermann2 has started work.
Please refer to the following PR to see my proposed implementation https://github.com/harmony-one/harmony/pull/3906; the smart contract implementation is available at https://github.com/MaxMustermann2/harmony-staking-precompiles 5) ckanyemba has started work.
I want to work on this project, I am developer working towards building web3 programs
Learn more on the Gitcoin Issue Details page.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 174102.9244 ONE (42901.40 USD @ $0.26/ONE) has been submitted by:
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 174102.9244 ONE (50313.48 USD @ $0.31/ONE) has been submitted by:
@leohchen please take a look at the submitted work:
1. Description
Currently, Harmony staking transactions are executed in a different logic other than the normal transaction. User can either send a normal transaction to do transfer or EVM call, or do staking transaction. This approach has restricted the use of staking protocol, and some DeFi products, E.g. liquidity staking, does not have access to the staking assets in consensus.
To improve the composability of the staking, we want to add the staking functions to the precompiles, so that the staking can be called from smart contract.
For this bounty, the features to be implemented includes:
2. Some background and instructions
2.1 Staking transaction logic
When leader propose blocks (
node/worker/worker.go:164
) and node insert chain (core/blockchain.go:1451
), the staking transactions will follow the logic atApplyStakingTransaction
(core/state_processor.go:112
) to execute the staking transaction.Staking transaction it has its own data structure where the staking directive type and data is inlcuded:
One of this bounty's requirements is to add the staking processing logic to the precompiles (
core/vm/contracts.go:101
) and return the result as necessary.2.2 Fork logic
It is also needed to add a hard fork logic for adding new precompiles.
If you need more instruction, please add me on Discord
Jacky | Harmony#9576
for further discussion3. Features and acceptance criteria
3.1 Core protocol
ApplyStakingTransaction
.run
andCall
.LocalnetChainConfig
.3.2 Smart contract
3.3 Test reports
All test reports shall contain several test cases that include:
The tests can be run manually. Another bounty can be added later to integrate the test cases to
harmony-test
repository.3.4 Notice
The contracts and code changes are subject to code security audition, and developer may need to do some technically support even after the bounty closes.
4. Reward
$30,000 ONE