An LP deposits $10,000 into an ETH/USDC pool on Uniswap v3, choosing a range of $1,800\u2013$2,200 while spot is $2,000. In a v2-style full-range pool, that $10,000 would be spread across all prices from 0 to \u221e. In v3, it is concentrated into a 22% price band.
Capital efficiency multiplier \u2248 1 / (1 \u2212 \u221a(P_lower/P_upper)) = 1 / (1 \u2212 \u221a(1800/2200)) \u2248 1 / (1 \u2212 0.9045) \u2248 10.5x. So this position earns fees as if it were ~$105,000 of v2 liquidity.
But if ETH exits the range (say to $2,400), the position converts entirely to USDC and stops earning fees until price returns. The LP must actively rebalance \u2014 turning passive LPing into active range management.
"},
{type:'case',title:"Case Study \u2014 Bancor & IL Protection",scenario:"In 2017 Bancor launched the first major AMM with a novel promise: impermanent loss protection. LPs who stayed 100 days received full reimbursement of IL, funded by the protocol's BNT token. During the 2022 bear market, IL claims exploded while BNT price collapsed, and Bancor paused protection, leaving LPs exposed. The protocol's TVL fell from over $2B to under $200M.",question:"What structural flaw did Bancor's IL protection reveal about AMM design?",options:["AMMs cannot technically calculate impermanent loss accurately", "IL protection funded by a volatile native token creates a reflexive death spiral when both assets fall", "Liquidity providers never actually experience impermanent loss in practice", "Protection schemes only work for stablecoin pairs"],correct:1,reasoning:"Bancor's protection was denominated in BNT. When IL spiked, the protocol minted/sold BNT to compensate LPs, depressing BNT price, which increased IL on BNT pairs, triggering more claims \u2014 a reflexive loop. This is a canonical lesson that IL subsidies must be funded by external yield, not the pool's own volatile asset."},
{type:'summary',title:'Key takeaways',points:["AMMs replace order books with liquidity pools", "Constant-product formula x \u00d7 y = k sets prices", "Larger swaps = more slippage; deeper pools resist it", "Impermanent loss comes from price divergence", "LPing is a volatility trade; stablecoin pairs are safest"]},
{type:'completion',title:'Course complete',subtitle:'',body:'You understand AMMs. Next, borrowing and lending on-chain.',quiz:null}
];
let currentSlide=0,totalSlides=slides.length,quizAnswers={},totalScore=0,speaking=false,synth=window.speechSynthesis;
function renderSlides(){document.getElementById('slideTotal').textContent=totalSlides;let dots='';slides.forEach((s,i)=>{dots+=`
`});document.getElementById('slideDots').innerHTML=dots;showSlide(0)}
function showSlide(n){currentSlide=n;document.getElementById('slideNum').textContent=n+1;document.getElementById('progressFill').style.width=((n+1)/totalSlides*100)+'%';document.querySelectorAll('.slide-dot').forEach((d,i)=>{d.classList.remove('active');if(i===n)d.classList.add('active');if(i
${s.meta||''}
${s.title} ${s.subtitle}
${s.body}
`;
else if(s.type==='objectives')html=`
${s.title}
π― By the end of this lesson, you'll be able to:
π§ New to the Paper Trader? Open it, start a journal entry, then do each step above one at a time and write down every number. Paste your results into the "Turn in" box below β the Teacher grades that you did the work, not that you got a "perfect" answer.
π Complete all ${total} courses to earn your single Academy Certificate & one 10% discount code β awarded once for finishing the entire school.
`;document.getElementById('quizScore').textContent=totalScore}
document.getElementById('slideContainer').innerHTML=html;
markProgress(n)}
function markProgress(n){let key=COURSE_ID,store=JSON.parse(localStorage.getItem('aeon_academy_progress')||'{}');store[key]=n+1;localStorage.setItem('aeon_academy_progress',JSON.stringify(store));}
function nextSlide(){if(currentSlide0){showSlide(currentSlide-1);window.scrollTo(0,0);if(speaking)speakCurrent()}}
function answerQuiz(si,oi){if(quizAnswers['q'+si]!==undefined)return;let q=slides[si].quiz,correct=q.correct===oi,key='q'+si;quizAnswers[key]=correct;if(correct)totalScore++;document.getElementById('quizScore').textContent=totalScore;document.querySelectorAll('#quizOptions'+si+' .quiz-option').forEach(b=>b.disabled=true);document.getElementById('opt'+si+'_'+oi).classList.add(correct?'correct':'wrong');document.getElementById('opt'+si+'_'+q.correct).classList.add('correct');let fb=document.getElementById('quizFeedback'+si);fb.className='quiz-feedback show '+(correct?'correct':'wrong');fb.textContent=(correct?'β Correct! ':'β ')+q.explanation;document.getElementById('quizNextBtn'+si).style.display='inline-block';document.getElementById('dot'+si).classList.add('done')}
function answerCase(si,oi){if(quizAnswers['c'+si]!==undefined)return;quizAnswers['c'+si]=true;let c=slides[si],ok=c.correct===oi;for(let i=0;i>>0}let out='';for(let i=0;i<5;i++){out+=C[h%C.length];h=((h<<5)+h+17)>>>0}let sum=0;for(let i=0;i<5;i++){sum+=out.charCodeAt(i)}out+=C[sum%C.length];return 'AUROVA10-'+out}
function aeCertNum(){const d=new Date();const y=String(d.getFullYear()).slice(-2);const m=String(d.getMonth()+1).padStart(2,'0');const r=Math.random().toString(36).slice(2,7).toUpperCase();return 'Aurova-'+COURSE_ID.toUpperCase()+'-'+y+m+'-'+r}
function getCertData(){let key='aeon_cert_'+COURSE_ID;let d=JSON.parse(localStorage.getItem(key)||'null');if(!d){d={num:aeCertNum(),code:aeCode(COURSE_ID+Date.now())};localStorage.setItem(key,JSON.stringify(d))}return d}
function copyCode(){let cd=getCertData();if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(cd.code).then(function(){var b=document.getElementById('copyBtn');if(b){b.textContent='β Copied!'}})}else{window.prompt('Copy your discount code:',cd.code)}}
function stripTags(h){return(h||'').replace(/<[^>]*>/g,' ').replace(/\s+/g,' ').trim()}function splitPoints(b){if(!b)return[];var out=[],re=/<(?:p|li)[^>]*>([\s\S]*?)<\/(?:p|li)>/g,m;while((m=re.exec(b))!==null){var t=stripTags(m[1]);if(t)out.push(t)}if(!out.length){var s=stripTags(b);if(s)out.push(s)}return out}function numPoints(a){return(a||[]).join('. ')}function clean(t){return(t||'').replace(/\s+([.,;:!?])/g,'$1').replace(/([.,;:!?])\s*\1+/g,'$1').replace(/([?!])\./g,'$1').replace(/\s+/g,' ').trim()}function slideText(s){if(!s)return'';var head='';var r='';if(s.type==='title')r=head+s.title+'. '+stripTags(s.body);else if(s.type==='objectives')r=head+s.title+'. '+numPoints(s.items);else if(s.type==='content')r=head+s.title+'. '+numPoints(splitPoints(s.body));else if(s.type==='example')r=head+'Worked example. '+s.title+'. '+numPoints(splitPoints(s.body));else if(s.type==='summary')r=head+'Summary. '+s.title+'. '+numPoints(s.points);else if(s.type==='diagram')r=head+s.title+'. '+stripTags(s.caption);else if(s.type==='case')r=head+'Case study. '+stripTags(s.scenario)+'. '+stripTags(s.question);else if(s.type==='quiz')r=head+'Quiz. '+stripTags(s.quiz.question)+'. Your options are '+s.quiz.options.map(function(o,i){return String.fromCharCode(65+i)+', '+stripTags(o)}).join('. ');else if(s.type==='lab')r=head+'Lab exercise. '+stripTags(s.task)+'. '+numPoints(s.steps);else if(s.type==='completion')r=head+s.title+'. '+stripTags(s.body);return clean(r)}
function speakCurrent(){if(!speaking)return;synth.cancel();let text=slideText(slides[currentSlide]);if(!text)return;let u=new SpeechSynthesisUtterance(text);var fv=bestVoice||chooseVoice(synth.getVoices()||[]);if(fv)u.voice=fv;u.rate=0.9;u.pitch=1.0;u.lang=fv&&fv.lang?fv.lang:'en-US';u.onend=()=>{};synth.speak(u)}
function toggleVoice(){if(speaking){synth.cancel();speaking=false;document.getElementById('voiceBtn').classList.remove('speaking');document.getElementById('voiceBtn').textContent='π Read Aloud';return}speaking=true;document.getElementById('voiceBtn').classList.add('speaking');document.getElementById('voiceBtn').textContent='π Voice On';speakCurrent()}
function chooseVoice(vs){if(!vs||!vs.length)return null;var i,j,n;for(j=0;j=0)return vs[j]}}for(j=0;j{if(e.key==='ArrowRight')nextSlide();if(e.key==='ArrowLeft')prevSlide();if(e.key===' '){e.preventDefault();toggleVoice()}});
function overallGrade(){var gb=JSON.parse(localStorage.getItem('aeon_gradebook')||'{}');var c=0,p=0,l=0,lt=0,d=0;for(var k in gb){var g=gb[k];c+=g.correct||0;p+=g.possible||0;l+=g.labs||0;lt+=g.labTotal||0;if(g.done)d++}var qz=p?Math.round(c/p*100):0;var lb=lt?Math.round(l/lt*100):0;var ov=Math.round(qz*0.7+lb*0.3);return{correct:c,possible:p,labs:l,labTotal:lt,done:d,quiz:qz,lab:lb,overall:ov}}
function turnInLab(n){var a=document.getElementById('labAnswer'+n).value.trim();var fb=document.getElementById('labFeed'+n);if(a.length<40){fb.className='quiz-feedback show wrong';fb.textContent='β Too short β describe what you did, your paper-trader results, and what you learned (min 40 characters).';return}var gb=JSON.parse(localStorage.getItem('aeon_gradebook')||'{}');var g=gb[COURSE_ID]=gb[COURSE_ID]||{correct:0,possible:0,labs:0,labTotal:0};g.labDone=g.labDone||{};if(g.labDone[n]){fb.className='quiz-feedback show correct';fb.textContent='β Lab already turned in β not double-counted.';return}var labTotal=slides.filter(x=>x.type==='lab').length;if((g.labs||0)>=labTotal){fb.className='quiz-feedback show correct';fb.textContent='β All labs already turned in.';return}g.labDone[n]=true;g.labs=(g.labs||0)+1;localStorage.setItem('aeon_gradebook',JSON.stringify(gb));fb.className='quiz-feedback show correct';fb.textContent='β Lab turned in β graded PASS. Your running grade is recorded.';document.getElementById('dot'+n).classList.add('done')}
renderSlides();