Using the app
Provide liquidity
The pool is the house: it takes the other side of every trade. Deposit USDC on the /pool page and the pool mints you cUSDC-LP, a native Hedera token. Redeem it later for your share of the pool.

The share token#
cUSDC-LP (0.0.10833090(opens in a new tab) on testnet) is a Hedera Token Service token with 6 decimals. The pool contract created it with createShareToken() and is its treasury and only supply key, so only the pool can mint or burn it. It shows up in any Hedera wallet and on HashScan like any other token.
The top of the page shows Pool value (what all shares are worth together), Share price (what one cUSDC-LP redeems for), Free to withdraw and Backing open positions.
Deposit USDC#
The deposit form lists the steps your account still needs and runs them in order. Steps you have already done are skipped.
Associate your account with USDC
A Hedera account must be associated with a token before it can hold it. The app calls the token's HIP-719
associate().Associate with cUSDC-LP so you can receive shares
The same call on the share token. Without it the pool's transfer fails with
LiquidityPool__HtsFailed(184)(TOKEN_NOT_ASSOCIATED_TO_ACCOUNT).Approve USDC
Lets the pool take the amount you entered.
Deposit
deposit(assets, receiver)pulls your USDC, mints shares and sends them to you. The form shows You get about frompreviewDepositbefore you sign.
On chain: a 361.79 USDC deposit and its mint (0x55d081b2…54d722(opens in a new tab)). The very first deposit into an empty pool also mints 1,000 shares (0.001 USDC) to the pool that can never be redeemed, so the share price can't be inflated by a donation.
Deposit with HBAR#
HbarDepositZap (0xdD40EBFf…Ef185C(opens in a new tab) on testnet) lets an LP deposit with HBAR alone. One call swaps the HBAR to USDC on SaucerSwap and deposits it with you as the receiver, so the shares land in your account in the same transaction. The zap holds nothing between calls and needs no rights on the pool.
- Oracle floor. The swap must return at least the HBAR's oracle value less 3% (and at least your own
minUsdc), so a pushed or thin SaucerSwap pool can't short-change you. It needs anOkprice. - Association. You must be associated with cUSDC-LP, as for any deposit.
On /pool, set Pay with to HBAR via SaucerSwap, enter the HBAR to swap and deposit, and confirm: the app quotes the swap, applies your slippage, and calls the zap. From your own code, call it directly:
function quote(uint256 hbar) external view returns (uint256); // USDC SaucerSwap gives now
function oracleFloor(uint256 hbar) public view returns (uint256); // least USDC the swap may return
function depositWithHbar(uint256 minUsdc) external payable returns (uint256 shares);On chain: 0.5 ℏ swapped to 1.12 USDC and deposited, 1,114,696 cUSDC-LP minted to the caller (0x3c23d3b3…6ca098(opens in a new tab)). yarn custos:deploy:testnet creates a zap next to your HBAR-USD pool, and yarn custos:start:testnet associates it with USDC. To add one to an existing deployment, run yarn workspace @sh/foundry custos zap.
Withdraw#
Pick Withdraw by USDC amount (calls withdraw(assets, receiver)) or Shares (calls redeem(shares, receiver)). Either way you first approve the pool on cUSDC-LP; the pool pulls the shares and burns them, then sends you USDC. You must be associated with USDC to receive it.
On chain: 10 cUSDC-LP redeemed and burned (0x90487242…2d7422(opens in a new tab)).
| Limit | Why | Error |
|---|---|---|
| Withdrawals stop at twice the open interest | The pool keeps 2 × open interest so winners always get paid. What's left is Free to withdraw. | LiquidityPool__ExceedsMax |
| Deposits and withdrawals pause while positions are open and the price isn't Ok | Shares are never priced at a bad price. They reopen when the feeds check out. | LiquidityPool__NoPrice |
maxWithdraw(owner) and maxRedeem(owner) give the most you can take out right now; the form's Max uses them.
How shares are priced#
The pool is worth its USDC minus what traders are up on open positions, or plus what they are down, net of funding. Funding is brought up to date before every deposit and withdrawal. Without this, anyone could deposit just before a loss or liquidation lands in the pool and withdraw just after, taking most of it.
Where the pool's money comes from#
The Where the pool's money comes from card on /pool rebuilds the pool's history from every PerpMarket and LiquidityPool event on the mirror node:
| Line | What it is |
|---|---|
| Trading fees | 0.1% of notional on every open and every close |
| Liquidations | All collateral of positions that fell under margin (less 0.5% if a person liquidated) |
| Settled trades | Trader losses minus trader profits, funding included |
| Keeper fees | Spare USDC swapped to HBAR so Hedera keeps running the checks (refuel) |
Risks#
- Traders can win. The pool pays every profit. Each gain is capped at the position's entry notional and open interest at 50% of the pool, which bounds it, but LPs can lose money.
- Oracle lag. Chainlink and Supra push on deviation or heartbeat, so the market can trade on a price minutes old. The 300 s minimum hold and the 0.1% fees blunt this; they don't remove it.
- Locked while prices are bad. With positions open and a stale or deviated price, you can't deposit or withdraw until the feeds recover.
- Part of your share can be tied up. Withdrawals stop at twice the open interest; it frees up as traders close.
- The pool pays the keeper. Where SaucerSwap tracks the oracle, refuels spend up to 50 USDC of free pool USDC at a time. On testnet they fail closed and the keeper is funded by hand.
- Valuation is approximate past the caps. The pool's value ignores the per-position gain cap and loss floor; it is exact until a position passes +100% or zero equity.