The integration with Alpaca API requires authentication, so please reach out to us at [email protected] if you would like to use this service.
MaxUint256
could introduce security risk, using the exact token amount input by user is recommended.deposit
method and specifying the deposit amount in the amountToken
parameter. The amountToken
data type is uint256
and this parameter must be formatted to the decimals of the deposit token (for example, BNB uses 18 decimals, 1 BNB = 10000000000000000000
or 1 * 1e18
). For the case where the deposit token is BNB, the vault will handle the wrapping of BNB into wBNB, but the transaction must include enough BNB sent as the native token.deposit
method must correctly keep track of the users' shares for deposits in vaults, please see the Interest Bearing Token Calculation section for a detailed explanation.withdraw
method in the Vault
contract.1 ibBNB = 1.0292 BNB
which means a deposit of 1.0292 BNB will get 1 ibBNB in return. On the other hand, redeeming 1 ibBNB will get 1.0292 BNB in return. The additional BNB from redeeming ibBNB are from the accrued interest.totalToken
and totalSupply
from the corresponding vault.GET
REST request to the endpoint /ibTokens
to retrieve any ibToken price. The integration with Alpaca API requires authentication, so please reach out to us at [email protected] if you would like to use this service.Fairlaunch
in our codebase.deposit
method. The parameters are as followed:_for
is the address of the depositor._pid
is the id of the staking pool._amount
is the amount of the token to be deposited in uint256
expressed in its decimals (for example, ibBNB uses 18 decimals, 1 ibBNB = 10000000000000000000
or 1 * 1e18
)userInfo
method from the Fairlaunch
contract.harvest
method from the Fairlaunch
contract and supply the pool id.withdraw
method in the Fairlaunch
contract.