This project I created a PoolTogether Connector for the Instadapp Defi Smart Account (DSA). depositTo and withdrawInstantlyFrom are the two functions that the PoolTogether Connector can call. The two main things you'll need to use the functions is the Pool Together Prize pool address that you're joining and the controlledToken address that the Prize Pool is using. The controlledToken is the token that is minted and burned when you deposit and withdraw into the Prize pool.

Instadapp PoolTogether Connector showcase

How it's made

I used hardhat, alchemy, instadapp dsa-connectors repo, and pool together. The dsa-connectors had tons of code examples to follow, but I mainly followed the compound connector. Using the dsa-connector repo I created the pool together connector and created a test script to test it. Using hardhat and alchemy to fork mainnet helped out a lot as I could interact with the pooltogether and compound contracts without needing to deploy them myself since I believe the projects weren't deployed on the same testnets. Using the compound test script as a starting point, I modified it to use the pool together connector. First I got the depositTo function working, then I worked on the withdrawInstantlyFrom function. I just iterated and tested using the test script until I got it working.

Technologies used