Build With IEPTAR Chain

Dive into the world of DeFi apps, integrations, and developer tooling built on top of the IEPTAR Protocol.


Overview

The IEPTAR Protocol empowers developers to build decentralized applications with ease. Leverage a permissionless Automated Market Maker (AMM) to enable swaps, liquidity provision, and governance across multiple chains.

AMM: Constant-product pools & concentrated liquidity.

Multichain: Polygon, Arbitrum, Ethereum (coming soon)
SDKs & APIs: JavaScript SDK, REST APIs for seamless integration

Navigate the sidebar to explore developer resources. Begin with Getting Started to connect a wallet and execute your first swap on IEPTAR.

Getting Started IEPTAR chain

This guide walks you through connecting a wallet and making your first swap on IEPTAR.

1. Connect a Wallet (MetaMask)


if (window.ethereum) {
  await window.ethereum.request({ method: 'eth_requestAccounts' });
  const provider = new ethers.providers.Web3Provider(window.ethereum);
  const signer = provider.getSigner();
  const address = await signer.getAddress();
  console.log('Connected:', address);
}
                

2. Add Polygon (example)

await window.ethereum.request({
  method: 'wallet_addEthereumChain',
  params: [{
    chainId: '0x89',
    chainName: 'Polygon Mainnet',
    rpcUrls: ['https://polygon-rpc.com/'],
    nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 },
    blockExplorerUrls: ['https://polygonscan.com/']
  }]
});
                

3. Swap via SDK (ethers + IEPTAR SDK)

import { IEPTARRouter } from '@IEPTAR-labs/sdk';
import { ethers } from 'ethers';

const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
const router = new IEPTARRouter({ provider, signer, routerAddress: '0xYOUR_ROUTER' });

const amountIn = ethers.utils.parseUnits('0.1', 18); // 0.1 ETH
const path = ['0xTOKEN_IN', '0xTOKEN_OUT'];
const quote = await router.getAmountsOut(amountIn, path);
console.log('Quote:', quote);
                

Next: see Smart Contracts for contract architecture and ABIs.

SMART CONTRACTS

IEPTAR — composable, permissionless AMM and developer platform.
IEPTAR protocol contract layers separate core pool logic from periphery helpers like Router and Quoter.

Core Contracts

  • Factory — creates and registers pools
  • Pool / Pair — implements swap logic and reserves
  • Router — builds transactions, performs swaps using pools
  • Governance — manages protocol proposals and parameter changes

Example: Minimal Pair (Solidity)

pragma solidity ^0.8.17;

interface IERC20 { function transferFrom(address a,address b,uint256 c) external returns(bool); }

contract IEPTARPair {
  address public token0;
  address public token1;
  uint112 private reserve0;
  uint112 private reserve1;

  constructor(address _t0, address _t1) {
    token0 = _t0; token1 = _t1;
  }

  function getReserves() external view returns(uint112, uint112) {
    return(reserve0, reserve1);
  }

  function swap(uint amount0Out, uint amount1Out, address to) external {
    // simplified swap (no checks here - production must include safe math, price checks)
    if(amount0Out>0) IERC20(token0).transferFrom(msg.sender, to, amount0Out);
    if(amount1Out>0) IERC20(token1).transferFrom(msg.sender, to, amount1Out);
  }
}
                

Deployment

Provide your deployed addresses per network and ABI files in /artifacts. Example addresses:

  • Mainnet Router: 0xROUTER_MAINNET
  • Polygon Router: 0xROUTER_POLYGON
  • Testnet (Mumbai): 0xROUTER_MUMBAI

ABIs

Embed ABI JSON snippets for key contracts in your repo and link to them here for developers to copy.

SDKs & Tooling

IEPTAR — composable, permissionless AMM and developer platform.
IEPTAR provides a JavaScript SDK to simplify quoting, routing and transaction building.

Install

npm install @IEPTAR-labs/sdk ethers

Basic usage (JavaScript)

import { IEPTARRouter } from '@IEPTAR-labs/sdk';
import { ethers } from 'ethers';

const provider = new ethers.providers.JsonRpcProvider('https://polygon-rpc.com/');
const router = new IEPTARRouter({ provider, routerAddress: '0xROUTER' });

// quote example
const amounts = await router.getAmountsOut('1000000000000000000', ['0xTOKENA','0xTOKENB']);
console.log('Amounts out:', amounts);

SDK Features

  • Quoter: getAmountsOut / getAmountsIn
  • Router: build swap transactions (exactIn / exactOut)
  • Helpers: token metadata, price oracles integration

APIs

IEPTAR — composable, permissionless AMM and developer platform.
Public REST endpoints (example) to integrate IEPTAR data into dashboards and services

Endpoints

  • GET /api/v1/tokens — list supported tokens
  • GET /api/v1/pairs — list active liquidity pairs
  • GET /api/v1/quote?from=TOKEN&to=TOKEN&amount=1000000 — swap quote
  • GET /api/v1/prices?symbols=ETH,BTC — latest prices

Example: curl

curl "https://docs.ieptar.com/api/v1/quote?from=USDC&to=DAI&amount=1000000"

Response example

{
  "from":"USDC",
  "to":"DAI",
  "amountIn":"1000000",
  "amountOut":"999500",
  "routes":[ { "pool":"0x...", "liquidity":"1000000" } ]
}

Rate Limits & Caching

Use caching

Guides

IEPTAR — composable, permissionless AMM and developer platform.
Step-by-step guides for common developer flows.

1. Swap from a frontend (ethers.js)

// approve token then call swap on router
const token = new ethers.Contract(tokenAddr, erc20Abi, signer);
await token.approve(routerAddress, amountIn);
const tx = await routerContract.swapExactTokensForTokens(
  amountIn, minAmountOut, [tokenAddr, tokenOutAddr], userAddress, Math.floor(Date.now()/1000)+60*10
);
await tx.wait();

2. Add Liquidity

const tx = await router.addLiquidity(
  tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline
);

3. Governance: Submit proposal

// Example governance flow (simplified)
const tx = await governance.createProposal(title, description, actions);
await tx.wait();

Each guide includes security notes and gas estimation tips.

Advanced Topics

IEPTAR — composable, permissionless AMM and developer platform.
Best practices and deeper operational topics.

Security

  • Protect against reentrancy (use checks-effects-interactions + ReentrancyGuard)
  • Use safe math and limit external calls
  • Audit, fuzz testing, and unit test coverage

Multichain Deployment

Deploy factory and router per chain. Maintain a registry for cross-chain routing.

Performance & Caching

Cache quotes for short windows (30–60s). Use server-side rate limiting and exponential backoff for API calls.

Resources

IEPTAR — composable, permissionless AMM and developer platform.
Links and resources for developers working with IEPTAR.

Contribution

Fork the repo, open pull requests to add docs, and follow the code of conduct.