Skip to main content

lock

Description:

Boost your osToken apy using leverage staking

Arguments:

NameTypeRequiredDescription
amountbigintYesBoost amount
userAddressstringYesThe user address
vaultAddressstringYesThe address of the vault that will mint osTokens for leverage staking
boostAddressstringYesThe address of the strategy proxy (TODO method)
permitParamsPermitParamsNoThe permit signature it is required only if there is not enough osToken allowance for the strategy proxy contract. It will be obtained automatically using the utils.getPermitSignature method
type PermitParams = {
vault: string
amount: bigint
deadline: number
v: number
r: string
s: string
}

Example:

const params = {
amount: parseEther('1'),
userAddress: '0x...',
vaultAddress: '0x...',
boostAddress: '0x...',
}

// Send transaction
const hash = await sdk.boost.lock(params)
// When you sign transactions on the backend (for custodians)
const { data, to, value } = await sdk.boost.lock.encode(params)
// Get an approximate gas per transaction
const gas = await sdk.boost.lock.estimateGas(params)