Problem
Currently wallet PDA is the main address to store SOL and tokens, and the associated keypair is used for signing and paying for all the transactions. We want to build a mechanism so that keypair will get reimbursed by PDA if it does not have enough balance to sign for transactions.
Approach:
We set a MIN_KEYPAIR_BALANCE of 0.1 SOL and if the current balance goes below that, we will transfer to keypair from PDA so that it reaches REFILL_BALANCE of 0.2 SOL. The 0.1 SOL is a standard adapted for most wallets and ensures all transactions will be paid and signed smoothly.
Problem Currently wallet PDA is the main address to store SOL and tokens, and the associated keypair is used for signing and paying for all the transactions. We want to build a mechanism so that keypair will get reimbursed by PDA if it does not have enough balance to sign for transactions.
Approach: We set a MIN_KEYPAIR_BALANCE of 0.1 SOL and if the current balance goes below that, we will transfer to keypair from PDA so that it reaches REFILL_BALANCE of 0.2 SOL. The 0.1 SOL is a standard adapted for most wallets and ensures all transactions will be paid and signed smoothly.