Currently, you are asked to approve token transfers each time you purchase a policy or fund a riskpool.
In DeFi it's pretty standard to give a high approval one time and use it many times afterwards.
This comes at a certain risk because in case of a smart contract exploit, users funds would be at risk.
Therefore I propose the following implementation:
The current approval is displayed somewhere on the page. If the approval is higher than the current token balance, the balance is displayed in warning color or with a warning hint.
Each time the user is asked for approval, a dialog offers the following three options:
Approve only the amount necessary for the next transaction
Approve the full current token balance
Approve an infinite amount, ie. maxInt
The user can select one of the options and then the approval is processed.
Currently, you are asked to approve token transfers each time you purchase a policy or fund a riskpool. In DeFi it's pretty standard to give a high approval one time and use it many times afterwards. This comes at a certain risk because in case of a smart contract exploit, users funds would be at risk. Therefore I propose the following implementation:
The user can select one of the options and then the approval is processed.