# DeFi Protocol Development | Lending, AMM

DeFi protocol development services for lending, AMM, perp, and yield-vault mechanisms. Audited contracts, keepers, and oracles across EVM, Solana, and Cosmos.

Canonical: https://www.metaborong.com/services/web3/defi-protocol-development
Service: web3/defi-protocol-development

## Overview



Most DeFi protocols fail at the mechanism, not the code: an interest-rate curve that runs insolvent, an AMM that bleeds liquidity to arbitrage, a liquidation path that never fires. DeFi protocol development services turn that mechanism design into a live, audited product. We engineer the lending markets, AMM pools, perpetual exchanges, and yield vaults that hold real money, plus the keepers and oracles that keep them solvent.

## What is it?



DeFi protocol development services are an on-chain financial engineering practice for protocol founders that ships audited lending, AMM, perpetual, and yield-vault mechanisms with the keepers and oracles that keep them solvent. Our Neemo Finance lending and AMM contracts cleared four separate Hacken audit rounds on Astar. For OrbitXpay we delivered yield protocols and a banking module in one month.

## What we deliver



- Core mechanism contracts: lending, AMM, perp, or vault logic.
- Oracle integration with fallback feeds and circuit-breaker thresholds.
- Keeper infrastructure for liquidations, settlements, and rebalancing.
- Subgraph or indexer powering health metrics and frontend data.
- Mainnet deployment scripts, multisig handover, and a parameter runbook.

## Key concepts



**Constant-product market maker**: A constant-product market maker is an automated market maker that prices a swap so the product of its two pool reserves stays constant: x times y equals k. Each trade moves reserves along the curve, and the price is the ratio of reserves. Larger trades against a thin pool incur more slippage, which is the basis of AMM price discovery.

**Health factor**: A health factor is the ratio of a borrower’s collateral value, weighted by its liquidation threshold, to the value they have borrowed. A health factor above one means the position is solvent; at or below one the position becomes liquidatable. Lending protocols read this value continuously to decide when keepers may seize and repay collateral.

**Liquidation**: Liquidation is the process by which a lending or perpetual protocol closes an undercollateralised position to protect solvency. A keeper or liquidator repays part of the debt and seizes collateral plus a bonus. Reliable liquidation depends on a fresh oracle price and a keeper that fires before the position goes underwater.

**Yield vault**: A yield vault is a smart contract that pools deposits and routes them into a strategy that earns return, then distributes that return to depositors as share appreciation. Vaults abstract gas and rebalancing away from the user. The core risks are strategy failure, oracle manipulation on the share price, and the keeper that triggers compounding.

## How we work



1. **Mechanism spec** We translate the economic intent into a written specification: interest-rate curves, collateral factors, the constant-product or stableswap invariant, funding-rate logic, liquidation incentives, and fee splits. Each parameter carries a stated range, a rationale, and a failure mode. The spec becomes the engineering brief and the first document the external auditor reads.
2. **Contracts & off-chain** We build the mechanism contracts against the spec while the keepers, indexer, and oracle layer go in parallel. Property-based tests assert the invariants that matter: solvency, accounting conservation, and role isolation. Fork tests replay the protocol against historical mainnet state, so liquidation and settlement paths are exercised before mainnet, not after.
3. **Audit & hardening** The contract suite goes to a firm chosen with you. We respond to findings within 48 hours and ship fixes against a second-round review. Our Neemo Finance lending and AMM contracts cleared four separate Hacken audit rounds on Astar. Oracle assumptions, keeper failure modes, and admin-role boundaries are documented for the auditor before review opens.
4. **Launch & operate** Mainnet deployment runs from a reviewed script. We verify sources on the explorer, transfer admin to your multisig, and start keeper and indexer services under monitoring. After launch we run incident response on a defined SLA, ship parameter changes through governance, and hand over runbooks. For OrbitXpay we delivered yield protocols and a banking module inside one month.

## Tech stack



Solidity (Language), Vyper (Language), Foundry (Testing), Chainlink (Oracles), Pyth (Oracles), The Graph (Indexing), Gelato (Keepers), Tenderly (Monitoring), Slither (Static Analysis)

## When this fits



### Fits when



- You have a lending, AMM, perp, or vault mechanism and need the contracts, keepers, and oracles built together.
- External audit is part of the launch budget, and solvency under stress is a hard requirement.
- The protocol has a definable oracle source, liquidation model, and admin-role boundary.



### Does not fit when



- You want to fork an existing AMM or lending market and rebrand it without economic review.
- The token needs a launchpad or sale mechanic, not an operating financial protocol.
- Off-chain keeper and indexer work is expected to be handled by a separate vendor.

## FAQ



### What are DeFi protocol development services?

DeFi protocol development services build the on-chain financial mechanism a protocol runs on: lending markets, AMM pools, perpetual exchanges, or yield vaults. The work covers the mechanism specification, the contracts that enforce it, the oracles that price collateral, and the keepers that handle liquidations and settlements. We engineer for third-party audit from the first commit rather than retrofitting it later.

### How long does a DeFi protocol take from spec to mainnet?

Most protocols ship to mainnet 12 to 20 weeks from a written spec. The mechanism spec and threat model take 2 to 3 weeks. Contracts and off-chain infrastructure run 6 to 10 weeks in parallel. External audit and hardening add 4 to 6 weeks depending on findings. For OrbitXpay we delivered yield protocols and a banking module inside one month against a tightly scoped mechanism.

### Which chains do you work on?

We ship across EVM chains, Solana, and Cosmos. Chain choice follows the protocol: liquidity depth, oracle availability, transaction cost, and the wallet ecosystem your users already hold. We do not push founders toward a chain we prefer. For protocols that must live on more than one chain, we engineer for it from the spec rather than retrofitting a bridge later.

### How do you keep a lending or perp protocol solvent?

Solvency is engineered into the mechanism, not bolted on. We model interest-rate and funding curves so the protocol stays collateralised under stress, integrate oracles with fallback feeds and circuit breakers, and run keepers that liquidate before a position goes underwater. Property-based tests assert solvency as an invariant, and fork tests replay the liquidation path against real historical market moves.

### Who chooses the audit firm?

You do, with our recommendation. We have worked with Hacken across four audit rounds on the Neemo Finance lending and AMM contracts and can introduce firms whose specialism matches your mechanism, whether that is lending, AMMs, or perpetuals. We do not bundle audit cost into our fee or take a referral cut. The audit is a separate line item paid directly to the firm.
