LEASE

API reference

HTTP

RouteReturns
GET /api/health{ status, network, program, stage }; program is the mainnet program id
GET /api/token{ stage: "pre-launch", ca: null } until launch
GET /.well-known/lease.jsonProgram id and deployment status

Program instructions

InstructionArguments
create_poolbase_amount: u64, quote_amount: u64
add_liquiditymax_base: u64, max_quote: u64, min_shares: u64
remove_liquidityshares: u64, min_base: u64, min_quote: u64
claim_rentnone
swapamount_in: u64, min_out: u64, base_in: bool
bidrent: u64, deposit: u64, fee_ppm: u32
add_deposit / withdraw_depositamount: u64, queued: bool
set_feefee_ppm: u32
claim_bidder, poke, sweepnone
crank_burnamount: u64

Constants

NameValue
AUCTION_DELAY_SLOTS900 (20 in the local test build)
MIN_RENT_APR_BPS2,000 (rent floor: 20% a year of pool value)
SLOTS_PER_YEAR143,000,000 (0.22 s a slot)
RAISE_NUM / RAISE_DEN11 / 10
FEE_CAP_PPM30,000 (3%)
DEFAULT_FEE_PPM10,000 (1%)
WITHDRAW_FEE_PPM110
PROTOCOL_RENT_BPS1,000 (10%)
LOCKED_SHARES1,000
BURN_MAX_RESERVE_BPS10 (0.1%)
BURN_MIN_OUT_BPS9,800
BURN_TWAP_SECS1,800