Architecture
Last updated
Last updated
Photon's solution mechanism is comprised of both on-chain and off-chain components:
On-chain components:
Custodial addresses and staking contracts on the native chains of the Bitcoin assets.
Smart contract on destination chains managing the processes of minting and redeeming of PBTC.
Off-chain components:
Services that manage the delta-neutral positions for deposited backing assets.
Oracles that are used to update and call the PBTC:BTC exchange rate based on calculations of net rewards.
User (Staker) sends a call to the pricing API to calculate the exchange rate, starting with a genesis price of 1:1.
User generates and signs an order for asset transfer.
User transfers or stakes Bitcoin assets to an MPC-secured custodial address or staking contract and initiates a mint request on the destination chain.
Photon system monitors and communicates deposit transactions to prepare for the incoming mint request. A set amount of PBTC to be issued is determined based the amount of staked Bitcoin assets.
After passing checks and validating the order, PBTC tokens are minted to the user's wallet on the destination chain using an atomic mint function.
Atomic mint refers to the simultaneous completion of the user's asset transfer to the custodial address or staking contract and the corresponding minting of PBTC within a single transaction. If any part of the process fails, the entire transaction is reverted.
User (Redeemer) sends call to the pricing API to calculate the exchange rate of the underlying Bitcoin assets.
User generates and signs an order to initiate a redeem request.
The redeem contract burns the PBTC token from the user's balance on the chain where the redeem request is made.
Photon system monitors the burn transaction and submits the transaction for the asset withdrawal request. A set amount of Bitcoin assets to credit to the user is determined based on the amount of redeemed PBTC.
After successful confirmation of the transaction, the withdrawal asset is processed and transferred to the user's withdrawal address atomically on their destination chain.
The burning of PBTC and the corresponding withdrawal transfer happen within a single transaction. If any part of the process fails, the entire transaction is reverted.