In this guide we will walk step‑by‑step through launching a market on Curve LlamaLend: choosing a pool, configuring a price oracle, selecting lending parameters, and attaching a gauge so liquidity providers can earn CRV rewards. The material complements the previous guide on parameter selection and will allow you to integrate any token into the Curve ecosystem on your own.
Preparation and Requirements — let’s go over what you need in order to spin up a new market.
Creating a Curve Pool
Deploying a Market via OneWay Lending Factory
Choosing the method:
create_from_pool
— for a market whose pool is paired with crvUSD
create
— for a market whose pool has no crvUSD pair
Deploying the oracle contract
Choosing price oracles for Curve Lending
Main oracle types for lending markets
Oracles for special‑case tokens
How to pick the right oracle
Important nuances
Creating Gauges for CRV Rewards
Flow for markets on Ethereum Mainnet
Flow for markets on side‑chains (L2 / alt‑L1)
Deploying the Child Gauge on the side‑chain
Deploying the Root Gauge on Ethereum Mainnet
Generating the salt
value
The _manager
parameter
Extra capabilities
Conclusion
In the earlier article “Choosing Optimal Parameters for LlamaLend Markets”, we explained in detail how to run back‑tests on historical data. Using parameters that fit your asset’s behaviour is critical; otherwise sharp price moves inside the soft‑liquidation band can trigger mass liquidations.
A Curve pool for your asset — ideally paired with crvUSD; if no crvUSD pair exists you will have to deploy a dedicated oracle contract.
Deep on‑chain / off‑chain liquidity that is sufficient for orderly liquidation and de‑liquidation of all loans.
Fast arbitrage routes: if not all liquidity sits in the Curve pool you connect to the market, you must ensure — and continue to monitor — that rapid arbitrage is possible between your Curve pool and other trading venues.
Meeting these three prerequisites greatly reduces the risk of unwanted liquidations and keeps the lending market healthy over its lifetime.
To launch a LlamaLend market you need a price oracle that is both fair and resistant to manipulation. The ideal solution is a Curve pool that already contains your token.
Cryptoswap Two‑Asset NG Pool — for two volatile assets (e.g., crvUSD/your_token
).
Cryptoswap Three‑Asset NG Pool — for three assets (e.g., crvUSD/WETH/your_token
).
Stableswap NG Pool — for stable‑asset pairs (e.g., crvUSD/your_stablecoin
).
The “NG” suffix (Next Generation) means the pool exposes a built‑in EMA oracle that LlamaLend can read directly.
If the required pool does not exist, create it via the official Curve interface or follow the Creating Pools guide in the documentation.
Important: If your asset is not traded directly against crvUSD
, you will have to deploy a custom oracle (see the oracle‑creation section below).
OneWay Lending Factory deploys every contract a market needs in one transaction using either create_from_pool
or create
. After the transaction confirms, the new market appears automatically in the Curve LlamaLend UI.
Ethereum: 0xeA6876DDE9e3467564acBeE1Ed5bac88783205E0
Arbitrum: 0xcaEC110C784c9DF37240a8Ce096D352A75922DeA
Fraxtal: 0xf3c9bdab17b7016fbe3b77d17b1602a7db93ac66
Optimism: 0x5ea8f3d674c70b020586933a0a5b250734798bef
Sonic: 0x30d1859dad5a52ae03b6e259d1b48c4b12933993
Use create_from_pool
if you already have a Curve pool that includes both the collateral token and crvUSD
; the factory will automatically use the pool’s EMA oracle, so you do not need to supply a separate price_oracle
parameter.
Use create
if your pool has no direct crvUSD
pair; in that case you must pass the address of a custom price oracle in the price_oracle
field. Guidance on building or selecting the right oracle is provided in Curve’s Lending Oracles overview.
(resources.curve.fi, docs.curve.fi)
Both methods come in several “light” and “full” variants. The lighter variants omit some optional parameters and fall back to DAO‑defined defaults; the full variants let you specify every parameter explicitly. Choose according to how much control you need over fees, borrow‑rate bands, and risk settings.
Use this variant when you have a Curve pool such as crvUSD / your token
built with stableswap‑ng, twocrypto‑ng, or tricrypto‑ng. The pool’s built‑in EMA oracle is automatically recognised, so you do not need to supply a separate price_oracle
address.
borrowed_token
– address of the asset users will borrow (normally crvUSD).
collateral_token
– address of the asset that backs the loan.
A
– amplification coefficient, i.e. the width of the soft‑liquidation band. Typical values range from 10 to 30; choose a lower number for more‑volatile tokens.
fee
– AMM swap fee expressed with 18 decimals (0.06 % = 6000000000000000
).
loan_discount
– discount factor used when calculating the maximum loan‑to‑value (e.g. 11 % = 110000000000000000
).
liquidation_discount
– discount applied to the price during liquidations (e.g. 8 % = 80000000000000000
).
pool
– address of the Curve pool that acts as the oracle; it must contain both the collateral and the borrowed token.
name
– a descriptive market name, written as a string.
min_borrow_rate
– minimum borrow rate per‑second; 1 % APR corresponds to roughly 317097919
(wei‑per‑second).
max_borrow_rate
– maximum borrow rate per‑second; 80 % APR is about 25367833587
.
Except for A
, every numeric value is supplied in 18‑decimal wei units.
Calibrate A
, fee
, loan_discount
, and liquidation_discount
with historical simulations to be sure the market stays solvent even during extreme price swings; Curve’s own guide “Choosing Optimal Parameters for LlamaLend Markets” walks through that process step by step.
For the borrow‑rate band you set min_borrow_rate
and max_borrow_rate
according to expected utilisation:
effective_rate(utilisation) =
(max_rate / min_rate) ^ utilisation × min_rate
Example with 1 % → 100 %:
at 60 % utilisation the borrower pays ~15.85 % APR,
at 70 % utilisation the rate rises to ~25.12 %,
at 80 % utilisation it reaches ~39.81 %.
Choose lower bands for highly liquid, stable assets and higher bands for volatile or thinly traded assets.
If you leave either rate field blank (enter 0
, or use a lighter factory method) the factory falls back to the Curve DAO’s current defaults.
Open the OneWay Lending Factory contract for your network (for example, Ethereum Mainnet – 0xeA6876DDE9e3467564acBeE1Ed5bac88783205E0
).
Fill in the parameters listed above.
Click “Write” and sign the transaction.
That single transaction deploys the LLAMMA, the Controller, the Vault, and registers the new market in the Curve LlamaLend UI.
Keep an eye on utilisation, borrow rates, and liquidity depth to ensure the market behaves as expected. Market admins (or a DAO vote) can later adjust fees or the borrow‑rate band if conditions change.
(applies only when you launch a market with the create
method)
Launching a LlamaLend market whose collateral token is not traded in a Curve NG pool against crvUSD
means you must aggregate price data from several pools (or other feeds) and deploy a standalone oracle contract. Because this is more involved than the default create_from_pool
flow, Curve recommends discussing your design with the core team before going live.
At present there is no factory that can deploy these multi‑pool oracles automatically; you have to deploy the contract yourself. The most convenient way is to use the browser‑based Remix IDE.
Go to https://remix.ethereum.org and open a new workspace.
Click the Import from URL icon, then paste the GitHub link of the oracle you need.
Curve’s official L1 oracles live under: https://github.com/curvefi/curve-stablecoin/tree/master/contracts/price_oracles
L2‑specific oracles are in: https://github.com/curvefi/curve-stablecoin/tree/master/contracts/price_oracles/L2
If your token and the reference token use different decimals, the community contract CryptoFromPoolsWAgg.vy
by martinkrung is a good choice (it handles, for example, 18‑decimals EYWA and 6‑decimals USDT): https://github.com/martinkrung/ape-oracle-deploy/blob/main/contracts/L2/CryptoFromPoolsWAgg.vy
• Select the file in the Remix File Explorer and press Compile. The green check‑mark confirms success.
Open the Deploy & Run Transactions tab.
In the Environment dropdown choose WalletConnect and link your wallet; set the network you want to use (in the screenshot example, Arbitrum with chain‑ID 42161).
Expand Deploy and paste the four arguments expected by CryptoFromPoolsWAgg.vy
:
pools
– a JSON‑style list of pool addresses, e.g.["0x6579758e9e85434450d638cfbea0f2fe79856dda","0x73af1150f265419ef8a5db41908b700c32d49135"]
. The first is the EYWA/USDT pool; the second is the crvUSD/USDT pool on Arbitrum.
borrowed_ixs
– the coin index for crvUSD
inside each pool, written as [0,0]
(both pools list the borrowed asset at index 0). You can verify the mapping with the pool’s coins
method on Arbiscan.
collateral_ixs
– the coin index for the collateral token (EYWA
) in each pool, here [1,1]
. Again, confirm with coins
on the pool contract page.
agg
– address of the on‑chain aggregator contract that returns the combined price, for example0x44a4FdFb626Ce98e36396d491833606309520330
.
Tip: Pool coin indices start at 0. Call
coins(0)
orcoins(1)
in the Read Contract tab on Arbiscan until the expected token address appears.
Open the pool’s contract page on a block‑explorer (Arbiscan for Arbitrum).
In the Read Contract section call coins(uint256)
with index 0
, then with 1
, until you see which token address is returned. Indices start from 0.
For the EYWA/USDT pool (0x6579…6dda
) the call shows that index 0 is USDT and index 1 is EYWA.
For the crvUSD/USDT pool (0x73af…9135
) the call shows that index 0 is crvUSD and index 1 is USDT.
Because EYWA and crvUSD do not share a direct NG pool, we aggregate their prices through USDT with the community contract CryptoFromPoolsWAgg.vy
(supports differing decimals).
pools
["0x6579758e9e85434450d638cfbea0f2fe79856dda", "0x73af1150f265419ef8a5db41908b700c32d49135"]
The first address is the EYWA/USDT pool, the second the crvUSD/USDT pool. Arbitrum L2 ExplorerArbitrum L2 Explorer
borrowed_ixs – [0,0]
because crvUSD
sits at index 0 in both pools.
coin index 0 - USDT
coin index 1 - EYWA
collateral_ixs – [1,1]
because EYWA
(or the collateral token) sits at index 1 in both pools.
coin index 0 - crvUSD
coin index 1 - USDT
agg – "0x44a4FdFb626Ce98e36396d491833606309520330"
(the official crvUSD price‑aggregator on Arbitrum). docs.curve.fi
We get the following values:
pools: ["0x6579758e9e85434450d638cfbea0f2fe79856dda","0x73af1150f265419ef8a5db41908b700c32d49135"]
borrowed_ixs: [0,0]
collateral_ixs: [1,1]
agg: "0x44a4FdFb626Ce98e36396d491833606309520330"
Click Transact in Remix and sign the transaction. You’ll see the transaction hash in the console.
Congratulations—your custom oracle is now deployed and verified!
Find your new oracle contract address in that transaction’s logs. On Etherscan/Arbiscan, open the oracle’s Contract → Read Contract page and call price()
.
Click the returned value to view it in standard decimal format and confirm the price is correct.
Думал на протяжении пары секунд
(only for markets deployed via the create
method)
Curve’s GitHub hosts many oracle contracts, each tuned for specific lending scenarios. Below is an English-language guide to the main oracle types, their use cases, selection principles, and key features.
Key resources
Multi-decimals aggregator (L2 example):
https://github.com/martinkrung/ape-oracle-deploy/blob/main/contracts/L2/CryptoFromPoolsWAgg.vy
Official Curve price-oracle contracts:
https://github.com/curvefi/curve-stablecoin/tree/master/contracts/price_oracles
Oracles based on Curve pools
CryptoFromPool.vy — the basic oracle that reads price directly from a Curve pool. Use when you have a native pool of your token against crvUSD.
CryptoFromPoolWAgg.vy — extends the basic oracle by routing price through a USD aggregator, rather than directly via crvUSD. Ideal when you need a USD-denominated reference.
Combined (multi-pool) oracles
CryptoFromPoolsRate.vy and CryptoFromPoolsRateWAgg.vy — aggregate prices across several pools in sequence. Perfect for tokens lacking a direct crvUSD pair.
L2-specialized oracles
Contracts in the L2/ folder (e.g., CryptoFromPoolsRateArbitrumWAgg.vy
) include logic for sequencer checks and other Layer 2 nuances on Arbitrum, Optimism, etc.
Yield-bearing tokens
CryptoWithStablePriceWstethN.vy — optimized for tokens like wstETH, which accrue yield internally.
Single-asset optimizations
CryptoWithStablePriceWBTC.vy — for WBTC
CryptoWithStablePriceTBTC.vy — for tBTC
CryptoWithStablePriceETH.vy — for ETH
External-feed integrations
ChainlinkWrapper.vy — wraps a Chainlink oracle for a single price feed.
CryptoWithStablePriceAndChainlink.vy — hybrid that merges Curve TWAP with Chainlink rate limits.
UniOracle.vy — uses Uniswap TWAP as its price source.
Standard crvUSD pair: if you have a native crvUSD/your_token
pool, use CryptoFromPool.vy (no manual deployment needed; supported by the factory).
No direct pool: use CryptoFromPoolsRateWAgg.vy to build a multi-hop price path through intermediate pools.
Layer 2 markets: pick the corresponding L2 oracle from the L2/ directory, such as CryptoFromPoolsRateArbitrumWAgg.vy
.
Yield-bearing tokens: choose a stored-rate oracle (e.g., CryptoWithStablePriceWstethN.vy) that accounts for token accrual.
Maximum safety: consider a hybrid TWAP+Chainlink solution (e.g., CryptoWithStablePriceAndChainlink.vy) to cap oracle deviations.
EMA smoothing: all Curve oracles use an Exponential Moving Average to dampen price swings and resist manipulation.
Flash-loan protection: built-in defences guard against rapid, one-block price attacks.
Decimal compatibility: for tokens with non-standard decimals (e.g. USDT’s 6 dp), use variants without stored-rate assumptions.
When selecting your oracle, also assess the liquidity depth of each underlying pool and its resilience to manipulation. For the latest best practices and assistance, reach out to the Curve development team.
Once your LlamaLend market is deployed you can attach a liquidity‑gauge so LP tokens earn CRV (and, optionally, extra incentives). The deployment flow depends on the network where the market lives.
The main‑net flow is a single call:
Open the Liquidity Gauge Factory contract on Ethereum.
Call deploy_gauge
, passing the address of the market’s LP‑token (that is, the LlamaLend market contract itself).
After the transaction confirms, the gauge immediately begins streaming CRV according to global inflation weights.
For Arbitrum, Optimism, Fraxtal and other non‑main‑net chains you need a two‑step “child + root” deployment.
Locate the network’s ChildLiquidityGaugeFactory
address.
Open the factory’s contract page and read gauge_factory
if you are unsure (Factory addresses are above in the text) .
In the factory UI choose deploy_child_gauge
— use variant #3 for a simple gauge or variant #4 if you want manager rights.
Parameters for both variants
_chain_id
— numeric chain‑ID (e.g. 42161 for Arbitrum).
_lp_token
— address of the LlamaLend market.
_salt
— any 32‑byte value; save it for step 2.
Additional field in variant #4
_manager
— your own address; gives you on‑chain permission to add or deposit extra rewards without a DAO vote.
Go to RootLiquidityGaugeFactory at 0xabC000d88f23Bb45525E447528DBF656A9D55bf5
.
Call deploy_gauge
(function #2).
payableAmount
→ 0
(no ETH required).
_chain_id
→ same ID you used above.
_salt
→ exactly the same 32‑byte value you passed to the child gauge.
Important: use the same wallet address and the same
_salt
for both calls; that ensures the child and root gauges share an identical address on their respective chains and link correctly.
_salt
Any 32‑byte hex string works, for example:
Store it securely—you will need it if you ever redeploy.
_manager
addressSetting _manager
to your wallet lets you:
call add_reward
to whitelist new reward tokens,
use deposit_reward_token
to fund those tokens,
change other gauge parameters without a full Curve DAO vote. )
Choosing variant #4 with your own manager address is therefore recommended for markets that may later distribute extra incentives besides CRV.
After deployment the manager can at any time:
add third‑party reward tokens (add_reward
),
deposit those tokens (deposit_reward_token
).
When both gauges are active, submit a DAO proposal to list the gauge in the Gauge Controller so that veCRV voters can assign inflation weight. See Curve’s governance portal for recent examples of such proposals.
Creating your own market on Curve LlamaLend requires thoughtful planning and technical know‑how, yet it unlocks powerful opportunities for projects and their users. We have seen that the full workflow breaks down into several critical steps:
Preparation & parameter tuning – this is the foundation of a safe market; always run historical simulations to set values such as A
, fee
, loan_discount
, and liquidation_discount
.
Building or selecting a Curve pool – serves as the backbone of a reliable price oracle.
Deploying a custom oracle when no direct crvUSD pool exists – lets you integrate practically any asset by chaining pools together.
Spinning up the market via OneWay Lending Factory – a single transaction creates all contracts needed for lending and liquidations.
Adding gauges – an optional, but highly effective, step that streams CRV rewards to liquidity providers.
A market’s safety and efficiency depend directly on the chosen parameters. Values like A
, fee
, loan_discount
, and liquidation_discount
determine liquidation behaviour, while the borrow‑rate band (min_borrow_rate
and max_borrow_rate
) shapes the market’s economic incentives.
Although some phases are technically involved, Curve’s permissionless model and open‑source tooling make custom lending markets accessible to a broad range of teams. resources.curve.fi Once your market is live, continuous monitoring is essential: utilisation, liquidity depth, and oracle health all need periodic checks to keep the market resilient throughout its life‑cycle.
By following these guidelines, projects can safely integrate their token into one of DeFi’s most battle‑tested ecosystems and offer users sustainable, CRV‑boosted yields.