This repo contains an implementation of Sense Space, a YieldSpace implementation with a native yield-bearing side and an oracle, on top of Balancer v2.
High-level notes and user journeys are available in the Sense docs here. Also, note that while the Sense protocol utilizes Space, only the Space Factory contains logic tying the two together. One could easily make another factory independent of Sense.
Chain | Address |
---|---|
Mainnet | 0x984682770f1EED90C00cd57B06b151EC12e7c51C |
Goerli | 0xfa1779ed7B384879D36d628564913f141ed930C4 |
This repo uses Foundry: forge for development and testing and git submodules for dependency management.
To install Foundry, use the instructions in the linked repo.
# Get contract dependencies
git submodule update --init --recursive
# Run tests
forge test
# Run tests with tracing enabled
forge test -vvv
# Get node dependencies
yarn install # or npm install
# Run linter
yarn lint
# Run formatter
yarn fix
# Deploy a SpaceFactory
forge create SpaceFactory --constructor-args \
<balancer_vault> <sense_divider> <timeshift> <fee_pts_in> <fee_pts_out> <oracle_enabled> \
--rpc-url <url> --private-key <key>
Sense Space contracts have gone through different independent security audits performed by Fixed Point Solutions (Kurt Barry) and Spearbit. Reports are located in the audits
directory.
Sense has an active bug bounty on ImmuneFi, with up to $50,000 for reporting a bug in deployed contracts & the Sense Portal.