Skip to content

Building a DeFi Lending Platform on NEAR Blockchain With a Custom Oracle and Vesting Rewards

  • $4.99M supplied — total value supplied through the protocol on mainnet
  • 1,000+ wallets — supplying and borrowing in the first quarter
  • 4 lending markets — live at launch — WETH, WNEAR, USDT, USDC
  • ~30s price updates — from the custom DEX + CEX oracle

Built for a Web3 startup that wanted AAVE-grade lending inside the NEAR ecosystem, this DeFi lending platform lets users lend and borrow digital assets without ever handing over custody.

Request Similar Solution
DeFi Lending Platform

Project Details

NearFinance is a non-custodial lending and borrowing liquidity protocol running on the NEAR blockchain protocol. The client came to LITSLINK with a clear brief: bring the lending mechanics that made AAVE and Compound successful to a chain that didn’t have them yet. We covered business analysis for the blockchain project, product design, smart contracts development, software engineering, and full-cycle QA.

Client
NearFinance
Industry
FinTech
Solution
Non-custodial lending and borrowing liquidity protocol
Service
Smart Contracts Dev + Product Design + Full Cycle QA
Platform
Web Web
Scope
Blockchain, Back-end, Front-end, UX/UI, QA
Duration
~9 months
Location
US

Business Challenge: Building a Decentralized Lending Protocol on NEAR

Our client, a Web3 startup, set out to build a non-custodial lending and borrowing platform native to NEAR — a money market for lending, borrowing, and earning against crypto without giving up custody. At the time, the NEAR ecosystem had no mature blockchain lending platform of that kind.

The brief borrowed AAVE and Compound protocol best practices, but couldn’t copy their code. NEAR’s runtime is asynchronous, its contracts are written in Rust, and cross-contract calls behave nothing like Solidity’s. Three problems defined the project.

  • Lending and Borrowing on NEAR

    Collateral factors, health checks, interest rate curves, and liquidation logic — every mechanic Ethereum users take for granted had to be re-engineered for NEAR's asynchronous execution model. Smart contracts development on NEAR had to account for that at every step, or user funds would be at risk.

  • Custom Oracle for Asset Pricing

    Third-party oracle coverage on NEAR was thin at the time, and pulling prices from a single DEX would have exposed the protocol to flash-loan-style manipulation. The client needed oracle service development from scratch: a feed that aggregates DEX and CEX data, filters outliers, and fast updates.

  • Vesting Rewards and Ledger Trading

    The client wanted rewards with vesting time written into the contracts, so incentives stay locked for a set period before they unlock. On top of that came Ledger trading integration, because nobody serious about secure digital asset lending signs large transactions from a hot wallet.

Technologies Behind the Lending Protocol

  • Node.js logo
  • React Native logo
  • Redis logo
  • AWS logo
  • Amazon EventBridge logo
  • TypeScript logo
  • NEAR Protocol logo
  • Amazon CloudWatch logo

Our DeFi Lending and Borrowing Platform Solution

We assigned a Solution Architect with hands-on crypto trading experience to lead the build, then staffed the team around it: blockchain engineers for the Rust contracts, back-end and front-end developers, and a UX/UI designer. Eight people in total.

The core question wasn’t “can we port AAVE?” It was: what should a lending protocol on NEAR look like when the chain settles in about a second and gas costs cents? That reframing shaped the whole DeFi liquidity protocol, from the contract architecture to the React.js DeFi frontend.

The result is a decentralized lending and borrowing protocol where deposits, borrows, rewards, and liquidations all run through Rust contracts on-chain: a transparent financial protocol with no custodial middle layer, verifiable by anyone.

Rust smart contracts run the on-chain logic. The Node.js blockchain backend is written in TypeScript and handles indexing plus the oracle service, with Redis caching price data across the blockchain infrastructure. AWS EC2 runs the services, EventBridge schedules the oracle jobs, and CloudWatch watches it all with alerts on anomalies.

  1. Non-Custodial Lending and Borrowing Protocol

    Users lend and borrow digital assets straight from their NEAR wallets. Funds never touch a company account — smart contracts hold every position, which is what makes the protocol genuinely non-custodial.

  2. Custom Oracle Service (DEX + CEX Data Integration)

    An in-house oracle aggregates price data from multiple DEXs and CEXs, filters anomalies, and pushes updates on-chain. One manipulated pool can't trigger unfair liquidations.

  3. Rewards With Vesting Time

    Depositors earn protocol rewards that unlock on a vesting schedule. Liquidity providers who stay get paid in full; mercenary capital that leaves early forfeits part of the upside.

  4. Ledger Trading Integration

    Hardware wallet holders can supply, borrow, and claim rewards while their keys never leave the device. Every transaction is signed on the Ledger itself — a must-have for larger portfolios.

  5. Flexible Deposit Management

    Supply, withdraw, top up collateral, or repay at any moment, with borrow limits and the health factor recalculated in real time. Deposit management in DeFi rarely feels this routine.

Need a custom DeFi solution for your own market?

Request a Similar Solution

Scrum Methodology

Project Journey

Nine months, two-week sprints, roughly 18 of them. The first DevNet demo went out in week six — early enough for the client to catch a mismatch between expected and actual liquidation thresholds before any real funds were involved.

Discovery covered the protocol’s economic model, the four user roles — lender, borrower, liquidator, and admin — the oracle architecture, and which AAVE/Compound mechanics were worth keeping versus dropping. That groundwork is why NEAR blockchain development later went ahead without major rework.

