Designed and written by Justin Bebis, Zokunei and Beirao, with help from Goober and the rest of the Byte Masons crew.
Reliquary is a smart contract system that is designed to improve outcomes of incentive distribution by giving users and developers fine grained control over their investments and rewards. It accomplishes this with the following features:
By binding tokens to a base emission rate you not only gain the advantage of a predictable emission curve, but you're able to get extremely creative with the Curve contracts you write. Whether this be a sigmoid curve, a square root curve, or a random curve, you can codify the user behaviors you'd like to promote.
Please reach out to zokunei@bytemasons.com to report bugs or other funky behavior. We will proceed with various stages of production testing in the coming weeks.
Maturity Evolution Curves: We have replaced the previous level evolution mechanism with curves to provide more flexibility and precision. The available curve options are:
Scalable 'Level' Number: The 'Level' number now scales with an O(1) complexity, ensuring consistent performance as the system grows.
Multi-Rewards with Rolling Rewarders: The V2 update now enables the possibility of multiple rewards with the rolling rewarders.
ABI Simplification: We have simplified ABI to streamline the interaction between the smart contracts and the user interface.
Gas Optimization: The V2 update brings a 20% reduction in gas consumption, resulting in lower transaction fees and improved efficiency.
Bug Fixes: We have addressed bugs identified in the previous version (see audit/ for more details).
Code Clean-up, Formatting, and Normalization: The codebase has undergone a thorough clean-up, formatting, and normalization process to improve readability and maintainability.
This is a Foundry project. Get Foundry from here.
Please run the following command in this project's root directory to enable pre-commit testing:
ln -s ../../pre-commit .git/hooks/pre-commit
mv .env.example .env
Fill your ETHERSCAN_API_KEY
in the .env
.
forge install
forge test
echidna test/echidna/ReliquaryProperties.sol --contract ReliquaryProperties --config test/echidna/config1_fast.yaml
x
x_
_x
MyContract
MyContract__ERROR_DESCRIPTION
myFunction()
_myFunction()
amount
."/**
* @dev Internal function called whenever a position's state needs to be modified.
* @param _amount Amount of poolToken to deposit/withdraw.
* @param _relicId The NFT ID of the position being updated.
* @param _kind Indicates whether tokens are being added to, or removed from, a pool.
* @param _harvestTo Address to send rewards to (zero address if harvest should not be performed).
* @return poolId_ Pool ID of the given position.
* @return received_ Amount of reward token dispensed to `_harvestTo` on harvest.
*/
Please use forge fmt
before commiting.