radFi Actions Flowchart
Last updated
Last updated
Frontend (FE)
User interface for sending actions and signing transactions.
RadFi Backend (BE)
Processes requests, generates PSBTs, and handles transaction broadcasting.
Pending State Contract
Temporary contract validating transactions before final submission.
Validator
Ensures transaction validity before sending it to the Main State Contract.
Main State Contract
Stores finalized transactions after validation.
Bitcoin Chain
Bitcoin mainnet where transactions are permanently recorded on-chain.
Database (DB)
Stores transaction-related data for tracking and verification.
1. Fetch Pool and Ratio Data
The FE retrieves pool and ratio data from the user.
2. User Action Request
The user initiates an action via the FE, which sends a request to the RadFi BE.
3. Generate PSBT (Partially Signed Bitcoin Transaction)
The BE creates a PSBT and sends it back to the FE for user signing.
4. User Signs PSBT
The user signs the PSBT and returns it to the BE.
5. Broadcast Signed Transaction to Pending State Contract
The BE broadcasts the signed transaction to the Pending State Contract.
6. Transaction Validation
The Pending State Contract processes the transaction and returns a success/failure status.
7. Notify Frontend
The BE relays the transaction success/failure result back to the FE.
8. Validator Processing
If the transaction is successful, the BE sends the signed transaction to the Validator for final verification.
9. Broadcast Final Transaction to Main State Contract
The Validator broadcasts the final transaction to the Main State Contract.
10. Transaction Finalization on Bitcoin Mainnet
The Validator broadcasts the fully signed transaction to Bitcoin mainnet, completing the process.