Synthetix Staking Connector
Anyone can create new connector for other protocol that we haven’t been integrated. Let’s take the Synthetix Staking Connector as example https://github.com/InstaDApp/dsa-connectors/blob/master/contracts/connectors/synthetix.sol. We have created deposit, withdraw and claimReward three functions.
Testing is critical for smart contract. But there’s issue with testing DSA account cast delegatecall with mainnet fork that it can’t connect to external contracts. That’s why our tests are using mock contracts https://github.com/gnosis/mock-contract for external protocols. And internal mock contract for passing the mock contract into our connector. You can take MockSyntheti.sol as example. https://github.com/InstaDApp/dsa-connectors/blob/master/contracts/tests/MockSynthetix.sol.
Remember to also check requirements
Anyone is welcome to create a PR to have the smart contract with test coverage for other protocol so that we can review and merge for more spells