-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Feature
0 / 10 of 1 issue completed
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
Update the GuardV0 smart contract to allow trading on Gains-compatible DEXes: Gains, Ostium.
- Do a manual trading cycle of deposit/open/increse position/decrease position/close/redeem to find out what methods are called for trading
- Alternatively check other Github repos that would have this information for Gains/Ostium like their unit test
- Brainstorm and learn what could be potential security issues if the trading account private key is compromised: e.g. can we whitelist trading pairs, withdrawal addresses or such.
- Add GuardV0 function "whitelistGainsTrading"
- Whitelists all required smart contract call sites to be able to trade on Gains-compatible protocol
- Create custom validators for Gains-smart contract calls that could be dangerous in the compromised asset manager private key situation
- Create an end-to-end test case that whitelisting work
- First figure out if we can do automated tests with mainnet fork or do we need to use testnet or even mainnet for testing this code
- Tests deploy a new new guard smart contract "SimpleVault"
- Tests must check the end-to-end path from 1) works and the vault can trade on Gains through all steps
- Tests must check that for any custom validation paths we need do in Guard smart contract, we check for the negative results: for example if we can check for whitelisted trading pairs or tokens, there must be a test to check that non-whitelisted token gives a revert from the guard smart contract
Sub-issues
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request