The bETH Custody contract is where supplied bETH collaterals are managed. Users can make collateral deposits and withdrawals to and from this contract. The Custody contract is also responsible for claiming bETH rewards and converting them to Terra stablecoins, which is then sent to the Overseer contract for eventual distribution.
Stores information about the bETH Custody contract's config.
Address of contract owner
Contract address of bETH Token
Contract address of Overseer
Contract address of Market
Contract address of bETH Reward
Contract address of Liquidation Contract
Native token denomination for stablecoin
bAsset token information
Stores information about a borrower.
Amount of bETH deposited as collateral
Amount of bETH that can be withdrawn (not locked in loan)
Withdraws accrued rewards from the bETH Reward contract, swaps rewards to the appropriate stablecoin denomination (stable_denom). Can only be issued by Overseer.
Afterwards, distributes swapped rewards to depositors by sending swapped rewards to Market. If the deposit rate during the last epoch is above the target deposit rate, then a portion of the rewards are set aside as a yield reserve, which are sent to Overseer.