sToken
sToken is a Liquid Staking rollup based token working on across multiple chains allowing users to bridge ETH from any chain, using HyperLane to get LST tokens in return. It also implements a reward mechanism using 1inch ERC20 Plugins.
Screenshots



Problem Statement
FeaturesSupport for both AVL and ETHSupport for multiple chains using HyperlaneLiquid staking mechanismRewards Mechanism using 1inch ERC20 Plugin.Rollup that manages the bridging using Stackr on AvailDAImportant NotesAll operations perform various checks to ensure security and consistency (e.g., balance checks, authorization checks).The system uses both EVM addresses and AVL addresses, with a claiming mechanism to link them.Bridging and staking operations are multi-step processes to ensure proper verification and execution.Possible Use CasesThe liquid staking tokens can be integrated into various DeFi protocols such as lending platforms, automated market makers (AMMs), and yield aggregators.Users can diversify their staked assets across different chains, potentially reducing the risk associated with staking on a single network.By providing a bridge to Ethereum, the system can enhance the overall liquidity and utility of staked assets from other proof-of-stake networks.
Solution
I used stackr sdk for creating this project on AvailDA.Key Components Include --- State Transition Functions (STFs)Token Managementcreate: Create a new accountmint: Mint new tokensburn: Burn existing tokenstransfer: Transfer tokens between accountsapprove: Approve spending allowancetransferFrom: Transfer tokens on behalf of another accountBridgingrequestBridge: Initiate a bridge request from Rollup to L1fulfillBridge: Complete a bridge requestAVL StakingbridgeAVLtoApp: Bridge AVL tokens to the Micro RollupclaimAVLAccount: Claim an AVL accountrequestStakeAVL: Request to stake AVL tokensfulfillStakeAVL: Fulfill an AVL staking request--Tech StackStackr + AvailDA - For the rollupNextJS - For the frontendavail-js-sdk - For the interactions for avail on the frontend.HyperLane - for the cross chain message passing1inch ERC20 Plugin - for providing the rewards to the users for holding stokens.-- 1inch Token PluginTime-Based RewardsUsers accumulate holding time for their sTokens. Longer hold times result in higher reward multipliers. Maximum multiplier (2x) achieved after one year of holding.Reward Pool ManagementContract owner can set and update the total reward pool. Rewards are distributed proportionally based on user balances and hold times.User Information TrackingStores user balances, last update times, and accumulated holding times. Automatically updates user information on token transfers, mints, and burns.Claiming MechanismUsers can claim rewards based on their balance and accumulated hold time. Prevents double-claiming through a mapping of claimed status.
Hackathon
ETHGlobal Singapore
2024
Prizes
- 🏆
Innovate with 1inch's ERC20 Token Plugins3rd place
1inch
Contributors
- parthg1901
7 contributions