Currently, I deploy a contract via a Factory contract for staking. Think of it like UniSwap pools without swapping, short term contracts that I want to destroy after their use is done. But I also want to reimburse the original stakers and distribute the rewards post staking. What is the logic I should be using here? The one idea I had was use a specific reimburse function - and then destroy the contract. Any better ideas?
1 Answer
In general it's much safer to let the users pull the rewards (and their stakes), instead of you pushing them.
I don't also see much point in destroying the contract. Just leave it there and users can come and claim their assets whenever they want - maybe tomorrow or maybe in 10 years.