As you remember, we are dealing with external contracts, which are by the way written on Vyper. In order to interact with them, we need to create some interfaces. It is not the hardest job to perform: You just need to look closely at original contracts and pick up the methods you will call.
1. We will start with the Deposit contract. We need methods to move money in and out, and some view interfaces (for example, to see the registered coins and their Y-analogs).
2. The same method applies to the Swap contract (which, as you remember, performs actual minting of LP tokens for the user).
3. Now we have the main DAO contract — liquidity Gauge. It performs complex functionality but we need mostly the methods for checkpoints creation and view interface for minter and CRV-token addresses.
4. And there is the last Curve contract left (and the easiest one from the interface point of view) — the Minter. Actually, we need only the minter method itself and the one to see the available reward amount.
5. The last but not least interface we need is the YToken interface, since we are working with Curve’s Y-pool. It is a simple ERC20 interface with few additional methods.
Now we are ready to create some code to interact with this protocol.