GLIF Agent Website Tutorial Part I— Preparation Setup
Understand the main components of GLIF Agents, and get prepared to create an Agent on the GLIF website
In Part I of the GLIF Agent Setup Tutorial, we’re covering two topics:
- Understand the different components of GLIF Agents and the basics of how they work.
- Prepare to create an Agent on the GLIF website.
If you already understand the basics and you’re ready to get started creating your Agent on the website, you can skip Part I and go directly to Part II.
GLIF Agents — The Basics
- Agent — An Agent is a smart contract that borrows FIL from GLIF. You will deploy, own, and operate your Agent smart contract yourself (covered in Part II of the tutorial). In order to borrow FIL, your Agent needs collateral, which it gets by taking ownership of your Filecoin miner(s). A more detailed description of Agents can be found here.
- Agent owner wallet — The Agent’s owner wallet is the wallet that controls your Agent. Whoever is in control of your Agent’s owner wallet can operate your Agent. It is very important to keep the Agent’s owner wallet secure, which GLIF will help you do automatically.
When creating an Agent on the GLIF website, your Agent owner wallet will be a Filecoin multisig wallet with 3 signers. This is the most secure type of wallet you can use to own your Agent.
Multisig wallets
A multisig wallet is a smart contract wallet with multiple signing parties (“signers”) attached to it. Multisigs enforce a minimum number of signers to approve a specific proposal before executing the transaction. Multisig wallets have a proposal/approval flow where:
- One of the multisig signers submits a proposal to execute a transaction
- The other multisig signers must approve the proposal
- Once the minimum number of signatures have approved the proposal, the transaction executes
GLIF Agent Multisig Owner Wallet Configuration
Multisig wallets on Filecoin are generally very flexible in their configuration, however, GLIF recommends a specific, more secure configuration with 3 signers:
- Signer 1 — “the proposer” — is a Filecoin Snap wallet, also called “FILSnap wallet” (more on this in section 2)
- Signer 2 — “the approver” — is a Filecoin Ledger wallet
- Signer 3 — “backup” — is another (different) Filecoin ledger wallet
The GLIF Agent Multisig Owner Wallet is recommended to have a signing threshold of 2 — meaning, 2 signatures are required in order to execute a transaction. In other words:
- Signer 1 (“the proposer”) proposes a transaction to the Agent Multisig Owner Wallet to perform some action (like borrow FIL from GLIF)
- Signer 2 (“the approver”) approves the transaction proposed in step 1
- The transaction executes successfully
If you lose any of your signer keys (either Ledger devices or the Filecoin Snap wallet) then you can easily replace it with a new one! This is why Multisig wallets are a more secure way to own your Agent.
Prepare to Create an Agent
In order to prepare for Agent creation, you’ll need 3 addresses:
- FILSnap Wallet Address
- Ledger Address 1
- Ledger Address 2
For added security, it’s recommended that you use two separate Ledger devices, but it is OK to start with 1 Ledger Device and then switch to use 2 separate Ledger devices soon after.
Generate wallet addresses
First, you will need a FILSnap wallet:
- Install MetaMask chrome extension https://metamask.io/download/ . Please make sure that no other wallet chrome extensions are installed (this is a small usability issue in FILSnap that is currently being fixed).
- Setup MetaMask by creating a seed phrase. Ensure you securely backup your seed phrase somewhere safe.
- Once installed and configured, go to https://glif.io and click “Connect Wallet” in the top right corner. Select “Filecoin Snap” option:
Approve GLIF to install and connect to your FILSnap (this will come as 2 separate approvals)
Copy your newly created address in the top right of the GLIF website:
Next, generate two Ledger addresses:
- Setup your Ledger device (Nano S, Nano X)
- Install the Filecoin app on your Ledger device (help)
- Plug in your Ledger device to your computer, and click “connect wallet” in the top right of GLIF website
- Select the Ledger option:
Click “Wallet” in the top left nav bar:
Copy the f1 address you see on the screen.
To generate a second address, click “Add account” on the left side of the screen:
Copy the second address, and you’re all set for the next steps!
Next steps
Once you have 3 Filecoin wallet addresses:
- FILSnap wallet address
- 2 Ledger wallet addresses
Then you are ready to move on to Part II of this tutorial.