YourGrails Docs
A plain-English guide to packs, fair draws, cross-chain checkout, battles, marketplace offers, instant buyback, card-backed lending, wallet tools, rewards, and the contracts behind the app.
Docs
What YourGrails Is
YourGrails lets users open digital packs backed by real graded trading cards, battle other users, trade cards, use instant buyback, and borrow or lend USDC against card collateral.
Real card ownership
Each revealed card is represented by a CardNFT tied to a real graded card. The app stores cert data, grading company, images, current market value, and ownership state.
On-chain settlement
Packs, battles, marketplace purchases, buybacks, and lending use Avalanche smart contracts. The backend indexes events and keeps the app state readable for users.
Simple user experience
Users see normal product language like fair draw, market value, instant buyback, offer, and extra time. The technical details stay available here for anyone who wants to understand the system.
Docs
Getting Started
The current beta flow is built around wallet login, USDC, Avalanche, and optional cross-chain payment.
Sign in and connect a wallet
Add USDC or testnet funds
Choose a pack, battle, marketplace card, or loan
Track everything from activity and notifications
Docs
Packs
The current pack product uses two live tiers: Pokemon Pro Pack and Pokemon Master Pack.
Live pack tiers
Pokemon Pro Pack is the lower-priced pack tier.
Pokemon Master Pack is the higher-priced pack tier.
Pack pages show current expected pull value, buyback percentage, and compact value-tier odds based on the cards currently seeded into that pack.
Buying multiple packs
Users can buy multiple packs in one checkout on Avalanche. After purchase, the reveal session opens pack 1 of N, then pack 2 of N, until the whole session is complete.
At the end, users see a clean summary of all pulled cards, total market value, and available buyback amounts.
Pack inventory and EV
Pack odds and expected value are based on the seeded cards and market prices stored by the platform. Admin tools monitor EV, pull risk, and pack health so inventory can be reseeded before the user experience degrades.
Pack credits and coupons
Pack credits and one-time coupon codes can redeem free packs when enabled. Coupon codes are issued for a specific pack and are protected by backend reservation plus on-chain one-time redemption.
Docs
Fair Draws
Pack reveals and battle reveals use Chainlink VRF so card selection is not controlled by the website.
What users see
The app shows an opening animation while the fair draw is in progress. When the draw is ready, the card reveal animation plays and the selected card appears automatically.
What the contract does
The reveal request is submitted on Avalanche. Chainlink VRF later fulfills the request with a random result, and GachaPacks uses that result to select from reserved inventory.
Why it matters
Chainlink VRF gives users an independently generated result instead of asking them to trust a private server. The system is slower than instant server-side randomness, but it is materially more auditable.
A single multi-pack reveal request can return multiple random words. Each pack in the session gets its own draw result, so buying several packs at once does not mean every pack shares the same random number.
Docs
Cross-Chain Checkout
Users can pay from supported source chains while packs and battles still settle on Avalanche.
How CCTP checkout works
Circle CCTP burns source-chain USDC, waits for Circle attestation, then mints USDC on Avalanche. The Avalanche receiver contract uses the message hook to buy packs or enter battles for the user.
The app polls status automatically and recovers from already-processed destination messages by looking up receiver logs.
Supported uses
Cross-chain checkout is wired for pack purchases, multi-pack orders, battle creation, and battle joining where the UI offers the route.
Coupon redemptions are Avalanche-only because the user pays gas for the free-pack redemption transaction.
Avalanche gas credit
When enabled, users with low Avalanche gas can choose to include a small AVAX gas credit with a cross-chain purchase. The receiver contract uses its AVAX balance and configured rules to send the user gas.
Chain switching
The app should switch to the source chain before source-chain approval or burn, then switch back to Avalanche for reveal and collection actions. It should not reload the page for normal chain changes.
Docs
Cards, Values, and Pricing
Card pages show user-friendly card facts and market value, while admin tools manage deeper cert and pricing data.
Card details
Cards store title, set, card number, grade, grader, cert number, images, owner, token id, current market value, and buyback value where available.
User-facing pages show useful card facts without exposing every admin-only enrichment field.
Proof of ownership
For cards held by YourGrails, users can request a live proof photo of the exact vaulted card. During beta these requests are handled manually through support and usually take a few hours.
Pricing sources
Admin card lookups can enrich slabs with cert metadata, Alt value information, Alt comps, and supporting population data. Pricing refreshes are rate-limited and can be run from admin card pages.
Value language
User pages use market value instead of floor value. Buyback payout is calculated separately from market value based on the configured buyback percentage and eligibility.
Docs
Instant Buyback
Eligible cards can be sold back quickly during the buyback window.
Eligibility
Instant buyback is intended for original qualifying purchasers. It can apply to normal pack pulls, CCTP pack pulls, coupon pulls when the campaign allows it, and battle participant cards when the purchase path is verified.
Marketplace purchases and transferred cards are not treated as original pack purchases for instant buyback.
Window and payout
The buyback window is 7 days after reveal. The app shows days, hours, and minutes remaining where buyback is available.
The standard payout is 90% of the appraised market value, subject to reserve, voucher, and eligibility checks.
Settlement
The user approves the card NFT if needed, confirms the buyback, receives USDC, and the card returns to platform inventory. The same physical card can become eligible again if it is later seeded, pulled by a qualifying buyer, and sold back again through a new eligible purchase path.
Protection against repeated claims
Buyback vouchers and contract state are tied to the card, owner, purchase path, timing, and settlement status. A completed buyback burns or transfers the relevant ownership path so the same eligible pull cannot be sold back repeatedly.
Docs
Pack Battles
Battle users, the YG Battle Bot, or a second account without losing the card from your own pack.
Battle flow
A user creates a battle for a specific pack. Another player or the YG Battle Bot joins. Each side reveals a pack through the Chainlink fair draw flow.
Both players keep their own revealed battle card. The higher market value wins the bonus pack.
Bonus pack
After both battle cards are revealed, the system resolves the winner and requests the bonus pack reveal. The UI shows the bonus pack opening flow and then slides the bonus card to the winner side.
Timeouts
If a player does not reveal in time, the battle can continue through the timeout reveal process. The UI should show that the missed reveal is being handled and keep the pack animation visible instead of leaving users at a silent countdown.
Buyback after battle
Battle participants can use instant buyback for cards they own when eligibility is confirmed. Buyback actions should be available directly from the battle result view for the card owner.
Docs
Marketplace and Offers
Buy, list, cancel, and make offers on vaulted graded cards.
Listings
Sellers list a card at a buy-now price. The card NFT is approved and moved into marketplace escrow so the buyer can receive it when the purchase settles.
Sellers can cancel active listings and get the card back from escrow.
Offers
The app uses offer language instead of bid language. Buyers deposit USDC into their offer balance and place offers on listed cards.
If an offer is above the buy-now price, the UI warns the buyer before placing it.
Seller notifications
Offer notifications should take sellers directly to the card detail view where they can review and accept the offer. Listed cards in collection should remain clickable for details.
Filters
Marketplace filters include grading company options such as PSA, BGS, and CGC, plus other listing filters as configured in the UI.
Docs
Card-Backed Lending
Borrowers can request USDC loans against card collateral. Lenders can fund requests and earn interest.
Borrowing
A borrower chooses one card or a bundle of cards, selects a loan term, and requests a USDC loan. The card collateral moves into the lending contract while the request is open or funded.
The loan amount must fit within the term LTV rules and signed appraisal value.
Lending
A lender reviews open requests, card details, collateral values, APR, term, and LTV. Funding the request sends USDC to the borrower and starts the due date.
The lender sees expected base interest and any claimable extra-time payout in My Loans.
Platform fee
Loan terms include a platform fee. The UI labels it as platform fee and shows the amount as part of the repayment and admin operations view.
Default and extra-time process
Due date and grace period
Default claim
Extra time
Admin oversight
Docs
Wallet Page
Users can view balances, copy their address, and move USDC or AVAX from the wallet area.
Balances
The navbar shows USDC balance only when a wallet is connected. The wallet page shows USDC and native AVAX balances for the configured Avalanche network.
Receive and withdraw
Users can copy their address for deposits, send USDC, and send AVAX. Transfers happen from the connected wallet and should be confirmed in the wallet prompt.
Docs
Rewards, Referrals, and Coupons
Invite access, leaderboard points, free pack credits, and KOL coupon campaigns are part of the current reward system.
Referral codes
Referral codes grant invite access when redeemed. User-unlocked referral codes are single-use and can be shared from the profile page with copy and social sharing tools.
Admin settings control unlock thresholds and how many codes are unlocked per threshold.
Leaderboard points
Paid pack opens, battles, coupon pulls, and completed lending repayments can award points depending on configured rules. Lending points are based on principal amount at an admin-configured rate.
Free pack rewards are based on the configured paid opens per free pack setting.
Coupon codes
Admin-created KOL coupon codes are one-time use, pack-specific, HMAC-hashed in storage, and redeemed with an EIP-712 voucher. The contract marks coupon ids used on-chain to prevent replay.
Pack credits
Pack credits let users redeem a free pack from supported reward flows. They are tracked separately from paid pack volume so referral unlock math stays clean.
Docs
Support, Activity, and Notifications
The app has both lightweight bug reporting and a full support ticket system.
Beta feedback
The beta banner lets users submit bug reports, feedback, suggestions, or other notes. Admins can review these reports from the backend/admin system.
Support tickets
The support page lets users create tickets and replies. Admin support views show ticket status, replies, and alerts so user issues are not lost in chat or notifications.
Activity audit
Admin activity shows pack purchases, reveals, buybacks, battles, marketplace actions, offers, coupon redemptions, and lending lifecycle events.
Docs
Physical Redemption
Redemption is a planned feature and is presented as coming soon in the app.
Coming soon after beta
The intended redemption flow lets a card owner request shipment of the underlying physical card. Once approved and paid, the CardNFT is burned and the physical card is shipped with tracking and insurance. Until the feature is live, cards remain represented by their NFTs and managed through collection, marketplace, buyback, and lending flows.
Proof while cards are vaulted
Users can request proof of ownership for cards we hold. We will take a live photo of the exact vaulted card and provide it through support, giving users transparency before full physical redemption opens.
Docs
Contracts
Current configured contract addresses and what each one does.
CardNFT
ERC-721 ownership tokens for vaulted graded cards.
0x423714cB42bcFe9DD52A5225656d622aD39d6bA0PackNFT
Temporary unrevealed pack tokens.
0xFe3eB95C2369ddE7f93Af7229f774b2D00207745GachaPacks
Pack purchases, multi-pack purchases, coupon redemption, and Chainlink reveal requests.
0xA26De0Ed1c24f54Cf316C9CDb8fEFF1ea68E5AB4MarketplaceEscrow
Card listings, purchases, offers, and cancellation escrow.
0x90A40f2befe2CE0AA10e951dbc47e2B6837Cfd9dBuyback
Instant buyback vouchers and NFT settlement.
0x8D8669ADE9D390A6dD03D384983A5bb334369dAaPackBattleV3
Two-player and bot-assisted pack battles.
0x7cC8173A9eD2dF8BAb306bbF28eDa301032D3936CCTP Receiver
Avalanche receiver for cross-chain pack and battle purchases.
0xBa73111925C2bD51794eE8A0aD0520558FE6737cUSDC Faucet
Testnet Fuji USDC faucet contract.
0x69b7AB27D0E4d54540031E6FC27a4Fe4570346c8CardLoanMarket
P2P USDC loans backed by one card or a bundle of cards.
0xa3A984C11A6f3d975a785f6028e7dEf08DCF2AC2Lending Collateral Registry
Controls which card NFT contracts can be used for loans.
0xA07bb02d4979014D4bDeD18820d1Cd1f5Def16DfLending Terms Registry
Admin-managed loan term presets.
0x5e8a5755EaE73A825689096aF598E38B68bcD0C7USDC
Circle USDC used for pack purchases, buybacks, lending, and marketplace settlement.
0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6EDocs
Security Model
The platform combines smart-contract checks, backend confirmations, and admin monitoring.
Role-based contracts
Contracts use explicit roles for minting, pack seeding, coupon signing, CCTP receiver actions, battle entry, lending appraisals, and admin controls. Production roles should be assigned to multisigs where possible.
Fair draw security
Chainlink VRF requests are asynchronous and protected against stale or duplicate fulfillment. PackNFTs are burned or consumed as part of the reveal lifecycle to prevent duplicate reveals.
CCTP message safety
The CCTP receiver only accepts messages from the configured Circle messaging flow and receiver path. The backend confirms destination logs instead of trusting client-submitted purchase data.
Coupon replay protection
Coupon codes are one-time use in the backend and coupon ids are also marked used on-chain. Vouchers are bound to recipient, pack, contract, chain, campaign, and deadline.
Buyback controls
Buyback checks original purchase eligibility, card ownership, time window, voucher validity, and settlement state before USDC can be paid out.
Lending controls
Lending locks collateral, prevents double-use of the same card, snapshots terms, uses signed appraisals, and includes default handling that transfers collateral to the lender only after the grace period expires.
Docs
FAQ
Are these real physical cards?
Yes. Card NFTs represent real graded trading cards held in YourGrails custody or a supported custodian workflow. The front end shows the card, grade, cert number, images, and current market value where available.
Which packs are live?
The current app uses two pack tiers: Pokemon Pro Pack and Pokemon Master Pack. Older Basic, Starter, Platinum, Diamond, and Legend tiers are no longer part of the current product flow.
Why does a reveal take time?
Pack reveals request an independent Chainlink VRF random result. The app shows the pack carousel while the draw is pending, then reveals the selected card when the fulfillment is indexed.
Can I buy multiple packs at once?
Yes. Avalanche checkout supports multi-pack buys and then runs a reveal session showing pack 1 of N, pack 2 of N, and so on. Cross-chain checkout is also wired for multi-pack orders through the CCTP receiver.
Can I pay from Ethereum Sepolia or another chain?
Yes in supported testnet routes. The app uses Circle CCTP to move USDC to Avalanche and then complete the pack or battle purchase through the Avalanche receiver contract.
Who can use instant buyback?
Instant buyback is available to the original qualifying purchaser for a limited window after reveal, including normal pack purchases, CCTP purchases, coupon pulls when eligible, and battle cards when the backend can verify the original purchase path.
What happens if I lose a battle?
You still keep the card from your original battle pack. The winner receives the bonus pack, but the loser does not lose their revealed card.
What happens if a lending borrower defaults?
After the due date and grace period pass, the lender can claim the card or bundle used as collateral. The collateral transfers to the lender and the loan is marked defaulted.
Can I ship my card?
Physical redemption is planned and visible as a coming-soon area. The intended flow burns the NFT and ships the underlying card after verification and fees are handled.

