nTbill Vault

Contract Addresses & Configuration

// nTBILL vault addresses (same on both Plume and Eth chains)
const VAULT_ADDRESS = "0xe72fe64840f4ef80e3ec73a1c749491b5c938cb9"
const TELLER_ADDRESS = "0x1492062b3ae7996c71f87a2b390b6b82afea0c59"
const ACCOUNTANT_ADDRESS = "0x0b738cd187872b265a689e8e4130c336e76892ec"

const INFRA = {
  predicateProxyAddress: "0x6104fe10ca937a086ba7AdbD0910A4733d380cB6",
  nativeFeeTokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
  bridgeMessageGas: 100000,
}

const PLUME_MAINNET = {
  chainId: 98866,
  layerZeroEndpointId: 30370,
  atomicQueueAddress: "0x220dc6d4569c1f406d532f9633d5be5bc86e8264",
  depositToken: {
    address: "0xdddd73f5df1f0dc31373357beac77545dc5a6f3f",
    decimals: 6,
    symbol: "pUSD",
    defaultSlippagePercentage: 0.005,
  }
}

const ETH_MAINNET = {
  chainId: 1,
  layerZeroEndpointId: 30101,
  atomicQueueAddress: "0x220dc6d4569c1f406d532f9633d5be5bc86e8264",
  depositToken: {
    address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    decimals: 6,
    symbol: "USDC",
    defaultSlippagePercentage: 0.005,
  }
}

const VAULT_DECIMALS = 6
const PUSD_ADDRESS = PLUME_MAINNET.depositToken.address
const USDC_ADDRESS = ETH_MAINNET.depositToken.address
const PLUME_ATOMIC_QUEUE_ADDRESS = PLUME_MAINNET.atomicQueueAddress
const ETH_ATOMIC_QUEUE_ADDRESS = ETH_MAINNET.atomicQueueAddress

Summary: 6 Distinct Paths

Deposits (3 paths)

  • USDC Ethereum -> nTBILL Plume (cross-chain deposit): 6 operations (compliance check, get exchange rate, compute minimumMint with slippage, calculate bridge fee, approve USDC, deposit & bridge)

  • pUSD Plume -> nTBILL Plume (same-chain deposit): 5 operations (compliance check, get exchange rate, compute minimumMint, approve pUSD, direct deposit)

  • USDC Ethereum -> nTBILL Ethereum (same-chain deposit): 5 operations (compliance check, get exchange rate, compute minimumMint, approve USDC, direct deposit)

Redemptions (3 paths)

  • nTBILL Plume -> USDC Ethereum (cross-chain redemption): 7 operations (preview bridge fee, bridge shares, get exchange rate, compute atomicPrice with slippage, approve nTBILL, create withdrawal request, monitor withdrawal)

  • nTBILL Plume -> pUSD Plume (same-chain redemption): 5 operations (get exchange rate, compute atomicPrice, approve nTBILL, create withdrawal request, monitor withdrawal)

  • nTBILL Ethereum -> USDC Ethereum (same-chain redemption): 5 operations (get exchange rate, compute atomicPrice, approve nTBILL, create withdrawal request, monitor withdrawal)


DEPOSIT FLOWS

Path 1: Ethereum -> Plume (Cross-Chain Deposit)

1

Compliance Check (isDepositAndBridge=true)

Response: { data: { isCompliant: boolean, predicateMessage: {...} } }

2

Exchange Rate Query

3

Calculate Minimum Mint

4

Calculate Bridge Fee

5

Token Approval

6

Cross-Chain Deposit

Result: USDC deposited on Ethereum, nTBILL minted on Plume


Path 2: Plume -> Plume (Same-Chain Deposit)

1

Compliance Check

Response: { data: { isCompliant: boolean, predicateMessage: {...} } }

2

Exchange Rate Query

3

Calculate Minimum Mint

4

Token Approval

5

Direct Deposit

Result: pUSD deposited on Plume, nTBILL minted on Plume


Path 3: Ethereum -> Ethereum (Same-Chain Deposit)

1

Compliance Check

Response: { data: { isCompliant: boolean, predicateMessage: {...} } }

2

Exchange Rate Query

3

Calculate Minimum Mint

4

Token Approval

5

Direct Deposit

Result: USDC deposited on Ethereum, nTBILL minted on Ethereum


REDEMPTION FLOWS

Path 1: Plume -> Ethereum (Cross-Chain Redemption)

1

Preview Bridge Fee

2

Bridge Shares to Ethereum

3

Exchange Rate Query for Withdrawal

4

Calculate Atomic Price with Slippage

5

Vault Token Approval

6

Create Cross-Chain Withdrawal Request

7

Monitor Cross-Chain Withdrawal

Result: nTBILL bridged from Plume to Ethereum, then queued for USDC redemption on Ethereum


Path 2: Plume -> Plume (Same-Chain Redemption)

1

Exchange Rate Query for Withdrawal

2

Calculate Atomic Price with Slippage

3

Vault Token Approval

4

Create Same-Chain Withdrawal Request

5

Monitor Same-Chain Withdrawal

Result: nTBILL queued for pUSD redemption on Plume


Path 3: Ethereum -> Ethereum (Same-Chain Redemption)

1

Exchange Rate Query for Withdrawal

2

Calculate Atomic Price with Slippage

3

Vault Token Approval

4

Create Same-Chain Withdrawal Request

5

Monitor Same-Chain Withdrawal

Result: nTBILL queued for USDC redemption on Ethereum


Key Calculation Formulas

Minimum Mint (Deposits):

Atomic Price (Withdrawals):

Both pUSD on Plume and USDC on Ethereum use 6-decimal quote units in this guide.