A browser-layer social protocol that turns every webpage into a multiplayer experience
Basement is a revolutionary social protocol that transforms every webpage into a living, breathing community space. Instead of sharing links and jumping to Discord or X to discuss, Basement brings the conversation directly to the content you care about.
- π§΅ Threaded Social Layer: Every webpage has its own Basement β a space where users can start threads, react, and discuss in-context
- π€ AI Gremlins: Context-aware agents that summarize pages, surface key threads, and ask smart follow-ups
- π° Reward Pools: Threads can carry reward pools in $BASEMENT tokens for top contributors
- π Basement Score: A persistent identity and reputation system tied to your contributions across the web
- π’ Brand Ownership: Pages can be claimed by brands to moderate discussions and deploy branded AI Gremlins
- πͺ Basement Portal: Central hub for purchasing $BASEMENT, viewing scores, and exploring trending spaces
Basement Core consists of a Solana program built with Anchor that provides the foundational smart contract infrastructure for the Basement protocol.
basement-core/
βββ src/
β βββ lib.rs # Main program entry point
β βββ state.rs # Program state definitions
β βββ instructions/ # Program instructions
β βββ initialize_basement_v0.rs
β βββ use_tokens_for_action_v0.rs
β βββ mint_tokens_v0.rs
β βββ update_basement_config_v0.rs
initialize_basement: Sets up the initial Basement state with token mint and authoritiesuse_tokens_for_action: Allows users to spend $BASEMENT tokens for social actions (comment, thread, boost, graffiti)mint_tokens: Mints new $BASEMENT tokens to specified recipientsupdate_basement_config: Updates program authorities and configuration
The program maintains a BasementStateV0 account that stores:
- Token Mint: The $BASEMENT token mint address
- Mint Authority: Authority to mint new tokens
- Action Authority: Authority to approve token spending actions
- Update Authority: Authority to update program configuration
- Node.js (v16 or higher)
- Yarn package manager
- Anchor CLI
- Solana CLI
-
Clone the repository
git clone https://github.com/basement-/basement-program-library.git cd basement-program-library -
Install dependencies
yarn install
-
Build Anchor dependencies
anchor run build-deps
-
Start local development network
anchor test --provider.cluster localnet --skip-deploy --skip-local-validator --skip-build -
Bootstrap the program
anchor run bootstrap --provider.cluster localnet
Run the test suite:
anchor testThe Basement SDK provides TypeScript/JavaScript bindings for interacting with the Basement Core program.
npm install @basement-core/basement-sdkimport { init } from "@basement-core/basement-sdk";
// Initialize connection to Basement Core
const basement = await init({
connection: connection,
wallet: wallet,
});
// Use tokens for social actions
await basement.useTokensForAction({
actionType: "comment",
amount: 1000000, // 1 $BASEMENT token (6 decimals)
});# Build all packages
yarn build
# Build in watch mode
yarn watch
# Clean build artifacts
yarn clean# Format code
yarn lint:fix
# Check formatting
yarn lint
# Rust formatting
cargo fmt
# Rust linting
cargo clippy --all-targets -- -D warnings# Version bump (patch/minor/major)
yarn versionup:patch
yarn versionup:minor
yarn versionup:major
# Publish packages
yarn release
# Publish canary release
yarn release:canaryBasement Core is designed with a multi-authority governance system:
- Mint Authority: Controls token supply and distribution
- Action Authority: Approves token spending for social actions
- Update Authority: Manages program configuration updates
This structure allows for flexible governance while maintaining security and decentralization.
We welcome contributions from the community! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
anchor test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Twitter: @basement_web
- Built with Anchor framework
- Powered by Solana blockchain
- Inspired by the vision of a more connected web
Made with β€οΈ by the Basement team