Paul Razvan Berg, a longtime Solidity developer and co-founder of Sablier, discusses his influential open source repos, testing in Foundry, and the recently launched v2 of Sablier. He also talks about PRBProxy as a great update to Maker's DSProxy. They explore Layer 2 technology, math libraries, and the BTT model for testing smart contracts. They delve into formal verification, lock-up streaming, applications of Sablier, staking NFTs, and building lending protocols. A fascinating conversation!
Modifiers in test files can serve as visual cues to represent test conditions and hierarchy, providing a comprehensive testing framework.
Bull Oak is a CLI tool that automates Solidity test scaffolding based on the ASCII tree format, ensuring accurate reflection of test conditions.
Exploration of leveraging formal verification tools to validate the accuracy of modifiers in representing test conditions is ongoing.
Sablier V2 introduces lock-up streaming, custom payment curves, and non-linear streaming, providing more flexibility, control, and security for users.
Deep dives
Using modifiers to create a visual cue for test conditions
In the ERC talk, Paul Razvanberg discusses using modifiers as visual cues to represent the hierarchy of test conditions in a test file. These modifiers are applied to functions that correspond to specific paths in the tree structure created from an ASCII tree format. The modifiers serve as labels to indicate the conditions that need to be met for the test to pass. While the modifiers are primarily used as visual cues, they can also contain shared logic or specific setup for the corresponding test.
Automating the writing of tests using the ASCII tree format
Paul Razvanberg mentions a CLI tool called Bull Oak, developed by Alex Fertel, that automates the scaffolding of Solidity tests based on the ASCII tree format. This tool expands the modifiers in the test file and checks if they match the conditions specified in the tree files. By using this tool, developers can generate the test file structure and ensure that the modifiers accurately reflect the test conditions specified in the tree files.
Exploring the possibility of formal verification for modifiers
While the modifiers currently serve as visual cues and labels for test conditions, there is potential to further enhance their functionality. Paul Razvanberg considers the idea of leveraging formal verification tools to check the accuracy of the modifiers, ensuring that they accurately represent the test conditions specified in the tree format. While this idea is still an ongoing exploration, it could provide a more robust and automated way to validate the test conditions.
Using modifiers in invariant testing
Paul Razvanberg mentions the concept of using modifiers in invariant testing. While the current usage of modifiers in his approach is primarily for visual and organizational purposes, there is potential to further explore their functionality in the context of invariants. This would involve checking whether the modifiers accurately represent and enforce the invariants specified in the test files, creating a more comprehensive testing framework.
Saviour V2: Lock-up Streaming and Custom Payment Curves
Saviour V2 is a monitoring protocol that introduces lock-up streaming, allowing users to make one-time deposits in a smart contract and receive small streams of assets over time. The new version of Saviour includes the ability to create custom payment curves, such as backdated vesting or exponential rewards. These payment curves provide flexibility in distributing assets based on different parameters. Additionally, Saviour V2 introduces non-linear streaming and non-cancelable streams, offering users more control and security. Users can set up streams that cannot be revoked and transferable NFTs are used as on-chain descriptors for the streams.
PRB Proxy and Delegation Calls
PRB Proxy is a proxy contract deployed with Saviour V2 that allows EOAs to make delegate calls, enabling multiple interactions with different contracts within a single transaction. Unlike multi-call, which only supports read operations, PRB Proxy also allows write operations. It offers a more secure implementation compared to previous versions and does not have any storage vulnerabilities. PRB Proxy provides greater composability and flexibility for integrating with third-party contracts and creating more complex interactions within the Saviour protocol.
Health Drugs for Longevity
In the realm of longevity and healthspan, rapamycin and acarbose are two drugs that show promising results. Rapamycin inhibits mTOR, while acarbose lowers blood sugar levels after eating. The combination of these drugs has shown to increase lifespan and healthspan by 20-30% in some studies. It's important to consult with a knowledgeable healthcare professional before considering any longevity treatments or drugs. The interventions testing program offers rigorous testing and research on longevity drugs.
My guest today is Paul Razvan Berg. Paul is a longtime Solidity developer whose open source tools, including prb-math and prb-proxy, are integrated into many Ethereum contracts and protocols. Paul is also the co-founder and lead developer of Sablier, the token streaming protocol which launchced its v2 in July 2023.
On this episode, Paul and I go in-depth on three topics. First, we discuss a handful of his influential open source repos. Second, we talk about testing in Foundry and recap the Branch Tree Technique test writing framework that Paul presented at EthCC this year. Finally, we cover Sablier, its origins, and what's new in the recently launched v2. In the course of discussing Sablier, we also touch on PRBProxy, which is a new proxy implementation that Paul believes is a great update to Maker's DSProxy.
This was an excellent conversation and it was a pleasure learning from Paul, who is not only a brilliant and expert Solidity dev, but also a generous soul. I hope you enjoy the show.
As always, this show is provided for entertainment and education purposes only and does not constitute financial advice or any form of endorsement or suggestion. Crypto is risky and you alone are responsible for doing your research and making your own decisions.