yAxis is happy to announce a vault strategy development bounty! If you create a strategy that is accepted into the yAxis protocol, you’ll get paid in YAX! However, our standards are very high. If you’re a Solidity developer, read on…
What are strategies?
Strategies are smart contracts that receive deposits from users and put those funds to work in a pool or external vault. A strategy’s implementation largely depends on the pool that it's written for. A strategy should usually farm the pool’s specific token then swap it for more tokens to deposit, compounding the interest of the depositors’ funds. However, this could change depending on what the strategy is written for.
If you have specific domain knowledge of a project that produces yield for its depositing users, and you have experience with Solidity, you are likely the best person able to write a strategy for that project to be used by yAxis! The hardest part about writing a strategy is learning how that external project works. Within the yAxis ecosystem, we’ve made it as easy as possible to turn that knowledge into something that creates value.
Strategies should be written for projects that accept stablecoins as deposits. Currently, our vault supports the 3pool tokens on Curve.fi (DAI, USDC, USDT, and 3CRV), so those should be the initial focus. As we create more vaults that support different types of assets, this bounty program will naturally expand to those assets as well.
How to create a yAxis strategy
Creating a strategy for yAxis vaults is easy! We have a guide for creating strategies on our wiki. All strategies should inherit the BaseStrategy abstract contract. The BaseStrategy gives a functionality and security foundation to build off of. Your strategy does not need to (nor should it) implement any external state-changing functions.
A strategy only needs to implement (and override) the following internal functions:
function _deposit() internal virtual;
function _harvest() internal virtual;
function _withdraw(uint256 _amount) internal virtual;
function _withdrawAll() internal virtual;
function balanceOfPool() public view override virtual returns (uint256);
The BaseStrategy handles permissions for which addresses can call external state-changing functions, as well as the details around swapping different “want” tokens. This ensures that each strategy is managed by specific addresses (instead of the deployer) and that all strategies have compatible functions since multiple strategies will be used simultaneously.
We have a standard test suite that is used by all strategies. All you would have to write is the deployment of the strategy and its related mocks, then create a new test file by copying an existing strategy test file and update the deployment details specific to your strategy. The same tests should pass for every strategy.
In order for your strategy to be accepted (and for you to receive the bounty payment), the following criteria must be met:
- Strategy inherits BaseStrategy
- Strategy has no external state-changing functions
- Pull request includes functional mocks for the external pool
- Pull request includes a deployment script
- Standard test suite passes on the strategy
Once the above is created, make a pull request on our metavault repository on Github. We will review your code, offer suggestions and request changes, then once your pull request is merged you’ll be eligible for payment.
Please also check the existing strategies to make sure that we don't already have one for the project you're wanting to build for.
Creators of accepted strategies will be given 1000 YAX per strategy. We’re looking to grow the ecosystem and incentivize developers to participate. Getting more developers’ eyes on our project also ensures the safety and maintainability of our code. Developers should also review our security policy for additional security-related bounties.
Questions are welcome on Discord; We've set up a channel just for you.
The yAxis and MetaVault team