Opening a Long
A long position profits when the token price goes up relative to USDC.
How it works
- You specify a USDC amount (your position size)
- The protocol takes a 5% open fee (3% to LP, 2% to protocol treasury)
- Synthetic (unbacked) airUsd is minted
- The synthetic airUsd is swapped through SWAP-2 for airToken tokens
- The airToken tokens are locked in the PositionNFT contract
- You receive a Position NFT representing your long
What's in your NFT
Your Position NFT holds:
- lockedAmount — airToken tokens locked as your position
- usdcIn — your original USDC position size
- airUsdMinted — the synthetic airUsd debt created at open (this is what you "owe" when closing)
- feesPaid — total fees paid at open
Slippage protection
You set a minAmountOut when opening. If the AMM would give you fewer airToken tokens than this minimum, the transaction reverts. This protects against front-running and large price moves.
Position caps
The LP may set caps on position size:
- maxPositionUsd — hard dollar cap per position
- maxPositionBps — soft cap as a percentage of pool TVL
If either cap is active and your position exceeds it, the transaction reverts.
Example
You open a long with 100 USDC on a RGOGLZ/USDC pool:
- 5 USDC fee taken (3 to LP, 2 to treasury)
- mints 100 synthetic airUsd
- Swapped for airToken → locked in your NFT
- If RGOGLZ price rises, your airToken is worth more airUsd when you close → profit