Guardian Exec Contract
The exec contract is handling all the external communication with the CW20 Contracts and Stake Contracts for the corresponding asset class. It will be one instance for each guardian.
These are just the mandatory interfaces that are used from the Guardian Manager.
Config
There might be additional config parameters that depend on the collateral types...
InstantiateMsg
ExecuteMsg
ExecuteStrategy
Withdraws the token from any staking contract.
Logic:
If required collects rewards and distributes them to all borrowers, internally
unstake the recipe token to get the actual token (calculate amount based on unwind_amount provided)
split unstaked token into its elements if needed
repay loan
return reward tokens and element tokens not used to repay the loan to the borrower
Withdraw
Withdraw recipe token and return to the borrower
CollectRewards
If rewards are supported we need to collect them all from time to time and proportionally split them between all borrowers with this guardian internally
WithdrawRewards
Return proportional rewards to the borrower...do a last CollectRewards just before the Withdraw ?
QueryMsg
Config
ConfigReponse
TODO:
StakedRewards
StakedRewardsResponse
CollectedRewards
CollectedRewardsReponse
AllRewards
AllRewardsReponse
Last updated