Back to leaderboard
Season 1 · DeFi & Open Finance

OPN Staking DApp

Multi-pool staking on OPN Testnet — deposit LP tokens, earn rewards every block

Stage 1, ReviewDeFi & Open Finance

by xpayhunter · submitted Jun 6, 2026

Community votes

0

Voting opens when this submission reaches the Top 10 stage.

Overall score

/ 100

Weighted average across the 5 judging criteria.

Description

01/03

What the builder said.

Written by the team, rendered as the markdown they typed in the submission wizard.

What I Built

A full-stack DeFi staking DApp on OPN Testnet for IOPn Builders Season 1. The project consists of two deployed contracts and a live frontend web interface.

MasterChef Staking (0x81eDA9b8D48973D6d12C494b3d357e67467b0ADe) is a multi-pool staking contract modelled after the battle-tested MasterChef pattern. It distributes a configurable reward token across multiple LP token pools according to their allocation weights. Rewards accrue every block and are tracked with an accRewardPerShare accumulator, so earnings are always precise regardless of when a user enters or exits.

OPN Native Staking (0x5c718c9846e2846958D071380e1041fa3C28c912) lets users stake native IOPN directly. It records each staker's balance and staking timestamp, and is protected against reentrancy attacks using OpenZeppelin's ReentrancyGuard.

Key Features

  • Multi-pool architecture: any ERC20 LP token can be added as a staking pool by the owner
  • Per-block reward distribution weighted by allocPoint across all active pools
  • harvest() lets users claim rewards without touching their principal
  • deposit() auto-harvests pending rewards before adding new stake
  • withdraw() auto-harvests pending rewards before returning LP tokens
  • Native IOPN staking with full reentrancy protection
  • Live frontend: single-file HTML/JS DApp using ethers.js v6 — connects MetaMask, auto-discovers all pools, shows real-time pending rewards, and supports deposit, withdraw, and harvest in one interface

How to Test

  1. Add OPN Testnet to MetaMask
  2. Get test IOPN from the faucet
  3. Open the live demo and connect your wallet
  4. The app loads all active pools automatically
  5. Approve your LP token, then deposit — rewards start accruing immediately
  6. Use Harvest to claim, or Withdraw to exit

Tech Stack

Solidity 0.8.20 · OpenZeppelin 5.x · ethers.js v6 · Vanilla HTML/JS · GitHub Pages

Roadmap

02/03

What ships next.

The builder's own next-quarter plan. Use it to gauge follow-through and ambition.

Q3 2026 — Reward Token & APR Display

Deploy a native OPN ERC20 reward token and integrate it with the MasterChef contract as the emissions token. Add on-chain APR calculation to the frontend based on rewardPerBlock, total pool TVL, and token price feed. Allow the owner to rebalance allocPoint weights across pools without migrating user funds.

Q4 2026 — Yield Vault & Mainnet Prep

Build a simple Yield Vault contract that auto-compounds staking rewards back into the pool on behalf of depositors. Extend the frontend with a dashboard showing historical earnings per wallet and pool-level TVL charts. Prepare deployment scripts and audit checklist for OPN Mainnet launch.

2027 — Full DeFi Product

Expand into a Lending & Borrowing module where staked LP tokens can be used as collateral. Open-source the full codebase under MIT, publish documentation, and grow a small contributor community around the protocol on OPN Chain. Long-term goal is a production DeFi suite — staking, lending, and liquidity — native to OPN.

On-chain proof

03/03

2 contracts on OPN Chain.

The chain itself confirmed every deployment is valid, signed by the builder's wallet, and inside the season's window.

  • 01MasterChefPrimary

    0x81eDA9b8D48973D6d12C494b3d357e67467b0ADe

    tx 0x209245328dc4ddec9393f0ba1f7b1e57f2c786d3a934d402fe8379434d62fe2b

    deployed Jun 6, 2026 · block 18009898

  • 02OPNStaking

    0x5c718c9846e2846958D071380e1041fa3C28c912

    tx 0x6cdb1fdaaedf7393b6d259987748a96f906f06e3946851832d6aa3ca6a3f35dd

    deployed May 31, 2026 · block 17645714