Yield modes on Blast L2 #802
Replies: 4 comments 7 replies
-
Thanks for this research and for sharing it, @smol-ninja. This is a perfect summary. It seems obvious to me that we should go with the "Claimable" approach. Even with an ERC-20 recovery mechanism, there are advantages to claiming separately, such as easier accounting, segregation of funds (Sablier Labs' yield is separated from user funds), and better developer experience overall (fewer txs to index in the subgraph, etc.) |
Beta Was this translation helpful? Give feedback.
-
Here's a quote from the referenced guide:
Given the above, a fairly probable future for the dApps on Blast is to distribute all of their yields to their users. If this happens, not passing the yield down to our users could be perceived as "greedy"/bad PR. Have you considered this? In any case, it'd, probably, not be worth it to implement the reward-sharing into the Sablier contracts on Blast, given the added complexity and development/audit costs. Even with the possible "bad PR" 🙂 |
Beta Was this translation helpful? Give feedback.
-
Shall we close this, @smol-ninja? We're going with "Claimable". |
Beta Was this translation helpful? Give feedback.
-
Now I have more clarity about our requirements, I am re-opening this discussion to get answers on the following questions:
I have implemented necessary functions required to configure modes and to claim yield and gas in a base contract. You can find them in BlastGovernor.sol and IBlastGovernor.sol. My Suggestionsmainnet configuration for Lockup contractsFor ETH Gas, the ideal approach would be to configure it to Claimable mode and set a governor address. The governor address will have full control of configuration and claiming gas without requiring to interact with the Lockup contracts. Due to the contact size nearing its limit, we cannot configure it in the constructor. That means contracts will be deployed with default Void modes. Post-deployment, the admin can call this function to re-configure Gas to be claimable as well as set the governor address. This can also be automated by adding it to the deployment script. mainnet configuration for Merkle StreamerSince Merkle streamer contract size is way below the limit, we have the flexibility to set configurations in its constructor. When a user deploys a Merkle-streamer, we can initialize it with the below configurations:
Thoughts? |
Beta Was this translation helpful? Give feedback.
-
Blast is a new L2 with native yield for ETH and stablecoins. Every token bridged to Blast automatically gets staked to earn yield. There are 3 approaches through which Blast allows smart contracts to handle yield rewards.
1. Void
By default, all smart contracts are subscribed to disabled yield mode. Any ETH or stablecoin deposited into that contract is excluded from earning yield. Any contract that is deployed on L1 can be directly deployed to Blast without making any change but that would also not allow the contract to re-configure the yield mode in the future.
2. Automatic
When a smart contract is subscribed to Automatic mode, any ETH or stablecoin deposited earns yield automatically. Blast uses the rebase approach to reflect yield in the balance.
For example, a smart contract has 10 ETH and after 24 hours, it earns 0.1 ETH, Blast will automatically change its balance from 10 ETH to 10.1 ETH. This is also reflected in ERC20's
balanceOf
.Since Sablier streams don't use
balanceOf
, it would require something similar to implementing a recovery mechanism in order to withdraw the excess yield amount added to its balance.3. Claimable
In this mode, a smart contract earns yield automatically without requiring its balance to rebase and accumulating yield separately. The governor address claims yield on behalf of the contract.
For example, if 10 ETH is deposited, the contract balance will remain at 10 ETH always. The accrued yield balance of 0.1 ETH can be claimed separately.
My remarks
Blast deployment doesn't require much work. We can deploy the contracts with Claimable mode in the beginning as it keep the yield separate from the main contract balance, and then later figure out what to do with the yield.
Links
Beta Was this translation helpful? Give feedback.
All reactions