The Sense Protocol is a decentralized fixed-income protocol on Ethereum, allowing users to manage risk through fixed rates and future yield trading on existing yield bearing-assets.
Extensive documentation and use cases are available within this README and in the Sense docs here.
One way to interact with Sense is through our official app
Active development occurs in this repository, which means some contracts in it might not be production-ready. Proceed with caution.
* We are aware that the Name and Symbol does not include the Space LP Share. This will be fixed in the next version of Space.
Contract | Address |
---|---|
Divider | 0x240c7D23cfFB8438ad4fdF1a4FAcF47505A4A37f |
Periphery | 0xeEb84e2381f262e88EDB193665C017DBd965Af78 |
PoolManager | 0x57D69DF010C495aceb22D8433288C1C774Cbb77E |
BalancerVault | 0x968b38155b99B05b93c8aAF963127Fb128f812F4 |
This repo uses Foundry: forge for development and testing
and git submodules for dependency management (we previously used dapp
and nix
, so there are vestiges from those tools around).
To install Foundry Foundry: Forge, use the instructions in the linked repo.
In addition, this repo uses just as our command runner:
brew install just
# or
cargo install just
# Get contract dependencies
git submodule update --init --recursive
yarn isntall # or npm install
# Run local tests
just turbo-test-local
# Run mainnet fork tests
just turbo-test-mainnet
# Run linter
yarn lint
# Run formatter
yarn fix
This repo uses hardhat deploy for replicable deployments. To create a new deployment:
# Navigate to the `deployments` package
cd pkg/deployments
# Deploy the protcol with mocks on a forked network
yarn deploy:hardhat-fork:sim
# Deploy the protcol with production config on a forked network
yarn deploy:hardhat-fork:sim
# Deploy the protcol with mocks on a live network
yarn hardhat deploy --network <network> --tags scenario:simulated
# Deploy the protcol with production config on a live network
yarn hardhat deploy --network <network> --tags scenario:prod
- Create a local
.env
file in the root directory of this project - Set
ALCHEMY_KEY
to a valid Alchemy API key - Set
MNEMONIC
to a valid seed phrase for deployments
Sense-v1 has been audited by four, independent smart contract auditors, ranked by recency:
- 2022-02/03 Space AMM - Fixed Point Solutions (Kurt Barry)
- 2022-03 Sense - ABDK
- 2022-01 Sense & Space AMM - Spearbit
- 2021-11/12 Sense - Fixed Point Solutions (Kurt Barry)
- 2021-11 Sense - ABDK
- 2022-11 Sense - Peckshield
Sense has an active bug bounty on ImmuneFi, with up to $50,000 for reporting a bug in deployed contracts & the Sense Portal.
Right now, we are using dev
and main
branches.
main
represents the contracts live onmainnet
and all testnetsdev
is for the newest version of contracts, and is reserved for deployments togoerli
When a new version of the contracts makes its way through the testnet, it eventually becomes promoted in main
, with semver reflecting contract changes in the major
or minor
portion of the version (depending on backwards compatibility).