Cross-chain Staking Protocol

Overview

  • WEMIX is the only supported coin on WEMIX on Kroma.

  • Cross-chain transfer mechanism is applied, and the WEMIX coins on the WEMIX3.0 network are automatically staked to WONDER Staking to earn rewards.

  • Earned rewards from WONDER Staking are safely calculated on off-chain and synchronized to the WEMIX.e supply on the Kroma network.

    • Deposited WEMIX coins + earned WEMIX coins as rewards >= total supply of WEMIX.e tokens

  • When depositing, there is a small delay for the safety. When withdrawing, there is a 7-day waiting period for the unstaking WEMIX from WONDER Staking.

  • Users can exchange their WEMIX.e tokens to stWEMIX.e tokens, and vice versa.

  • stWEMIX's value continuously increases as the rewards from WONDER Staking are added to the vault everyday.

  • There is a 0.3% fee on every staking and unstaking transaction.

How It Works

Exchange Ratio

The exchange ratio between stWEMIX.e and WEMIX.e is determined by the total amount of WEMIX.e tokens that the Liquid Staking contract holds and the total amount of stWEMIX.e in the Kroma network.

At first, the ratio starts with 1 stWEMIX.e = 1 WEMIX.e, but as the rewards from WONDER Staking accrues to the Liquid Staking contract, the value of stWEMIX.e increases.

Below is an example scenario. Note that the example scenario did not include any fees to simplify the simulation.

Time

Event

User Balance

Amt. of WEMIX.e in the Liquid Staking Contract

1 stWEMIX.e = ?

t0

-

User A: 1,000 WEMIX.e

User B: 500 WEMIX.e

0

1

t0

User A exchanges 1,000 WEMIX.e to stWEMIX.e

User A: 1,000 stWEMIX.e

User B: 500 WEMIX.e

1,000

1

t1

WEMIX staked in WONDER Staking generated 100 WEMIX for yield, and it is synced

User A: 1,000 stWEMIX.e

User B: 500 WEMIX.e

1,100

1.1

t2

User B exchanges 500 WEMIX.e to stWEMIX.e

User A: 1,000 stWEMIX.e

User B: 454.5454.. stWEMIX.e

1,600

1.1

t3

WEMIX staked in WONDER Staking generated 100 WEMIX for yield, and it is synced

User A: 1,000 stWEMIX.e

User B: 454.5454.. stWEMIX.e

1,700

1.16875

t4

User A exchanges 700 stWEMIX.e to WEMIX.e

User A: 300 stWEMIX.e + 818.125 WEMIX.e

User B: 454.5454.. stWEMIX.e

881.875

1.16875

t5

WEMIX staked in WONDER Staking generated 100 WEMIX for yield, and it is synced

User A: 300 stWEMIX.e + 818.125 WEMIX.e

User B: 454.5454.. stWEMIX.e

981.875

1.3012801205

t6

User B exchanges 454.54545454.. stWEMIX.e to WEMIX.e

User A: 300 stWEMIX.e + 818.125 WEMIX.e

User B: 591.4909638565 WEMIX.e

390.3840361435

1.3012801205

Contracts

*Origin network refers to WEMIX3.0, and Remote network refers to Kroma.

CT-Origin

  • Roles

    • Responsible for staking/unstaking the native coins to/from WONDER Staking.

    • Manages data for bidirectional liquidity, fees and reward sync.

    • Manages security data for the safe cross-chain transfer.

  • Functions

    • toRemote: Deposits user's assets to the staking service, triggers the transfer, and emits ToRemote event

    • requestReceive: Requests the withdrawal from the staking service to execute the withdrawal from the remote network, and allocates the withdrawal proof NFT to the requested user's wallet.

    • completeReceive: Transfers the assets to the user withdrawn by the NFT generated from requestReceive.

CT-Remote

  • Roles

    • Responsible for minting and burning WEMIX.e on the remote network.

    • Manages data for bidirectional liquidity, fees and reward sync.

    • Manages security data for the safe cross-chain transfer.

  • Functions

    • toOrigin: Withdraws the user's asset, triggers the transfer, and emits ToOrigin event.

    • completeReceive: Mints WEMIX.e tokens to execute the transfer initiated from the origin network.

CT-WEMIX.e

An adminable, mintable, and pausable ERC-20 token contract.

CT-Staking

Responsible for exchanging WEMIX.e to stWEMIX.e, and vice versa.

CT-stWEMIX.e

An adminable, mintable, and pausable ERC-20 token contract.

Cross-chain Messaging Protocol

  • Messaging Protocol: Subscribe to the events on both networks and relays the message to the contract of the desired network.

Examples

Deposit Flow

Withdrawal Flow

Sync Reward

Last updated