Liquid Restaking Tokens (LRTs)
Karak's simple design makes it easy to build an liquid restaking token (LRT) on top of it.
Recommended design
We recommend that LRTs deploy a vault contract, like BoringVault, to accept external deposits. This vault contract can issue a receipt token to depositors, who can then use them as LRT tokens. Underneath, the admin can tell the vault to deposit assets into different operator vaults depending on their risk profile. Admins can also rebalance, withdraw, and harvest rewards on behalf of their depositors. We also recommend making the LRT vault contract upgradeable or enable the admin to call arbitrary functions so that rewards and migrations can be handled.
Handling rewards
As described here, rewards are distributed by the DSS themselves without involvement of the core contracts. This means that the LRT contract will have to implement a function to claim rewards from the DSS or the operator.
Handling withdrawals
Withdraws on Karak are asynchronous, which means that the user can request a withdraw, but the withdraw will only be processed after the waiting period. This means that the LRT vault contract would have to implement a withdraw queue to handle withdraw requests.