Independent builder challenge
About 1870 wordsAbout 6 min
Week 8 · Part 3 — Independent builder challenge
Core question — given a spec and no tutorial, can I build, test, ship and explain a working feature on my own?
Every Part so far taught you something and then asked you to use it. This one only gives you a spec. You decide the design, find what you do not know, and put the pieces together yourself.
It is also a readiness check for the W9 Project Brief and W10 Project Submission, where you scope and deliver a project of your own. Completing it shows you have practised combining the skills; it does not guarantee that a later project will be straightforward.
Picture a driving test
Your lessons taught you to steer, brake and check mirrors. On the test, the examiner gives you a destination, not a list of turns. You already have the skills. The test is whether you can combine them without help.
Where the picture stops: in a driving test you cannot look anything up. Here you can and should: docs, your own earlier Parts, and an AI assistant as a pair. What you cannot do is hand in something you cannot explain.
The hard skill
Turn a functional spec into a working, tested and shipped feature that uses an unfamiliar component, and explain how it works and where it falls short.
After this Part you can:
- break a spec into pieces and decide what to build first;
- integrate a token you did not write into your own contract and app;
- handle the failure cases a real user will hit;
- write a short architecture note another builder can follow.
Core / reference material
A way to attack any spec
- List what "done" means. Turn each requirement into a check you could tick. If you cannot tell when it is met, ask before you build.
- Find the unknowns. Mark anything you have not used before, then answer the five questions from W8P1 for each one.
- Sketch the flow. Draw the boxes (wallet, app, your contract, other contracts) and the calls between them for one complete action.
- Build the thinnest slice first. Get one action working end to end, even if it is ugly, before you add checks and polish.
- Break it on purpose. Try every failure you can think of, then make sure each one fails clearly.
- Ship and explain. Ship the new slice through the existing workflow from W8P2, then write down what you built and what it does not do.
You already have most of the pieces
| You need to… | You learned it in… |
|---|---|
| Add state, a rule, an event and a failure case to a contract | W5P2 |
| Read and write from TypeScript and a frontend | W5P3 and W6P1 |
| List past events | W6P2 |
| Prove behaviour with Foundry tests | W7P1 |
| Find a fault layer by layer | W7P2 |
| Order checks, effects and interactions safely | W7P3 |
| Handle token units and check docs against the chain | W8P1 |
| Verify, deploy and document | W8P2 |
The new piece: approve, then pull
Native ETH can be attached directly to a contract call as transaction value. ERC-20 balances live inside the token contract's state, so tokens are not attached to another contract call in the same way. To let another contract move ERC-20 tokens on the user's behalf, the token owner usually grants an allowance first. The usual pattern has two transactions:
- The user calls
approveon the token, giving a spender (your contract) permission to take up to a set amount. - The user calls your contract, and your contract calls
transferFromon the token to move the tokens.
You met the risky side of this in Week 3 Part 5: an unlimited approval stays open long after the user has forgotten it. As the builder, you now decide how much your app asks for.
The functions involved are described in the ERC-20 interface reference. The rest is up to you.
The approval is the user's instruction to the token contract to grant a spender permission. The allowance is state stored by the token contract describing how much spender may still move from owner; conceptually, it is allowance[owner][spender], without implying that every token uses this exact storage layout. In this flow the tip contract is the spender: it calls transferFrom to use the allowance on the user's behalf, while the USDC contract performs the balance update. The TipContract does not custody the USDC in this design.
Approve only the exact amount needed for this tip. That is an intentionally conservative Academy requirement. Production apps may use different allowance strategies, permit-based approvals or carefully bounded reusable allowances; this exercise uses exact approval so the remaining permission is easy to reason about.
Reuse the public repository, contract deployment, verification and Pages setup you completed in W8P2. This challenge still requires a deployed and usable result, but it is not a second deployment engineering assignment: extend the existing pipeline and provide fresh evidence for the new contract and app through it. Do not redesign or re-document the Pages workflow, repeat the fresh-clone shipping proof, or create a second workflow when the W8P2 setup is unchanged.
Hands-on task
The spec: tip a record's author in USDC
As a reader of the Registry, I want to send a small tip in USDC to someone whose record I like, so that good records are rewarded.
Contract
- A new contract, deployed to Ethereum Sepolia and verified, that lets anyone tip the author of a Registry record in Sepolia USDC.
- Tips can only go to accounts whose record is currently not empty.
- Zero-amount tips and tipping yourself are rejected, each with its own custom error.
- Tokens go straight from the tipper to the author. Your contract never holds USDC.
- Every tip emits an event, and anyone can read the total an author has received.
Tests
- Foundry tests for the normal path, at least two failure paths and the event.
App
- Shows the connected account's USDC balance and the tips it has received, formatted with the token's decimals.
- Lets the user pick an author who has a record, enter an amount and send the tip, including any approval needed.
- Never asks for an unlimited approval. Approve only what the tip needs.
- Shows pending, success and error states, with a link to each transaction.
- Handles at least one failure a real user will hit, with a message that tells them what to do. For example: not enough USDC, a rejected signature, or a contract error.
Proof and explanation
- One real tip on Sepolia between two of your own test accounts. The author account needs a record first, and a little Sepolia ETH to set it.
- A short architecture note (one diagram plus approximately 100–150 words): the pieces, the flow of one tip from click to confirmed transfer, and the known limitations.
Given: Sepolia USDC comes from Circle's faucet (20 USDC every two hours per address and per blockchain). Finding the token's address and units is part of the task.
Out of scope: other tokens, refunds or withdrawals, signature-based approvals (EIP-2612 permit), mainnet, and a backend.
Questions worth answering before you code
Which address calls transferFrom, and who must have approved whom? What is "1 USDC" in the token's own units? What should happen if an author clears their record between page load and the tip? Which of your checks belong in the contract, and which only in the app?
Use AI as a pair, not a replacement
You may build substantially with an AI assistant. Your architecture note must still explain why your contract checks what it checks, in what order, and what each failure state protects against. If you cannot explain a line, it is not finished.
Evidence required
- Your repository link, with the tests. Point to the W8P2 repository and shipping evidence where it is unchanged; make the new integration changes clear.
- Your verified contract link for the new contract, using the existing W8P2 verification workflow.
- A link to your real Sepolia tip transaction.
- A link to your live frontend (as in W8P2), or a demo clip of two minutes or less showing one tip and one handled failure.
- Your architecture note. Do not repeat the W8P2 fresh-clone or Pages workflow proof when that infrastructure is unchanged.
Completion and revision
This Part is worth 100 points in the Academy progression. Academy participants submit it for a binary Complete or Revise review against the criteria above. Independent readers may use those criteria as a self-check; formal points are tracked through organised Academy participation. There is no partial-score rubric.
Further exploration — optional, not assessed
- Sepolia USDC supports signature-based approvals (EIP-2612
permit). Use one to turn approve-and-tip into a single transaction. - Show each author's tip history from your contract's events, not only the total.
- Compare your design with the ETH tipping contract in Part 3. Which weaknesses can a USDC tip contract still have, and which ones disappear?
Sources and attribution
- OpenZeppelin Contracts — IERC20 — Link, referenced only
- Circle — USDC contract addresses — Link, referenced only
- Circle — Testnet faucet — Link, referenced only
- viem — writeContract — Link, referenced only
- Blockchain@NTU Academy Builder starter — Reuse (MIT), the
Registrythis challenge builds on