Skip to content
docs

ScrvUsdProtocolEvm

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:91

Savings crvUSD (scrvUSD) on Ethereum as a LendingProtocol: supply deposits crvUSD for scrvUSD shares, withdraw redeems them with max_loss = 0; borrow / repay reject.

Before anything is read for a write, the vault is identified on-chain (once per instance): the read RPC is on Ethereum, the vault’s runtime code is exactly the EIP-1167 clone of the pinned VaultV3 implementation, the implementation’s code hash is the pinned one, and the vault answers apiVersion() “3.0.4” and asset() crvUSD. Any mismatch is a ScrvUsdVerificationError; a failed read propagates. Every deposit then reads isShutdown, totalDebt and maxDeposit fresh, every withdrawal maxWithdraw / maxRedeem, and the main transaction is proven with eth_call before it is sent. The Curve API only decorates the APY.

new ScrvUsdProtocolEvm(account, config?): ScrvUsdProtocolEvm

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:96

IWalletAccountReadOnly | IWalletAccount

ScrvUsdConfig = {}

ScrvUsdProtocolEvm

CurveLendingBase<ScrvUsdConfig>.constructor

protected readonly _account: IWalletAccountReadOnly | IWalletAccount

Defined in: core/dist/index-i6xtgDlq.d.ts:317

CurveLendingBase._account


protected readonly _config: ScrvUsdConfig

Defined in: core/dist/index-i6xtgDlq.d.ts:318

CurveLendingBase._config


protected readonly api: CurveApi | null

Defined in: protocol-lending-curve-evm/src/base.ts:49

CurveLendingBase.api


readonly chain: CurveLendingChain

Defined in: protocol-lending-curve-evm/src/base.ts:48

CurveLendingBase.chain


readonly chainId: number

Defined in: protocol-lending-curve-evm/src/base.ts:47

CurveLendingBase.chainId


readonly deployment: ScrvUsdDeployment

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:92


readonly vault: `0x${string}`

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:93

get protected client(): object

Defined in: protocol-lending-curve-evm/src/base.ts:77

object

CurveLendingBase.client

protected approvals(token, spender, amount): Promise<Tx[]>

Defined in: protocol-lending-curve-evm/src/base.ts:138

Exact-amount ERC-20 approvals, with an approve(0) reset before raising a non-zero allowance (USDT-style tokens demand it).

`0x${string}`

`0x${string}`

bigint

Promise<Tx[]>

CurveLendingBase.approvals


borrow(): Promise<never>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:301

Promise<never>

CurveLendingBase.borrow


describeActivity(tx, ctx): ActivityItem | null

Defined in: protocol-lending-curve-evm/src/base.ts:73

Recognize Curve lending transactions offline (see activity.ts).

ChainTx

DescribeActivityContext

ActivityItem | null

CurveLendingBase.describeActivity


protected encode(abi, functionName, args): `0x${string}`

Defined in: protocol-lending-curve-evm/src/base.ts:86

readonly unknown[]

string

readonly unknown[]

`0x${string}`

CurveLendingBase.encode


protected execute(plan, action): Promise<{ approveHashes: string[]; fee: bigint; hash: string; }>

Defined in: protocol-lending-curve-evm/src/base.ts:149

Approvals (each awaited to a receipt), then the main transaction, proven first.

Tx[]

Tx

string

Promise<{ approveHashes: string[]; fee: bigint; hash: string; }>

CurveLendingBase.execute


getApy(): Promise<number>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:204

Projected APY in percent (variable: it follows the weekly reports).

Promise<number>


getApyDetails(): Promise<ScrvUsdApy>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:194

The APY, with where it came from: the API’s projection when it lies within the tolerance band around the on-chain one (APY_TOLERANCE), clamped to the band’s edge otherwise, the on-chain projection alone without the API. The on-chain figure is read at one block.

Promise<ScrvUsdApy>


getPosition(user?): Promise<ScrvUsdPosition>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:154

Shares of user (default: the account), their value, and what can leave now with zero loss.

string

Promise<ScrvUsdPosition>


getStats(): Promise<ScrvUsdApiStats | null>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:184

Curve API savings statistics — null without API or when it fails.

Promise<ScrvUsdApiStats | null>


getVault(): Promise<ScrvUsdInfo>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:135

The vault, verified, with its state read now at one block.

Promise<ScrvUsdInfo>


protected me(): Promise<`0x${string}`>

Defined in: protocol-lending-curve-evm/src/base.ts:90

Promise<`0x${string}`>

CurveLendingBase.me


protected prove(tx, action): Promise<void>

Defined in: protocol-lending-curve-evm/src/base.ts:120

eth_call from the account; a vault revert becomes a readable CurveLendingError, anything else propagates.

Tx

string

Promise<void>

CurveLendingBase.prove


quoteBorrow(): Promise<never>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:302

Promise<never>

CurveLendingBase.quoteBorrow


protected quoteFee(txs): Promise<bigint>

Defined in: protocol-lending-curve-evm/src/base.ts:128

Tx[]

Promise<bigint>

CurveLendingBase.quoteFee


quoteRepay(): Promise<never>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:304

Promise<never>

CurveLendingBase.quoteRepay


quoteSupply(o): Promise<LendingQuote & object>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:251

ScrvUsdSupplyOptions

Promise<LendingQuote & object>

CurveLendingBase.quoteSupply


quoteWithdraw(o): Promise<LendingQuote & object>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:295

ScrvUsdWithdrawOptions

Promise<LendingQuote & object>

CurveLendingBase.quoteWithdraw


protected read<T>(address, abi, functionName, args?): Promise<T>

Defined in: protocol-lending-curve-evm/src/base.ts:82

T

`0x${string}`

readonly unknown[]

string

readonly unknown[] = []

Promise<T>

CurveLendingBase.read


repay(): Promise<never>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:303

Promise<never>

CurveLendingBase.repay


protected requireSigningAccount(methodName): IWalletAccount

Defined in: core/dist/index-i6xtgDlq.d.ts:330

The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.

string

IWalletAccount

CurveLendingBase.requireSigningAccount


protected send(tx): Promise<{ fee: bigint; hash: string; }>

Defined in: protocol-lending-curve-evm/src/base.ts:98

Tx

Promise<{ fee: bigint; hash: string; }>

CurveLendingBase.send


supply(o): Promise<LendingResult & object>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:245

Deposits crvUSD (token may be omitted) for scrvUSD minted to onBehalfOf (default: the account).

ScrvUsdSupplyOptions

Promise<LendingResult & object>

CurveLendingBase.supply


verify(): Promise<void>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:105

The on-chain identity checks (cached once they pass; a failure is retried on the next call).

Promise<void>


protected wait(hash): Promise<void>

Defined in: protocol-lending-curve-evm/src/base.ts:106

string

Promise<void>

CurveLendingBase.wait


withdraw(o): Promise<LendingResult & object>

Defined in: protocol-lending-curve-evm/src/scrvusd.ts:287

Withdraws amount of crvUSD (or ‘max’ → redeem every share) to to (default: the account), with zero allowed loss.

ScrvUsdWithdrawOptions

Promise<LendingResult & object>

CurveLendingBase.withdraw


protected writable(method): IWalletAccount

Defined in: protocol-lending-curve-evm/src/base.ts:94

string

IWalletAccount

CurveLendingBase.writable