Getting started
PAR is live on Solana mainnet: program 2JYLMvPgC3FmHd6RMZtLAYtjBXP5rPrKaY8aWXsunLeG, PAR mint ycTSMY4S5brqnSc3hQmfktFGyvXEtePAL2AcoxENySd. You can also run the whole protocol on a local validator from the repository.
What you need
| Tool | Version used by the repository |
|---|---|
| Rust + Solana CLI | Agave toolchain with cargo-build-sbf |
| Anchor | 0.30.1 |
| Node.js | 20 or newer |
| A wallet | Phantom, Solflare or Backpack |
Use the app
- Open the app from Launch app on the home page.
- Connect a wallet that holds jitoSOL or mSOL.
- Open a vault: choose how much collateral to lock, how much PAR to borrow, and your rate between 0.5% and 25%. The app shows your collateral ratio; it must stay at or above 120%, and the debt must be at least 200 PAR.
- Watch your place in the redemption line: troves at lower rates are redeemed before yours.
- To leave, repay the debt with Close vault and take all your collateral back.
Earn in the stability pool
- Hold PAR.
- Deposit it in the stability pool of a branch (jitoSOL or mSOL).
- Your deposit earns borrower interest as PAR and liquidated collateral as jitoSOL or mSOL.
- Withdraw any amount at any time; gains are paid out on every withdrawal.
Redeem PAR for one dollar of staked SOL
- Choose the branch whose collateral you want.
- Enter the PAR amount and the most you are willing to pay in fees.
- The app builds the list of lowest-rate buckets and troves for you and sends
redeem.
Build from source
git clone <repository>
cd engine
anchor buildThe program lives in programs/par. Constants are in programs/par/src/constants.rs; every number on this site comes from that file.
Run it locally
A local validator needs the real oracle and stake pool accounts, because the program reads them directly:
# fetch Pyth, Switchboard, Jito and Marinade accounts into tests/fixtures
python3 scripts/fetch-fixtures.py
# start a validator with the program and the fixtures loaded
solana-test-validator --reset \
--bpf-program target/deploy/par-keypair.json target/deploy/par.so \
--account-dir tests/fixturesinitialize refuses to run while the program has an upgrade authority, so a local run first makes the program immutable:
solana program set-upgrade-authority <PROGRAM_ID> --finalThen call initialize once and create_branch once per collateral mint.