Links

Smart contract interaction

This section provides an overview of smart contract method calls required either to deposit or withdraw stablecoins from the protocol. For these transactions, one may use DAI, USDC or USDT stablecoins. The relevant contracts are listed under the Gro Protocol Core section in the Contract Addresses page.

Terminology

Slippage - Slippage tolerance is a setting for how much price slippage you are willing to accept for a trade. By setting slippage tolerance, you are setting a minimum amount on how many tokens you will accept, in the event that the price increases or decreases.
Withdrawal fees - When withdrawing assets, 0.5% is deducted from the withdrawal amount and distributed pro-rata to the remaining asset providers.
PWRD - The rebasing stablecoin, native token of gro protocol
GVT (Vault) - The non-rebasing token, native token of gro protocol
Growth token - Either PWRD or GVT token
Curve pool (LP) - Curve AMM used to price the PWRD and GVT products
LP (token) - Token that represents share in a liquidity pool
Buoy - Pricing and conversions contract
Virtual price - USD price of LP token

Requirements

  • web3.js
  • BN.js
  • DAI, USDC or USDT stablecoins
  • (if you're using a smart contract to interact with ours) whitelisting for your smart contract as we currently have a block in place - please contact us at discord in this case

Conventions

When handling numeric values
All numeric values inputted into the smart contracts must be expressed in BigNumber format without decimals. Check with each token contract or the below table for how many decimals you have to shift.
When processing a transaction involving multiple stablecoins
Some contracts expect to receive/return an array of stablecoin amounts. In such cases, the order of the stablecoins within the array is as follows:
Index in Array
Stablecoin
Decimals
0
DAI
18
1
USDC
6
2
USDT
6