DOBI Vault - Locked Staking

This guide explains how to use the Locked Staking smart contract deployed on the Base Network. There are two deployments:

  • Testnet (Base Sepolia): For testing purposes.
  • Mainnet (Base): For production use.

Smart Contract Addresses

Each smart contract has its own staking configuration and uses different tokens for staking and rewards.

Staking Configurations

1. Base Sepolia (Testnet)

2. Base (Mainnet)

Note: For the testnet deployment, you can request tokens from the development team.

How to Use Locked Staking

You can interact with the smart contracts using a blockchain explorer (e.g., BaseScan), as all contracts are verified. Below is a step-by-step guide for staking and claiming tokens.

1. Stake Tokens

You can only stake tokens during the deposit period. This requires two transactions:

Step 1: Approve Allowance

Grant the smart contract permission to use your Stake Tokens by calling the approve() function of the Stake Token smart contract.

Example:

To approve exactly 1 token with 18 decimal places (common for ERC-20 tokens), you need to specify the amount as 1 followed by 18 zeros (i.e., 1000000000000000000) in the approve() function.

Approve Allowance Example Image

Step 2: Stake Tokens

Call the stake() function of the Locked Staking smart contract to stake your tokens.

Requirements:

  • The stake() amount must be less than or equal to the approved amount.
  • The amount must also not exceed the maximum allowed stake amount, as defined in the contract's staking configuration.

Example:

Stake 1 token during the deposit period.

Stake Function Example Image

2. Claim Tokens

You can only claim tokens after the lock period ends. Use the claim() function of the Locked Staking smart contract to retrieve your staked tokens and rewards. No additional inputs are required.

Example:

Call the claim() function once the lock period ends to receive both your staked tokens and reward tokens.

Claim Function Example Image

Additional Notes

  • Always ensure you're interacting with the correct contract address.
  • For the testnet version, you can contact the dev team to get faucet tokens for testing.
  • Use BaseScan's "Write Contract" feature to interact with the functions.

UI

We are excited to announce the launch of our new interface designed to make the staking process seamless and user-friendly. With this new platform, users can now easily manage their staking activities through an intuitive and streamlined experience.

This enhanced functionality is now live, providing users with a more accessible and efficient way to engage with staking. We invite you to explore the platform and enjoy its simplicity and improved usability!

UI link: https://dobi-stake.dobprotocol.com/