Guides
NEXUS
Guides

2. Architecture

2. Architecture

This chapter describes the request flow exchanged between ONE RAMP, your game server, and the blockchain.


2.1 Components

ComponentRoleOwned by
RAMP F/EUser UI, real-time transaction status displayNEXUS
RAMP B/ERequest processing and validation, Validator signature requestsNEXUS
Game ClientOpens RAMP F/E, shows progressYou
Game ServerValidates, deducts, and restores game assets; handles signingYou
Blockchain NetworkExecutes the actual Mint/Burn transactionsONE Chain

2.2 Absolute Rules

  • ① Mint deducts first — deduct the game assets, then issue the tokens. If the transaction fails, you must restore them.
  • ② Burn executes first — run the blockchain transaction, then grant the game assets. If it fails, do not grant them.
  • ③ Always cross-check at step 12 — confirm that the assets and amounts RAMP requested match the actual in-game values. Skipping this lets arbitrary-amount requests through.
  • ④ Idempotency on uuid — the result Webhook is resent up to 20 times. Apply the same uuid only once.

2.3 Mint Sequence

Consumes game assets to issue tokens. Assets are deducted at step 12, and restored at step 17 if the transaction fails.


No.StepNotes
1User requests a token Mint
2Request a JWT tokenUsed in flows 9 and 14; the game server must verify it
3Request a UUID
4Look up the game assets needed for the Mint
5Obtain the UUID by calling the RAMP APIIncludes Mint information such as intent5.3
6Open the RAMP F/E WebViewIncludes uuid, JWT, and sessionId
7Request asset data for F/E calculations
8Look up the user's game assets5. Endpoint Specification
9User chooses to Mint in the F/ESigns with their wallet
10The user's signature is forwarded
11Request the Validator signature from the game server5. Endpoint Specification
12Validate the Mint request, then deduct game assetsMust be restored on failure
13Validator signatureSigned with the Validator private key registered in the console
14Verify the Validator signatureVerified against the Validator address registered in the console
15Submit the blockchain transaction
16Send the result to the game server5. Endpoint Specification
17Handle the resultRestore game assets on failure
18–19Re-query assets
20Render the result in the game UI

2.4 Burn Sequence

Burns tokens to grant game assets. Assets are granted at step 17, only after the transaction succeeds.


Differences from Mint

The steps are the same; only the following differ.

ItemMintBurn
Asset handling orderDeduct assets → transactionTransaction → grant assets
Step 12Validate + deduct assetsValidate only
Step 17Restore assets on failureGrant assets only on success
intent.methodmintburn-permit
intent.typeassembledisassemble
intent.fromGame asset (asset)Token (ERC20)
intent.toToken (ERC20)Game asset (asset)

2.5 Failure Handling Summary

Failure pointHow it is detectedWhat you must do
Signature validationA policy violation is detected in Validate OrderReturn a failure response without signing — no action needed, since assets have not been deducted
Blockchain Mint failurereceipt.status != 0x1Restore the deducted game assets
Blockchain Burn failurereceipt.status != 0x1Do not grant the game assets
Webhook not receivedResent up to 20 times within 12 hoursReturn HTTP 200, then block duplicates by uuid
UUID expiredMore than 5 minutes since issuanceCall initialize again