Skip to main content
Shareland is a tokenized real estate exchange on Base (Ethereum L2). Users trade SQFT tokens — synthetic assets that track the $/sqft price of residential real estate in specific neighborhoods and cities. All trading happens on-chain through an AMM (automated market maker) with USDC as the settlement currency. This guide provides everything an AI agent or trading bot needs to execute trades programmatically.

Network & Chain

Token Details

Both USDC and SQFT tokens use 6 decimals. To convert a human-readable amount to on-chain units, multiply by 1e6. For example, $100 USDC = 100000000 (100 × 10^6).

Core Contract Addresses (Mainnet)

These are beacon addresses — the shared implementation layer. Each market has its own proxy contracts that point to these beacons.
You do not interact with the beacon addresses directly. Each market has its own proxy addresses. Use the API (below) to get the correct proxy address for the market you want to trade.

Discovering Markets

Call the public API to get all available markets and their per-market contract addresses. No authentication required.
Yes, it’s landBuskets — a portmanteau of “baskets” and “buckets.” The team couldn’t decide between the two, so we went with both. It’s intentional.
Each market in the response includes a contractAddresses object with the proxy addresses you need:
Key fields:
  • contractAddresses.market — the ShareLandMarket proxy you call purchase() and sell() on
  • contractAddresses.shareLandToken — the ERC-20 SQFT token for this market
  • contractAddresses.stableToken — USDC address
  • marketInfo.marketPrice — current price in USDC (6 decimals). Divide by 1e6 for human-readable $/sqft
  • marketInfo.paused — if true, the market is halted and trades will revert

Global Market Data

Returns aggregate volume, market cap, TVL, and transaction counts.

How to Buy SQFT Tokens

Trading on Shareland is a two-step process: approve USDC spending, then call purchase.

Step 1: Approve USDC

Before buying, you must approve the market contract to spend your USDC. Approve at least the amount you want to spend plus the 1.5% transaction fee.
  • spender = the market’s proxy address (contractAddresses.market)
  • amount = USDC amount to spend including fees. To be safe, approve usdcAmount * 10150 / 10000 or simply a large amount.

Step 2: Purchase

The simplest entry point — specify how much USDC to spend:
  • stableTokenAmount — USDC amount to spend (6 decimals). For example, 100000000 = $100 USDC.
  • The contract calculates how many SQFT tokens you receive based on the AMM bonding curve.
  • A 1.5% transaction fee is charged on top (deducted from your approved USDC).
With slippage protection (recommended for production bots):
  • minReceivedLandTokenAmount — minimum SQFT tokens you’re willing to accept. If the AMM would give you fewer, the transaction reverts.
By token amount (specify how many SQFT tokens you want):
  • landTokenAmount — exact number of SQFT tokens to buy (6 decimals).
  • The contract calculates the USDC cost. You must have approved enough USDC (cost + fees).

Events

A successful purchase emits:

How to Sell SQFT Tokens

No approval needed — the market contract has the TRANSFER_ROLE on the SQFT token and will transfer tokens from your wallet directly.
  • landTokenAmount — SQFT tokens to sell (6 decimals).
  • You receive USDC minus the 1.5% transaction fee.
With slippage protection:
  • minReceivedStableTokenAmount — minimum USDC you’re willing to accept. Reverts if you’d receive less.

Transaction Fees

A 1.5% fee is charged on every trade (buy and sell), denominated in USDC.
  • Buy: You pay usdcCost + fee. Fee = usdcCost × 150 / 10000.
  • Sell: You receive usdcProceeds - fee. Fee = usdcProceeds × 150 / 10000.
  • A minimum fee of $0.10 applies per transaction.
  • Fees go to the market’s liquidity providers.

Trade Limits

Markets may enforce per-wallet trade limits within rolling time epochs. Limits are configurable per market and may change over time.
  • Epoch period: a fixed time window (e.g., 24 hours)
  • Purchase limit: max USDC spent per epoch
  • Sell limit: max USDC received per epoch
  • Limits are tracked as a net amount (purchases minus sells)
If limits are set to 0, there are no restrictions. If your trade would exceed the limit, the transaction reverts with an error. You can query limits by reading the market contract’s public storage, but in practice, start with small trades to determine the current limits.

ABI for Trading

Minimal ABI needed for trading (JSON format):
Standard ERC-20 ABI for USDC approval and balance checks:

Code Examples

Using ethers.js

Common Mistakes

Do NOT use CollateralPosition for spot trading. The CollateralPosition contract (openCollateralPosition, closeCollateralPosition) is for borrowing/minting — it creates leveraged collateralized debt positions, not spot trades. If you want to simply buy or sell SQFT tokens, use ShareLandMarket.purchase() and ShareLandMarket.sell().

Advanced: Collateral Positions (Borrowing/Minting)

This section is for advanced agents only. Most trading bots should use purchase() and sell() above.
The CollateralPosition contract allows users to mint new SQFT tokens by locking USDC collateral, and burn them to reclaim collateral. This is a leveraged mechanism similar to a CDP (Collateralized Debt Position) in DeFi.
  • openCollateralPosition(uint256 landTokenAmount, uint256 stableTokenAmount) — lock USDC collateral, mint SQFT tokens
  • closeCollateralPosition() — burn minted tokens, reclaim collateral
  • adjustCollateralPosition(uint256 landTokenAmount, uint256 stableTokenAmount) — modify position size
These functions are gated by the actionAllowed modifier, which checks MarketFormula.isVerificationRequiredForCDP and MarketFormula.isWhiteListed(msg.sender). If CDP verification is required and your address is not whitelisted, these calls will revert.

Full Reference