project screenshot 1
project screenshot 2

Instadapp PoolTogether Connector

Using Instadapp to create a connector to PoolTogether to deposit and withdraw from a pool. On github branch pooltogether-connector

Instadapp PoolTogether Connector

Created At

HackMoney 2021

Project Description

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.

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.

background image mobile

Join the mailing list

Get the latest news and updates