Owna-DEX (AMM)
AMM-based decentralized exchange for property tokens with isolated pricing and property owner management
Core Value Proposition
Owna-DEX enables liquid secondary markets for real estate yield tokens through:
Isolated Pricing – Each property maintains independent price discovery
Dynamic Pricing – Constant Product AMM (x × y = k) responds to supply/demand
Instant Trading – Buy/sell anytime without waiting for fundraising periods
Fair Market Value – No centralized price manipulation
Property Owner Control ✨ NEW – Owners can withdraw/inject funds for operational needs
Note: Owna Finance provides two trading venues: Owna-DEX (AMM) for instant execution and Secondary Market (P2P Order Book) for custom pricing. This overview covers the AMM market.
How It Works
Constant Product AMM
k = reserveYRT × reserveUSDCWhen users trade, reserves change but k remains constant (after fees).
Example:
Initial Pool: 1000 YRT + 1000 USDC = 1,000,000 k
Price: 1 YRT = 1 USDC
User buys with 100 USDC:
→ New Reserves: 909 YRT + 1100 USDC
→ New Price: 1.21 USDC per YRT (+21%)
User sells 50 YRT:
→ New Reserves: 959 YRT + 1043 USDC
→ New Price: 1.09 USDC per YRT (-10%)Key Insight: Price automatically adjusts based on trading activity—no oracle needed.
Architecture
Isolated Pools Per Property
Each property has a unique YRT token and separate liquidity pool.
Benefits:
✓ Property A price immune to Property B trading
✓ Independent valuations
✓ Risk isolation
✓ Separate liquidity management
Smart Contracts
OwnaFactory
Pool deployment and management
Create new liquidity pools
Track all pools
Update fees and recipients
Set property owner for each pool ✨ NEW
Key Function:
function createPool(
address tokenA, // YRT token (unique per property)
address tokenB, // USDC or IDRX (shared)
string propertyName,
address propertyOwner // ✨ NEW: Owner who can withdraw/inject
) external returns (address pool)OwnaPool
AMM implementation
Constant Product formula
0.3% swap fee → Fee Recipient wallet
Dynamic pricing
LP token issuance
Property owner operations ✨ NEW
Core Operations:
mint()– Add liquidity, receive LP tokensburn()– Remove liquidity, redeem tokensswap()– Trade tokens, pay 0.3% feeownerWithdrawStable()✨ NEW – Property owner withdraws USDC/IDRX for operationsownerInjectStable()✨ NEW – Property owner injects USDC/IDRX to boost YRT price
OwnaRouter
User interface for all operations
Simplifies interactions with pools through helper functions.
Key Functions:
// Add Liquidity
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin, // Slippage protection
uint amountBMin, // Slippage protection
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity)
// Remove Liquidity
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB)
// Swap Tokens
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin, // Slippage protection
address[] path, // [USDC, YRT] or [YRT, USDC]
address to,
uint deadline
) external returns (uint[] amounts)
// Price Calculation
function getAmountsOut(
uint amountIn,
address[] path
) external view returns (uint[] amounts)User Flows
Property Owner: Pool Setup
Steps:
Create YRT token via YRTFactory
Create pool in Owna-DEX
Add initial liquidity (sets starting price)
Users can now trade
Trader: Buy YRT
Steps:
Check expected output (price preview)
Approve USDC spend
Execute swap
Receive YRT tokens
Hold for automatic yield distribution
Key Features
For Property Owners
✓ Initial Price Setting Set price via liquidity ratio:
Add 1000 YRT + 500 USDC = 0.5 USDC per YRT
Add 1000 YRT + 2000 USDC = 2 USDC per YRT✓ Fee Collection Earn 0.3% on all swaps in your property's pool
✓ Supply Expansion Mint additional YRT tokens for business growth:
factory.mintTokens(seriesId, owner, 500e18)
// New tokens tradeable immediately✓ Liquidity Management ✨ NEW Control pool liquidity for operational needs:
// Withdraw USDC for property operations
pool.ownerWithdrawStable(50000e18, treasuryAddress)
// Effect: Decreases USDC reserve → YRT price decreases
// Inject USDC to boost YRT price
pool.ownerInjectStable(100000e18)
// Effect: Increases USDC reserve → YRT price increasesFor Traders
✓ Instant Liquidity Trade anytime—no waiting for fundraising periods
✓ Fair Pricing Market-determined prices via AMM algorithm
✓ Slippage Protection Set minimum output amounts to prevent price manipulation
✓ Portfolio Diversification Trade across multiple properties easily
For Liquidity Providers
✓ Earn Trading Fees Receive 0.3% of all swaps
✓ Flexible Entry/Exit Add or remove liquidity anytime
✓ LP Tokens Tradeable proof of liquidity position
Deployed Contracts
Base Sepolia Testnet
OwnaFactory
0x1dC1CE24d956951a078aE0Dd61379A86c901E773
Create & manage pools
OwnaRouter
0x7C35348f8f249739e1ea5A1Ec7B6Ea2e15CBccD6
User interactions
Fee Recipient
0x77c4a1cD22005b67Eb9CcEaE7E9577188d7Bca82
Receives 0.3% fees
Deployment Details:
Version: v1.0 (First Release - Development Phase)
Deployed: October 2025
Test Coverage: 58/58 tests passing
Integration
Frontend Quick Start
import { useWriteContract, useReadContract } from 'wagmi'
import RouterABI from './abis/OwnaRouter.json'
// Read: Get expected output
const { data: amountsOut } = useReadContract({
address: '0x7C35348f8f249739e1ea5A1Ec7B6Ea2e15CBccD6', // Router
abi: RouterABI,
functionName: 'getAmountsOut',
args: [parseUnits('100', 18), [usdcAddress, yrtAddress]]
})
// Write: Execute swap
const { writeContract } = useWriteContract()
await writeContract({
address: '0x7C35348f8f249739e1ea5A1Ec7B6Ea2e15CBccD6', // Router
abi: RouterABI,
functionName: 'swapExactTokensForTokens',
args: [
parseUnits('100', 18), // amountIn
minAmountOut, // amountOutMin
[usdcAddress, yrtAddress], // path
userAddress,
deadline
]
})AMM vs Secondary Market
Owna Finance offers dual trading venues to maximize flexibility:
🏦 Owna-DEX (This Page)
Best for instant execution at market price
Execution
Instant (no counterparty needed)
Liquidity
Always available (trade against pool)
Pricing
Dynamic market price (AMM formula)
Fees
0.3% protocol fee
Slippage
Price impact on large orders
Best for
Small-medium trades, urgent execution
🤝 Secondary Market (Order Book)
Best for negotiated trades at custom prices
Execution
Requires counterparty match
Liquidity
Depends on order book depth
Pricing
Custom fixed price (maker sets)
Fees
0% protocol fee
Slippage
Zero (exact price execution)
Best for
Large trades, limit orders, OTC deals
→ See Secondary Market Documentation
When to Use Each
Choose DEX (AMM):
✓ Need immediate execution
✓ Trade size < $10,000
✓ Accept current market price
✓ High-frequency trading
Choose Secondary Market:
✓ Large block trades (> $50,000)
✓ Want custom pricing
✓ Can wait for counterparty
✓ Minimize fees (0% vs 0.3%)Smart traders use both venues to optimize execution across different trade sizes and urgency levels.
Built with Foundry ⚡ Deployed on Base 🔵
Last updated