Weeks per sprint
2
Sprints completed
~18
On-time delivery
97%
Team members
8

How the Lending Protocol Works

  1. Connect a NEAR Wallet

    Users sign in with a NEAR wallet or a Ledger. The dashboard reads balances straight from the chain — no registration, no custody handover.

  2. Pick an Asset to Lend or Borrow

    WETH, WNEAR, USDT, or USDC at launch. Each market shows live supply and borrow APY before the user commits a single token.

  3. Smart Contract Processes the Position

    Rust contracts record the deposit or loan, apply collateral factors, and update the account's borrow limit in one transaction.

  4. Oracle Fetches Live Prices

    The custom oracle aggregates DEX and CEX data and pushes fresh prices on-chain, keeping every health factor honest.

  5. Earn Rewards With Vesting

    Suppliers accrue protocol rewards that unlock on a vesting timeline — a yield that favors liquidity that stays.

  6. Withdraw or Repay Anytime

    Positions can be closed, topped up, or repaid at any moment. The contract recalculates limits instantly.

Scrum Process Flow

Smart contracts punish big-bang releases — you can’t hotfix user funds out of a bad deployment. Our blockchain development team built iteratively instead: each sprint’s contract changes were deployed and tested on DevNet, and only QA-validated builds got promoted to mainnet.

Scrum Process Flow

Inside Each Sprint

  • Daily Scrum

    15-min sync every morning

  • Retrospective

    Inspect & adapt process

  • Sprint Review

    Demo to stakeholders

  • Increment

    Shippable product update

-Timeline

Development Process — Five Phases

  1. Discovery & Product Workshop

    1-2 weeks

    • Auditing which AAVE and Compound mechanics to adapt
    • Defining 4 user roles and the reward economics
    • Business analysis and risk mapping for the blockchain project
  2. Architecture & UX Prototyping

    2 weeks

    • Designing contract architecture for NEAR's async runtime
    • Prototyping the Market and My Account Flows
    • Specifying the oracle's DEX and CEX data sources
  3. Agile Development (Sprints)

    ~6 months

    • Writing Rust smart contracts for lending, rewards, and vesting
    • Building the Node.js/TypeScript backend and React.js frontend
    • Deploying every sprint increment to devnet
  4. QA & Testing

    3 weeks

    • Full cycle QA across contracts, Oracle, and UI — blockchain edge cases included
    • Stress-testing liquidations against simulated price swings
    • Verifying Ledger signing on real devices
  5. Launch & Support

    Ongoing

    • Devnet and mainnet deployment with staged promotion
    • Monitoring via CloudWatch dashboards and alerts
    • Post-launch support and contract iteration

Results

Before

  • Lending liquidity on NEAR is scattered across bridges to other chains.
  • No AAVE-style borrowing mechanics native to the ecosystem.
  • Price feeds are dependent on third-party providers with thin NEAR coverage.
  • Liquidity incentives prone to instant farm-and-dump.
  • No single interface for supplying, borrowing, and tracking account health.

After

  • ~$5M in total value locked consolidated on one NEAR-native protocol.
  • 4 lending markets live (WETH, WNEAR, USDT, USDC), with $1.4M+ borrowed.
  • Custom oracle refreshing prices every ~30s from DEX + CEX feeds.
  • Early withdrawals down ~33% once vesting rewards went live.
  • One dashboard for deposits, borrows, rewards, and the health factor.
The Impact of DeFi Lending Platform on NEAR Blockchain

Impact of the Lending Protocol After Launch

The protocol filled a niche that had sat empty in the NEAR ecosystem: a non-custodial lending protocol where users keep their keys and still earn yield. Within the first quarter, it drew around $5M in total value locked and crossed 1,000 active wallets — modest next to Ethereum's giants, but a real foothold in a chain that had no native lending venue before. Stablecoin supply APYs settled in the mid-single digits, with double-digit rates on WNEAR and WETH.

Running its own oracle cut the dependency on external providers and closed the price-manipulation vector that single-source feeds invite. Rewards with vesting time did the rest: early withdrawals fell by roughly a third once the schedule went live, so liquidity stopped leaving the moment incentives were claimed. Smart contract automation trimmed the team's operational load too — liquidations, interest accrual, and reward distribution all run with no one pressing a button. For the client, the DeFi lending platform became proof that serious financial software development can live on NEAR, not just on Ethereum.

  • Transparent by Design
  • Liquidity That Stays
  • Zero Custodial Risk

-Verified Reviews

Our Reputation on Top Platforms

LITSLINK is consistently rated among the top blockchain and artificial intelligence development companies on Clutch and GoodFirms, with reviews that single out communication and the team’s depth on complex integrations.  

Clutch B2B Ratings & Reviews

4.8

78 reviews

Top Developer
GoodFirms Research & Reviews Platform

4.8

32 reviews

Top Company
Behance Creative Portfolio Platform

150+

design projects

View projects

Have a DeFi Project in Mind?

Need a DeFi lending platform of your own, or a partner for DeFi lending and borrowing platform development? Tell us what you’re building and we reply within 48 hours.

Next steps:

  1. LITSLINK specialist reviews your request and contacts you to discuss the details;
  2. If needed, we can sign an NDA before moving forward;
  3. We send a project proposal – estimates, timeline, and team CVs included;
  4. After launch, we stay on for any updates your product needs.
  • 48h Response
  • 1540+ Projects