I want to write a timelock contract that the user can set a spend percentage for.
- connect wallet
- the user enters the recipient address
- sets time lock for x amount of seconds (or whatever time unit)
- user sets 75% of the available token balance when timelock ends
- approve transaction
So lets say the user has a 100 token balance when they submit the transaction, but then goes to spend some tokens, and now they have 10 tokens. When the transaction executes, it will send 75% of the 10 tokens instead of trying to send 75% of 100 tokens.
Is this possible?