Native token staking protocol for Ethereum or EVM chains

Starting at

$

600

/wk

About this service

Summary

This native token staking protocol offers a secure and user-friendly way to earn rewards on platform tokens. It uniquely combines the security of a multi-signature wallet (Safe wallet) treasury with the flexibility of staking tokens (sTokens), while enabling gas-less reward claims through meta-transactions. This innovative approach not only ensures the safety of staked assets but also enhances user experience by minimizing transaction costs and providing a seamless staking and reward distribution process.

Process

1. Token Acquisition
Alice acquires native tokens of the platform through an exchange or by participating in platform activities.
2. Staking Decision
Impressed by the staking rewards, Alice decides to stake her tokens. She approves the StakingPlatform contract to spend her native tokens.
3. Staking Process
Alice calls the stake function, specifying the amount she wants to stake. The protocol transfers her native tokens to the Gnosis Safe treasury and mints an equivalent amount of staking tokens (sTokens) to her wallet.
4. Reward Accumulation
As time passes, Alice's staked tokens generate rewards. The protocol calculates her rewards based on the staking duration and her staked amount.
5. Gas-less Reward Claim
When Alice wants to claim her rewards:
a. She signs a message off-chain with her reward claim details.
b. This signed message is sent to a relayer (which could be the platform itself).
c. The relayer submits the transaction to the claimRewardMeta function, paying for the gas.
d. The contract verifies Alice's signature and transfers the reward tokens from the treasury to her wallet.
6. Continued Staking
Alice's original stake remains active, continuing to generate rewards.
7. Unstaking Decision
After some time, Alice decides to unstake a portion of her tokens. She calls the unstake function, specifying the amount.
8. Unstaking Process
The protocol burns the specified amount of Alice's sTokens and transfers the equivalent amount of native tokens from the Gnosis Safe treasury back to her wallet.
9. Flexibility
Throughout this process, Alice has the flexibility to:
Stake additional tokens at any time.
Claim rewards without affecting her staked amount
Unstake partially or fully as needed.
Timeline Week 1: Planning and Setup (10 hours)
Day 1-2: Project planning and requirement analysis (4 hours)
Day 3-4: Development environment setup and tool selection (3 hours)
Day 5: Smart contract architecture design (3 hours)
Week 2: Core Contract Development (10 hours)
Day 1-2: Implement NativeToken.sol and StakingToken.sol contracts (4 hours)
Day 3-5: Develop core functions of StakingPlatform.sol (stake, unstake) (6 hours)
Week 3: Advanced Features and Security (10 hours)
Day 1-2: Implement reward calculation and distribution logic (4 hours)
Day 3-4: Develop meta-transaction functionality for gas-less operations (4 hours)
Day 5: Integrate with Gnosis Safe for treasury management (2 hours)
Week 4: Testing and Optimization (10 hours)
Day 1-3: Write and run unit tests for all contracts (6 hours)
Day 4-5: Perform gas optimization and refactor code (4 hours)
Week 5: Integration and Deployment Scripts (10 hours)
Day 1-2: Develop deployment scripts for all contracts (4 hours)
Day 3-4: Create integration tests simulating full staking cycle (4 hours)
Day 5: Set up continuous integration for automated testing (2 hours)
Week 6: Documentation and Final Touches (10 hours)
Day 1-2: Write technical documentation and user guides (4 hours)
Day 3: Prepare frontend integration examples (3 hours)
Day 4-5: Final review, bug fixes, and preparation for audit (3 hours)
Total: 60 hours over 6 weeks

What's included

  • Native Token Staking Protocol Deliverables

    1. Smart Contracts: NativeToken, StakingToken, StakingPlatform 2. Key Features: Token staking, reward distribution, gas-less claims 3. Security: OpenZeppelin contracts, Safe wallet integration 4. Testing Suite: Unit, integration, and security tests 5. Deployment Scripts: For all contracts and Safe treasury setup 6. Documentation: Technical, user guide, and API docs 7. Front-end Integration: Code snippets and examples 8. Management Tools: Monitoring scripts and admin interface


Skills and tools

Blockchain Developer
Smart Contract Engineer
AWS
Chainlink
Hardhat
OpenZeppelin
Solidity

Industries

Blockchain

Work with me