Peg Docs

Risks

What can go wrong and what limits it.

A peg pool can pay out what buyers paid in

Sellers of a peg take SOL from the bins below the price, and that SOL comes from buyers. If the asset rises a lot after most buyers have bought, the pool holds less SOL than the peg tokens in circulation are worth, and late sellers fill at lower prices. Fees paid into the pool add to its SOL over time.

Price lag

Between updates, trades fill at the pool's last price. Updates go out when the price moves 0.3%, and the peg pool's 0.5% fee is larger than that gap, so trading the lag does not pay.

The price signer

The program trusts prices signed by one key, held on Peg's server. That key cannot withdraw anything, and the program limits each update to 400 bins and refuses stale or replayed prices; a wrong price can still move a pool within those limits until it is corrected.

Assets priced from their own pools

Assets without an exchange price follow their deepest pools on their home chain, and large trades there move them.

Smart contracts

The Peg program was tested against Meteora's mainnet programs on a local validator, including refusals of forged, stale, replayed and oversized prices. It has not had an external audit.