Skip to main content

Getting started

AMP Finance is used through a Midnight wallet installed in the browser. The wallet holds the tokens, approves every transaction, and is where offer tokens and loan tokens live.

At a glance
  • Wallets: 1AM for everything, Lace for connecting and viewing
  • Network: Midnight Preview, a test network with valueless tokens
  • Browsing needs no wallet; acting does
  • The interface stores no address, no positions and no secret
  • Test tokens come from the Faucet page; NIGHT from Midnight's faucet
  • The seed phrase is the only backup

Supported wallets​

WalletWhere to get itWhat it can do here
1AM1am.xyzConnect, show balances, and complete every action: shield, unshield, lend, borrow, repay and claim
Lacelace.ioConnect and view. Lace cannot yet build the proofs a transaction needs, and the interface says so when an action requires one

Both are browser extensions for desktop browsers. AMP Finance does not support mobile devices. Both wallets are detected automatically when the page loads. A wallet that is installed but too old for the interface is asked to update rather than to install again.

The network​

The interface is built for one Midnight network at a time. At present that network is Midnight Preview, a public test network, and the interface for it is at preview.ampfinance.io. Everything on it, including NIGHT and the tokens AMP Finance lends, is a test asset with no value. The protocol has not yet been deployed on Midnight's main network. Testnet explains what to expect.

The wallet must be on the same network. When it is not, the connection is refused and the message names the network to switch to:

That wallet is on Midnight Preprod. This app runs on Midnight Preview. Switch networks in the wallet, then connect again.

A wallet that will not say which network it is on is refused as well.

Connecting a wallet​

Browsing needs no wallet. Every market, offer and loan can be read without connecting anything. A wallet is needed at the point of doing something: posting an offer, drawing a loan, shielding a token, or viewing positions.

  1. Choose Connect wallet. The picker lists the wallets it found in the browser, with an install link for any that are missing.
  2. Choose a wallet. The wallet extension asks for permission to work with the site; approving it once is enough for later visits.
  3. The interface checks the wallet's network. A mismatch is refused with the network to switch to.

By connecting, a person accepts the Terms of Use and the Privacy Policy. The picker says so and links both.

What the interface reads from the wallet​

  • The wallet's addresses, so a payout can default to them.
  • Its NIGHT and DUST balances, shown in the account menu.
  • Its token balances, both public and shielded, so forms can check that an amount is available before a transaction is built.
  • Which offer tokens and loan tokens it holds, which is how the Positions page knows what belongs to this wallet.

What the interface does not do​

  • It does not store the wallet's address. On the next visit the wallet is asked again.
  • It does not keep a list of positions. They are worked out fresh from what the wallet holds each time.
  • It does not hold any key, secret or backup. Disconnecting, clearing the browser or moving to another computer loses nothing.

The one thing remembered between visits is which wallet was used last, so it can be reconnected without asking. A wallet that has revoked the site's permission is simply asked again. Disconnecting, from the account menu, changes nothing about the positions; they are in the wallet, not in the site.

What the wallet needs​

WhyWhere from
NIGHTThe network's own token; holding it generates DUSTThe Midnight test network's faucet, outside AMP Finance
DUSTPays every transaction's network feeBuilds up on its own from holding NIGHT. It cannot be bought or sent.
A shielded tokenWhat is lent, borrowed and posted as collateralTest tokens from the Faucet page, then shielded on the Shield page

Fees and transactions explains DUST in more detail.

Getting test tokens​

The Faucet page in the interface issues four test tokens: BTC, USDC, ADA and CHARLES. They borrow familiar names but are not connected to the real assets. They exist only so the markets have something to lend and borrow. They cost nothing, are worth nothing, and anyone can mint as many as they like.

  1. Connect a wallet.
  2. Choose a token and an amount. The page suggests 10,000.
  3. Approve the transaction in the wallet. The tokens arrive as public tokens.

Test tokens arrive public, and AMP Finance only works with shielded tokens. Before lending or borrowing, take them through the Shield page, which swaps a public token for its shielded twin one for one. BTC becomes sBTC, USDC becomes sUSDC, and so on. NIGHT works the same way: shield it to get sNIGHT.

TokenComes fromShielded twin
NIGHTMidnight's faucetsNIGHT
BTCAMP Finance faucetsBTC
USDCAMP Finance faucetsUSDC
ADAAMP Finance faucetsADA
CHARLESAMP Finance faucetsCHARLES

The seed phrase​

The wallet's seed phrase is the only backup that matters. Every position on AMP Finance is a token in the wallet, and tokens are restored from the seed phrase alone. The interface keeps no secret of its own and there is nothing else to write down. Positions and recovery covers what a restore does and does not bring back.