-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
💡 Create the Vault Contract
📝 Description
- The vault contract is the major contract that will be investing in the yield source. it is going to have an ERC20 component that will make it still act as a token. each deployed vault will be attach to a particular that will be used as the investment token in the yield source. Any deposit made to the vault will be redirect to the yield source with the vault contract being the owner. That way, the investment amount piles in the yield source thereby increasing the yield that will be used for the price. The vault will also have pausable component, ownable component, reentrancy guard component and VRF component (for random numbers).
🔢 Features
- ERC20 - integrate ERC20 components
- Ownable - Integrate Ownable component
- Pausable- Integrate Pausable component
- Rentrancy guard - Integreate rentrancy component
- integrate Ekubo Interface
- deposit entrypoint - this should mint shares aka vault token for the user depositing
- withdrawal entrypoint - this should burn the shares from the user depositing
- constructor - (token (yield source token), yield source contract address, )
- use IERC20 interface metadata implementation to generate the name of the vault token using the name of the token of the yield source token in the constructor function
- initialize the token and owner of the vault in the constructor
- Draw entrypoint for making price draw from the yield and awarding it to users that has vault token shares
- entrypoint to get all address that has vault token shares
- view function to view the yield generated. this will interact with ekubo interface
- Create storage variant for storing the winners
- Create entrypoint for checking an address win history
- Events (UserDepositedEvent, UserWithdrawalEvent, PriceDrawEvent)
- Private function to randomize user for draw or alternate sort the highest deposit users, get the first half and randomizes them.
✅ Acceptance Criteria
- All Test Passes
- All Features tests accounted for
Reactions are currently unavailable