Løυıs 🔺💙 | 🌊📘

159 posts

Løυıs 🔺💙 | 🌊📘 banner
Løυıs 🔺💙 | 🌊📘

Løυıs 🔺💙 | 🌊📘

@Louis_Mslf

Lead Smart Contract Engineer at @lfj_gg | Auditor at @0xPaladinSec

Lyon, France Beigetreten Temmuz 2018
549 Folgt1.6K Follower
Løυıs 🔺💙 | 🌊📘 retweetet
LFJ.gg
LFJ.gg@LFJ_gg·
Token Mill: The Bonding Curve AMM (BCAMM) A new DEX standard designed for secure, accessible token creation and exchange. ___________________ As a creator on Token Mill, you can: • Earn trading fees from your token • Launch your token on any size + shape bonding curve • Allocate tokens to your project through a customizable vesting locker Token Mill empowers users with a built-in community flywheel, enabling them to earn trading fees and share in the success of both individual tokens and the platform itself. • Stake tokens to earn trading fees • Refer friends to earn additional protocol fees ___________________ 👉 Whitepaper: github.com/traderjoe-xyz/…
LFJ.gg tweet media
English
94
110
456
121K
CharlesWang
CharlesWang@0xCharlesWang·
The Billion Dollar Algorithm Simply Explained After literally having audited more than 100 Masterchef and Staking contracts, it’s time to share my knowledge with you, specifically the reward algorithm. The goal here is to demystify it by focusing on one of its core concepts: The accPerToken variable. Understanding this will illuminate how rewards are calculated and distributed in a way that's both fair and efficient. Understanding accPerToken At the heart of the MasterChef contract is the accPerToken variable. This variable plays a crucial role in tracking "the amount of rewards allocated to each token staked in a pool" It ensures that rewards are distributed proportionally to the amount of liquidity each participant provides. To simplify, imagine that Alice has staked 100 tokens in a pool. If the reward rate is set to 1e18 tokens per second, after 100 seconds, a total of 100e18 tokens will be distributed among participants as rewards. (Alice is the only participant at this moment) Here's where accPerToken comes into play: Time Passed: 100 seconds Rewards Generated: 1e18 * 100 = 100e18 tokens accPerToken: 100e18 (total rewards) * 1e18(multiplier) / 100e18 (total staked tokens) The calculation inflates accPerToken by 1e18 to avoid rounding issues, ensuring precision in reward distribution but the main logic is to simply just calculate how many rewards each nominal token receives. When calculating a user's reward, this inflated value is divided back by 1e18 to get the accurate reward amount: User Reward = user.amount * accPerToken / 1e18 Key Points to Remember Pool Updates: It's vital to update the pool and increase accPerToken with every balance change or interaction. This ensures that the reward distribution remains accurate and up-to-date. If this is not done accurately, the algorithm will be flawed. Claiming Rewards: When users change their balance (by adding or removing tokens), they must claim their accrued rewards. This step is critical to prevent manipulation of the accPerToken system. After claiming, the user's rewardDebt is updated, which tracks the amount of rewards already paid out to ensure correct future payments. These interactions, together with the correctness of the accPerToken variable increase lay the fundamental principle of the Masterchef reward algorithm. If there is any discrepancy, the logic is most likely flawed. Understanding the accPerToken variable is essential to grasp how rewards are calculated and distributed using the MasterChef contract. It ensures that rewards are allocated fairly based on the amount of liquidity each user provides to the pool. Remember, updating pools and claiming rewards are pivotal actions to maintain the integrity of the reward distribution mechanism. I hope this explanation sheds light on the inner workings of the Masterchef reward algorithm. It's designed to demystify the process and make the concept accessible, especially for newcomers. If you have further questions or need clarification on any point, feel free to ask! Attached below is an example from @TraderJoe_xyz written by @Louis_Mslf . The only difference is that this is using some other variable declarations but the logic is 100% the same.
CharlesWang tweet media
English
11
19
100
8.5K
Løυıs 🔺💙 | 🌊📘 retweetet
LFJ.gg
LFJ.gg@LFJ_gg·
Trader Joe introduces Merchant Moe, a purpose-built DEX for @0xMantle. Merchant Moe is an extension and franchise approach to expanding the innovative Liquidity Hub built by Trader Joe. $JOE holders are welcome to join this journey, starting with an airdrop of 2.5% of the total $MOE supply on TGE and a further 5% to be distributed over the coming 12 months. Follow @MerchantMoe_xyz for further announcements
Merchant Moe@MerchantMoe_xyz

