kevinxyc1 / krypton-extension

Apache License 2.0
0 stars 0 forks source link

feat: Keypair Reimbursement #8

Closed kevinxyc1 closed 1 year ago

kevinxyc1 commented 1 year ago

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.

harrisluo commented 1 year ago

漂亮 !!