
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@0x/contracts-staking
Advanced tools
This package implements the stake-based liquidity incentives defined by ZEIP-31.
See the specification here.
The contracts can be found in contracts/src.
* Staking.sol | This is a stateless contract that encapsulates all the staking logic.
* StakingProxy.sol | This is a stateful contract that proxies into the Staking contract.
* ReadOnlyProxy.sol | This is a stateless contract the makes read-only calls from the Staking Proxy to the Staking Contract.
* fees/ | This contains mixins that implement the logic for 0x Protocol fees.
* immutable/ | This contains mixins that are generally immutable. Changing these files can result in catastrophic failures. Exercise extreme caution.
* interfaces/ | This contains interfaces used throughout the entire staking system.
* libs/ | This contains libraries used by the staking contract; for example, math and signature validation.
* stake/ | This contains mixins that implement the core staking logic.
* staking_pools/ | This contains mixins that implement logic for creating and managing staking pools.
* sys/ | This contains mixins that implement system-level functionality, like scheduling and finalization.
* vaults/ | This contains the vaults (like the Zrx Token Vault).
Install
npm install @0x/contracts-staking --save
We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the 0x Improvement Proposals (ZEIPs) repository and follow the contribution guidelines provided therein.
Please read our contribution guidelines before getting started.
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
yarn config set workspaces-experimental true
Then install dependencies
yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
PKG=@0x/contracts-staking yarn build
Or continuously rebuild on change:
PKG=@0x/contracts-staking yarn watch
yarn clean
yarn lint
yarn test
FAQs
Staking contracts used by 0x protocol
The npm package @0x/contracts-staking receives a total of 64 weekly downloads. As such, @0x/contracts-staking popularity was classified as not popular.
We found that @0x/contracts-staking demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.