https://github.com/symbioticfi/collateral
Symbiotic Collateral smart contracts
https://github.com/symbioticfi/collateral
collateral smart-contracts
Last synced: 8 months ago
JSON representation
Symbiotic Collateral smart contracts
- Host: GitHub
- URL: https://github.com/symbioticfi/collateral
- Owner: symbioticfi
- License: mit
- Created: 2024-04-17T12:47:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-28T07:55:10.000Z (over 1 year ago)
- Last Synced: 2025-01-28T08:30:55.304Z (over 1 year ago)
- Topics: collateral, smart-contracts
- Language: Solidity
- Homepage: https://symbiotic.fi/
- Size: 1.3 MB
- Stars: 39
- Watchers: 7
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audits/ChainSecurity_DefaultCollateral.pdf
Awesome Lists containing this project
README
**[Symbiotic Protocol](https://symbiotic.fi) is an extremely flexible and permissionless shared security system.**
This repository contains a Default Symbiotic Collateral implementation.
## Collateral
**Collateral** - a concept introduced by Symbiotic that brings capital efficiency and scale by allowing assets used to secure Symbiotic networks to be held outside the Symbiotic protocol itself, such as in DeFi positions on networks other than Ethereum.
Symbiotic achieves this by separating the ability to slash assets from the underlying asset, similar to how liquid staking tokens create tokenized representations of underlying staked positions. Technically, collateral positions in Symbiotic are ERC-20 tokens with extended functionality to handle slashing incidents if applicable. In other words, if the collateral token supports slashing, it should be possible to create a `Burner` responsible for properly burning the asset.
## Default Collateral
Default Collateral is a simple implementation of the collateral token. Technically, it's a wrapper over any ERC-20 token with additional slashing history functionality. This functionality is optional and not required in most cases.
The implementation can be found [here](./src/contracts/defaultCollateral).
## Security
Security audits can be found [here](./audits).
## Usage
### Env
Create `.env` file using a template:
```
ETH_RPC_URL=
ETH_RPC_URL_HOLESKY=
ETHERSCAN_API_KEY=
```
\* ETH_RPC_URL_HOLESKY is optional.
\* ETHERSCAN_API_KEY is optional.
### Build
```shell
forge build
```
### Test
```shell
forge test
```
### Format
```shell
forge fmt
```
### Gas Snapshots
```shell
forge snapshot
```