Set Protocol v2
Set Protocol v2 is an EVM-based protocol developed by Set Labs that enables asset management strategies by translating them into ERC20 tokens. It has historically been the primary platform for Index Coop products, as Set Labs is a founding member of the DAO.
The following Index Coop products have been deployed on Set Protocol v2:
Set Protocol v2 employs a modular architecture comprised of core contracts, modules, adapters, and ancillary contracts. Product-specific contracts (like SetToken, BaseManagerv2, FeeSplitExtension) rely on general-purpose contracts and resources (like DebtIssuanceModuleV2, StreamingFeeModule, IntegrationRegistry) for complete functionality. The following sections outline contracts currently used by Index Coop products; however, not all contracts included in the Set Documentation are used by Index Coop products.
Core Contracts
perform critical functions for the protocol like verifying permissions and enabling general-purpose resources
Contract
Description
Link
SetToken
ERC20 Token contract that allows privileged modules to make modifications to its positions and invoke function calls; deployed on a per-product basis
BaseManagerV2
Manager contract that contains permissions and administrative functionality for a SetToken; deployed on a per-product basis
BaseManager
Manager contract that contains permissions and administrative functionality for a SetToken; deployed on a per-product basis
ICManager
Manager contract that contains permissions and administrative functionality for a SetToken; deployed on a per-product basis
SetTokenCreator
Factory contract that is enabled by the controller to create and register new SetTokens
Controller
contract that registers protocol contracts such as products, modules, factories, price oracles, and other resources
IntegrationRegistry
contract that holds state relating to modules and the integrations they are connected with
PriceOracle
contract that returns the price for any given asset pair; price is retrieved either directly from an oracle, calculated using common asset pairs, or uses external data to calculate price
* source code linked for contracts that may have many different instances on-chain
Modules
extend setToken functionality by adding fees, enabling composability, and accessing DeFi services; modules can be considered general purpose, or usable by multiple products at once
Module
Description
Link
BasicIssuanceModule
enables issuance and redemption functionality on a SetToken for default-only positions
DebtIssuanceModuleV2
enables users to issue and redeem SetTokens that contain default and external positions, including–but not limited to–debt positions
DebtIssuanceModuleV1
enables users to issue and redeem SetTokens that contain default and external positions, including–but not limited to–debt positions
AaveLeverageModule
enables management of collateralized debt positions in Aave v2; it is paired with a Debt Issuance Module that will call functions on this module to keep interest accrual and liquidation state updated
CompoundLeverageModule
Enables management of collateralized debt positions in Compound v2; it is paired with a Debt Issuance Module that will call functions on this module to keep interest accrual and liquidation state updated
TradeModule
enables SetTokens to perform atomic trades using DEXs or DEX aggregators; integration mappings are stored on the IntegrationRegistry contract
StreamingFeeModule
accrues streaming fees for managers; streaming fees are denominated as percent per year and realized as inflation rewarded to the manager
GovernanceModule
enables participation in governance of component tokens held in the SetToke; examples include Compound, Uniswap, and Maker
WrapModule
enables the wrapping of ERC20 and ETH positions via third party protocols; works in conjunction with WrapAdapters
AirdropModule
enables manager to absorb tokens sent to the SetToken into the token's positions
Adapters & Extensions
interface with external protocols and used by modules to gather and validate transaction parameters
Adapter
Description
Link
Curve stETH Exchange Adapter
Exchange Adapter for Curve specialized for stETH/ETH exchange contracts
AMM Splitter Exchange Adapter
Exchange Adapter that splits trades efficiently between Uniswap V2 and Sushiswap
Aave Governance Adapter
Governance Adapter for Aave that returns data for voting, delegating, and creating proposals
Compound Governance Adapter
Governance Adapter for Compound that returns data for voting, delegating, and creating proposals
Uniswap Governance Adapter
Governance Adapter for Uniswap that returns data for voting, delegating, and creating proposals
Fee Split Extension
Smart Contract Extension that allows for splitting and setting streaming, mint, and redeem fees; deployed on a per-product basis
Compound Leverage Strategy Extension
Smart Contract Extension that enables automated management of leverage tokens and pairs with the Compound Leverage Module; deployed on a per-product basis
Aave Leverage Strategy Extension
Smart Contract Extension that enables automated management of leverage tokens and pairs with the Aave Leverage Module; deployed on a per-product basis
Airdrop Extension
Smart Contract Extension that enables a manager to claim incentives accrued to a SetToken contract; pairs with the AirdropModule
General Index Module Extension
Smart Contract Extension that acts as a pass-through contract for interacting with the GeneralIndexModule
* source code linked for contracts that may have many different instances on-chain
Ancillary Contracts
built on top off and/or used in conjunction with protocol contracts
Contract
Description
Link
Supply Cap Issuance Hook
Issuance Hook that checks a new issuance won't push SetToken totalSupply over defined supply cap; deployed on a per-product basis
0x Flash Mint
Contract that swaps an input token for proportional components of an index and issues said index token in an atomic fashion via exchange issuance
Leveraged Flash Mint
Contract that enables exchange issuance and redemption for leveraged SetTokens
* source code linked for contracts that may have many different instances on-chain
All Core Contracts or Modules have been audited by security professionals prior to deployment, and Adapters and Ancillary Contracts undergo rigorous testing before being enabled as well. Excerpt from Set Protocol documentation:
“Security of our system is of the utmost importance to us. We recognize the complexity of the protocol, the difficulties in deploying issue-free software, and the responsibility of maintaining a value-bearing protocol. Therefore, we’ve made a considerable effort to ensure the system has been reviewed by top security firms and heavily scrutinized line by line internally…
Our Set Protocol contracts repo has 100% line and branch coverage over the span of over 840+ unit, integration and simulation tests. Every line of smart contract code for Set Protocol is open source, and we encourage technical community members to review and verify our code. For more information on our system, view the Litepaper.”
More information on auditors and audit reports can be found on the Security page. Source code for all Set Protocol v2 and Index Coop contracts can be found in the following GitHub repositories:
Additional information about contracts and capabilities can be found in the official Set Protocol v2 Documentation. Not all Set Protocol v2 contracts support Index Coop products, but any contract that does support an Index Coop product will be documented here.
Last updated