regolith-labs / ore-pool

Infrastructure for operating an ORE mining pool.
https://ore.supply
14 stars 11 forks source link
solana

ORE Pool (beta)

Infrastructure for operating ORE mining pools.

Admin

Must cargo run the admin application before starting server.

1) Create the pool and member accounts on-chain which the server expects to exist upon starting. A member account is created because we need an account to write the pool commissions to. You can manage this member account (stake, claim, etc.) from the ore-cli.

COMMAND="init" RPC_URL="" KEYPAIR_PATH="" POOL_URL="" cargo run --release

2) Create the stake account for each boost you want to support. Users can open share accounts that represent proportional shares in the total stake of the pool (per boost account).

COMMAND="open-stake" MINT="" RPC_URL="" KEYPAIR_PATH="" cargo run --release

Server

There are many parameters that the server supports via env vars. Including which boost accounts to support. How often to attribute members. And the webhook configuration.

RPC_URL="" KEYPAIR_PATH="" DB_URL="" ATTR_EPOCH="60" STAKE_EPOCH="60" BOOST_ONE="" HELIUS_API_KEY="" HELIUS_AUTH_TOKEN="" HELIUS_WEBHOOK_ID="" HELIUS_WEBHOOK_URL="http://your-server.com/webhook/share-account" OPERATOR_COMMISSION="" STAKER_COMMISSION="" RUST_LOG=info cargo run --release

Webhook

The server depends on two helius webhooks. 1) One for tracking balance changes in the share/stake accounts. This is for proportionally attributing stakers in the pool. 2) The other is for tracking state changes to the proof account. This is for parsing the rewards (also for attribution).

Considerations

For now

Local database

To spin up the database locally:

docker-compose up