Introducing Merchant Moe, a franchise of @TraderJoe_xyz Crafted to be the liquidity cornerstone of @0xMantle, Moe is building a trader’s oasis amongst the bustling DeFi markets on Mantle Network. Read about our upcoming journey below 👇

English
89
1.1K
6.4K
92.2K
CharlesWang
CharlesWang@0xCharlesWang·
My November stats: - found 1283 high risk issues - found 52617 medium risk issues Made a total of $690,690.69 from auditing. Had wild discussions with @Louis_Mslf Onboarded 200 new auditors, all making 200k per month now.
English
34
5
150
24.1K
jumbo
jumbo@moneyduplos·
Is there any reason to bit pack fields in solidity events, I have 12 fields I want to log that can fit in two uint256. Extra parsing on the indexers side but I'm thinking could be cheaper for gas.
English
1
0
0
272
Løυıs 🔺💙 | 🌊📘 retweetet
DavideFi
DavideFi@DavideFi·
Was a pleasure talking about Trader Joe at #SmartCon2023 One year ago during #smartcon me and @Louis_Mslf presented liquidity book for the first time, and this year we kickstarted the keynote with a retrospective on what we achieved in this time But that’s not everything 🥁 We also announced Banker Joe Pro: A lending marketplace for #RWA that will unlock tokenized finance opportunities for the regular Joe, matching supply and demand the Joe way. We are in conversations since months with the top players of the sector and are ecstatic of having finally shared with you all our intention to make a difference in this new exciting sector. You’ll hear more about Banker Joe very soon.
DavideFi tweet mediaDavideFi tweet media
English
8
14
74
7.3K
Løυıs 🔺💙 | 🌊📘
Løυıs 🔺💙 | 🌊📘@Louis_Mslf·
@moneyduplos @seva_nathan This works fine, but in some scenario where the call reverts without a reason, you'll be left with no error at all. I rather like using this pattern: #L22-L39" target="_blank" rel="nofollow noopener">github.com/traderjoe-xyz/… It also revert on address with no code (EOA..), you might want to remove this block if this is not wanted
English
1
0
1
22
jumbo
jumbo@moneyduplos·
solidity wizards, is there a way to propagate reversions that happen inside a `call` back up the the caller?
English
1
0
0
105
Marco De Vries
Marco De Vries@paladin_marco·
Anyone fun going to be at the Token2049 breakfast tomorrow? Turns out my team is going to continue working till too late tonight and will skip the breakfast... I need new frens (at least till like 11am lol)
English
2
0
6
1K
CharlesWang
CharlesWang@0xCharlesWang·
Limit Orders for @traderjoe_xyz Hear me out .. I have audited a lot of codebases and worked with a lot of great developers hand in hand, but there is one developer who is completely outstanding … @Louis_Mslf , no work is comparable to what he does.
CharlesWang tweet media
English
10
32
258
48.8K
Løυıs 🔺💙 | 🌊📘 retweetet
LFJ.gg
LFJ.gg@LFJ_gg·
Today, Trader Joe turns 2 years old 🎂 What a year it's been, evolving from a modest fork on Avalanche to shaping AMM innovation and expanding out into the multi-chain universe. Community has always been the backbone of Trader Joe, fueling our fire and bearing our flag. If you've been a part of this journey, we raise a toast to you. Cheers 🥂 Join us at 7pm UTC in the Trader Joe Discord for a special community call 🥳
English
52
78
324
23.6K
Løυıs 🔺💙 | 🌊📘 retweetet
BSA - EPFL 🦇🔊
BSA - EPFL 🦇🔊@bsaepfl·
🧵 Thread: Amazing Presentation by @traderjoe_xyz at EPFL's Blockchain Student Association (BSA) 🚀
English
4
7
27
6.9K
Secretsmoothies(🐻,🐟)
Secretsmoothies(🐻,🐟)@Secretsmo0·
Who are the best avax devs? Let's give some love to the hardworking and deserving members of our community
English
28
8
60
5.4K
Løυıs 🔺💙 | 🌊📘 retweetet
LFJ.gg
LFJ.gg@LFJ_gg·
Joe Campus Tours 🎓 General Manager @davidefi and Smart Contracts Lead @Louis_Mslf presented #LiquidityBook to Blockchain Societies of two top 10 universities! 📍@Cambridge_Uni 📍@imperialcollege All part of our mission to spread the word of LB to future industry leaders! 👇
LFJ.gg tweet media
English
13
25
105
12K
Grandma 👵🏽
Grandma 👵🏽@Grandma0x·
Finally made the jump 1 year after receiving this message, LFJ.
Grandma 👵🏽 tweet media
English
28
6
161
17.7K