0% found this document useful (0 votes)
27 views47 pages

Industrial Training Report

The Industrial Training Report by Deepak Pal details his six-month internship at Magpie xyz, focusing on blockchain technology and its applications. The report includes sections on blockchain characteristics, architecture, training experiences, and his contributions at the company. It emphasizes the importance of mentorship and practical exposure gained during the training period.

Uploaded by

deepakpalrocks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views47 pages

Industrial Training Report

The Industrial Training Report by Deepak Pal details his six-month internship at Magpie xyz, focusing on blockchain technology and its applications. The report includes sections on blockchain characteristics, architecture, training experiences, and his contributions at the company. It emphasizes the importance of mentorship and practical exposure gained during the training period.

Uploaded by

deepakpalrocks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 47

1

INDUSTRIAL TRAINING REPORT

Magpie xyz

Submitted by
Deepak Pal
(Roll No: UE205032)

Under the Guidance of


Priyanshu Srivastava
Senior Front-end Engineer

Department of Electronics and Communication Engineering

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


2
UNIVERSITY INSTITUTE OF ENGINEERING & TECHNOLOGY PANJAB
UNIVERSITY, CHANDIGARH

Jan-June 2024

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


3

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


4

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


5

DECLARATION

I hereby declare that the project work entitled Penpie is an authentic record of my own work
carried out at Magpie xyz as requirements of six months Industrial Training for the award Of
the degree of B.E ELECTRONICS AND COMMUNICATION ENGINEERING at
University Institute of Engineering & Technology, Panjab University, Chandigarh under the
guidance of Priyanshu Srivastava (Senior FE Engineer @Magpiexyz).

During 1-Jan-2024 to 29-June-2024

Date:12-07-2024
UE205032
Deepak Pal

Certified that the above statement made by the student is correct to the best of my/our
knowledge and belief.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


6

MENTOR CERTIFICATE

It is hereby certified that the work presented in the training report entitled INDUSTRIAL
TRAINING REPORT at Magpie xyz, for the partial fulfillment of the requirement for the
award of the Degree of Bachelor of Engineering in Electronics and Communication from
University Institute of Engineering and Technology, Panjab University, Chandigarh, is an
authentic record of work carried out by me during my 8th semester Industrial
Training/Internship at Magpie xyz. The matter embodied in this report has not been submitted
for the award of any other degree.

During 1-Jan-2024 to 29-June-2024

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


7

Deepak Pal
UE205032
8th Semester
ECE

This is to certify that the above statement made by the candidate is correct to the best of my
knowledge and belief.

Dr. Gurpreet Kaur Professor,


ECE Department, UIET,
Panjab University,
Chandigarh

Acknowledgement

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


8
I would like to express my heartfelt gratitude to the following individuals and organizations
who have played a significant role in the successful completion of my industrial training at
Magpiexyz:

First and foremost, I extend my heartfelt thanks to Priyanshu Srivastava for his leadership
and guidance throughout my internship journey. His mentorship has been invaluable,
providing me with a solid foundation to grow both personally and professionally.

I am grateful for their guidance, support, and trust throughout the internship period. Their
expertise and insights have been instrumental in shaping my understanding of the industry
and enhancing my professional skills.

I extend my sincere appreciation to my seniors at Magpie xyz for their unwavering support
and valuable advice. Their willingness to share their knowledge and experiences has been
invaluable in expanding my understanding of software engineering principles and practices. I
am grateful for the collaborative work environment they fostered, which allowed me to learn
and grow as a professional.

I would also like to express my gratitude to UIET for incorporating industrial training as part
of the curriculum and providing me with the opportunity to gain practical exposure. The
academic foundation and theoretical knowledge I acquired from my college studies have
served as a strong base for my performance during the internship. I am thankful to the faculty
members for their guidance and encouragement throughout my academic journey.

Lastly, I would like to acknowledge the support and understanding of my family and friends,
who have been a constant source of motivation and encouragement. Their unwavering belief
in my abilities has been pivotal in my professional development.

In conclusion, I am immensely grateful to all those mentioned above and to everyone else
who has contributed to my growth during this internship. Their support and guidance have
played a crucial role in shaping my skills, knowledge, and professional ethics. I am truly
thankful for the opportunities and experiences I gained at Magpie xyz

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


9

TABLE OF CONTENTS
TRAINING COMPLETION CERTIFICATE………………………………………………………ii.
CANDIDATE DECLARATION……………………………………………………………………..iv.
MENTOR CERTIFICATE……………………………………………………………………………v.
ACKNOWLEDGEMENT…………………………………………………………………………….vi.

CHAPTER 1: INTRODUCTION 8-9

1.1 Blockchain Characteristics and Components……………………………………….. 8


1.2 Who uses Blockchain………………………………………………………………... 8
1.3 Advantages of Blockchain……………………………………………………………9

CHAPTER 2: THEORY 10-15

2.1 Architecture of Blockchain…………………………………………………………10


2.2 Merits of Blockchain Technology………………………………………………….12
2.3 Features of Blockchain Technology………………………………………………..13
2.4 Who will use the blockchain in the future………………………………………….14

CHAPTER 3: BLOCKCHAIN TRAINING 17-23

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


10
3.1 Solidity… ……………………………………………………………………….. 17
3.2 Typescript………………………………………………………………………….19
3.3 Hardhat…………………………………………………………………………….20
3.4 Web3.JS & Ether.JS……………………………………………………………….22
3.5 Advanced Mathematical Gas Optimization Techniques…………………………..23

CHAPTER 4 : MAGPIE ECOSYSTEM 26-29

4.1 Subdao Model of Magpie Ecosystem……………………………………………….. 26


4.2 Protocols over which Magpie SubDaos are built……………………………………. 27
4.3 Achievements of Magpiexyz…………………………………………………………. 28

CHAPTER 5: MY ROLE IN THE COMPANY 30-31

5.1 Concepts Learned……………………………………………………………………… 30


5.2 Skills Acquired………………………………………………………………………… 30
5.3 Features worked upon…………………………………………………………………. 31

CHAPTER 6: CONCLUSION 32

6.1 Conclusion………………………………………………………………………………32

REFERENCES………………………………………………………………………...33

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


11
CHAPTER 1:
INTRODUCTION

A Blockchain has as many blocks as transactions, and each block refers to the previous block, and all
these blocks together are called a Blockchain. Blockchain technology is very effective because
multiple copies of a Blockchain are spread across multiple computers via the Internet, due to which it
is not possible to alter them.

1.1 Blockchain Characteristics and Components

Ledger: is any file having a constantly growing record related to the transaction.
Permanent: transaction means that once the transaction goes inside a Blockchain, it is stored
permanently in the record and immutable.
Secure: Information is stored securely through this technology as highly advanced cryptographic
techniques are used to ensure that your information is locked within the Blockchain.
Chronological: It means every transaction occurs after the previous one.

1.2 Who Uses Blockchain


It has a wide discipline of uses as it can be integrated into multiple domains. As it acts as a distributed
ledger over the internet, it can be used in handling cryptocurrencies and other promising areas of e-
banking, fintech, government systems, insurance, healthcare, retails, and transactions.

Fig 1.1 Chain Formation of Blockchain

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


12

1.3 Advantages of Blockchain

Time reduction: In finance, Blockchain allows for a speedy resolution of trades with high
reliability and security. It does not take long to verify, settlement as well as clearance.
Unchangeable transactions: This technology has the characteristics of registering transactions
in a sequential order that is used for certifying the inalterability of all operations, which
means all the transactions are immutable; Therefore, modification is restricted, and the
integrity of the data is preserved.
Reliability: It certifies as well as confirms the uniqueness of each party of the chain hence
eliminates duplicate records, accelerates transactions, and reducing rates.
Security: Blockchain uses SHA-256 hashing algorithm cryptography to ensure that the
information inside the blockchain is secured. It uses distributed laser technology. Each party
will keep a copy of the original chain so that the system remains functional even if any node
is separated.
Collaboration: This allows each party to transact directly with each other without the need for
a third-party intermediary.
Decentralized: This is because there is no central authority that supervises the entire system
process. There are certain paradigms and rules on which each node interacts with Blockchain
information. Someone buys some article and that article went out of stock we will have to
immediately reflect the changes to the user. Also we will have to keep our database updated.
We have also taken care of security of our website like our website is cannot be harmed by
sql injection or nobody can breach into the privacy of our users because all the sensitive
information is stored in encrypted format.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


13

CHAPTER 2:
THEORY

A Blockchain is a distributed database that handles a rigorous list of records, (termed as


blocks), safe from tampering.
Blockchain public ledgers record transactions between two parties in a verifiable and
permanent manner. Blockchain’s design is secure with distributed computing system obeying
fault tolerance.
Blockchain records, documents, events, identity management, management activities,
medical records, and transaction processing.
The origination of the blockchain made it the primary digital currency far away from the
central server. This design later turned into an inspiration for other applications.

2.1 Architecture of Blockchain


Important design aspects in the architecture of a Blockchain are –

Blockchain platform
Nodes
Network Platform Stack
Transactions

Blockchain Platform:
The Blockchain runs on distributed servers. The Blockchain data is stored either in a flat file
or in an RDB based on the choice of the user.
The Blockchain software operation is so massive that it is impossible to hack into the
application. The nodes within the network use a peer-to-peer IP network to verify

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


14

transactions.
When numerous nodes have the same blocks within their databases, they are regarded to be in
consensus.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


15

Nodes in the Blockchain:


A Blockchain network is a peer to peer working on the IP protocol of the internet with a
specific server node.
Each node forms a replicated copy of the database along with the information of the owner.
The consensus mechanism specifies the blockchain updates.
Each node plays a specific role based on its business intention. Every node joins the network
accordingly.

Network Protocol Stack:


Once nodes get booted up, they conduct a peer discovery using a port over TCP. The
Blockchain Network Architecture maintains the standard semantics to enable multiple types
of blockchains to co-exist with management abstraction.

Transactions and Blocks:


Applications use blockchain records to conduct transactions and blocks. Salient features –
Creation of transactions using a Mobile Wallet or any other app.
Transactions store business data in the blockchain depending on specific sequences. Blocks
are recorded in a validated sequence.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


16

Fig 2.1 Working of Ledger on Blockchain

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


17

2.2 Merits of Blockchain technology

Eliminating intermediation

The exchange between two parties is made possible without any necessary intermediation from
the third party. This process strongly eliminates the risk from outer parties.

Authorized users

Users are completely aware of all their data and information regarding transactions. Standard

data

Data in Blockchain is intact, stable, apt, precise, and wholly accessible.

Reliability

Blockchain does not deal with a central point of failure, as it is built with decentralized
networks. Due to this feature, Blockchain is able to withstand malicious attacks.

Integration of process

Transactions are well - executed same as the protocol commands. This access removes
intermediation of a third party site.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


18

Transparency

Alterations to blockchains are available for use by all parties. This results in transparency, and
immutability while performing transactions.

Simplified Ecosystem

All transactions are added to an autonomous public ledger. This reduces the complications
associated with multiple ledgers.

Quicker transactions

Interbank transactions take much time, in fact, days for final settlement, mainly out of working
hours. Blockchain transactions lessen this transaction time to just a few minutes.

Lesser transaction costs

By eradicating the third-party intermediaries, blockchains rise to the potential of greatly


reducing the fee regarding the transaction.

2.3 Features of Blockchain Technology

Blockchain technology created the backbone of a new type of internet allowing distributed
digital information.

A distributed database

The blockchain database is kept open, public and readily verifiable, and accessible. It is

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


19

difficult for a hacker to corrupt the centralized version of this information.

Durability and robustness

Blockchain technology possesses built-in robustness. It stores blocks of identical data across its
network, which ensures:
- Be controlled by any single entity.
- Has no single point of failure

Transparent and incorruptible

Blockchain network stays in a state of consensus and automatically checks within itself. The
network reconciles each transaction within a span of a ten-minute interval. Two significant
features are:
-Transparency : data is embedded public within the entire network.
-Incorruptible : Huge amount of computing power is utilized to override the network while
altering a single unit of data.

The idea of decentralization

By design, the blockchain is a decentralized technology. Decentralization means the network


operates on a user-to-user basis. The forms of mass collaboration this makes possible are just
beginning to be investigated.

The Blockchain & Enhanced security

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


20

Blockchain stores the data along with its network. This feature reduces the risks associated with
the data. Security methods of the Blockchain employ encryption technology, making data
incorruptible.

A second-level network

With blockchain technology, the web gains a new layer of functionality. With the added
security brought by the blockchain, new internet business is on track to unbundle the traditional
institutions of finance.

2.4 Who will use the blockchain in the future

The blockchain potentially cuts out the middleman for a huge type of transaction. Currently,
finance offers the strongest use cases for blockchain technology.
Wallet applications are the most common GUI devised for the blockchain. This methodology
is attainable even to the general public with basic knowledge of computing.
Blockchain shows great promise across a wide range of business applications like:
-Banking
-Finance
-Government
-Healthcare
-Insurance
-Legal
-Manufacturing
-Media and Entertainment
-Retail

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


21

-Supply Chain and Logistics

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


22

CHAPTER 3:
BLOCKCHAIN TRAINING
At first training consisted of Introduction to Blockchain, Blockchain Networks focusing
mainly on the Ethereum, Arbitrum, BNB Smart Chain, Optimism Networks. Learning about
the Block confirmations and the transactions gas fees comparisons along with the security
Levels and Native Currency Tokens of these Networks.

Fig 3.1 Various Blockchain Networks

Also learnt about Block Explorers, using Tenderly for analyzing transactions, contract calls
and gas utilization for various calls.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


23

Fig. 3.2 : A successful Transaction for analysis on the Tenderly development platform

Used Block Explorers for actual mainnet executed transactions and to figure out the causes of
failed transactions:

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


24

Fig. 3.3: A multiple ERC20- transfer transaction on the Ethereum mainnet network

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


25

3.1 Solidity
Solidity is an object-oriented, high-level language for implementing smart contracts. Smart
contracts are programs that govern the behavior of accounts within the Ethereum state.

Solidity is a curly-bracket language designed to target the Ethereum Virtual Machine (EVM).
It is influenced by C++, Python, and JavaScript. You can find more details about which
languages Solidity has been inspired by in the language influences section.

Solidity is statically typed, supports inheritance, libraries, and complex user-defined types,
among other features.

With Solidity, you can create contracts for uses such as voting, crowdfunding, blind auctions,
and multi-signature wallets.

When deploying contracts, you should use the latest released version of Solidity. Apart from
exceptional cases, only the latest version receives security fixes. Furthermore, breaking
changes, as well as new features, are introduced regularly. We currently use a 0.y.z version
number to indicate this fast pace of change.

Created and deployed my own ERC-20 Token which is exactly like a new crypto currency
that can be bought and sold for actual USDT(stablecoin)

Fig. 3.4 : A sample implementation of a mock ERC20 custom token

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


26

Using the openzeppelin’s secure ERC20 STandard Library:


https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/
ERC20
/ERC20.sol

An Ethereum smart contract is a type of account executed as a program with a code and data

collection. It resides at a particular address on the Ethereum blockchain.

Functioning as a type of Ethereum account, smart contracts can hold a balance and send

transactions over the network. However, it is noteworthy that they are deployed to the

network instead of being controlled by a user. They run according to how they are

programmed, and user accounts can interact with them by submitting transactions according

to the specific smart contract functions.

Just like a regular contract, smart contracts define rules. However, the difference lies in its

execution. Instead of just defining rules, smart contracts enforce them through code. Also,

interactions with smart contracts are irreversible and they cannot be deleted by default.

Complex blockchain programs like Ethereum are highly experimental. There are constant

changes and whenever new bugs or loopholes are discovered, new best practices are

introduced. Hence, the security landscape is always changing and differs from one aspect to

the other.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


27

Fig. 3.5 : Best practices for Smart contract development


3.2 Typescript

What is TypeScript
JavaScript and More

TypeScript adds additional syntax to JavaScript to support a tighter integration with your
editor. Catch errors early in your editor.

A Result You Can Trust

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


28

TypeScript code converts to JavaScript, which runs anywhere JavaScript runs: In a browser,
on Node.js or Deno and in your apps.

Safety at Scale

TypeScript understands JavaScript and uses type inference to give you great tooling
without additional code.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


29

Fig. 3.6 : Typescript features that are additional to Javascript

3.3 Hardhat

Hardhat is a development environment for Ethereum software. It consists of different


components for editing, compiling, debugging and deploying your smart contracts and
dApps, all of which work together to create a complete development environment.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


30

Hardhat Runner is the main component you interact with when using Hardhat. It's a flexible
and extensible task runner that helps you manage and automate the recurring tasks inherent to
developing smart contracts and dApps.

Hardhat Runner is designed around the concepts of tasks and plugins. Every time you're
running Hardhat from the command-line, you're running a task. For example, npx hardhat
compile runs the built-in compile task. Tasks can call other tasks, allowing complex

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


31

workflows to be defined. Users and plugins can override existing tasks, making those
workflows customizable and extendable.

This guide will take you through the installation of our recommended setup, but as most of
Hardhat's functionality comes from plugins, you are free to customize it or choose a completely
different path.

# Installation
TIP
Hardhat for Visual Studio Code is the official Hardhat extension that adds advanced support for
Solidity to VSCode. If you use Visual Studio Code, give it a try!
Hardhat is used through a local installation in your project. This way your environment will be
reproducible, and you will avoid future version conflicts.
To install it, you need to create an npm project by going to an empty folder, running npm init,
and following its instructions. You can use another package manager, like yarn, but we
recommend you use npm 7 or later, as it makes installing Hardhat plugins simpler.

Once your project is ready, you should run

Fig. 3.7 : Hardhat local installation command(Non-Local installations are not supported)

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


32

To use your local installation of Hardhat, you need to use npx to run it (i.e. npx hardhat init).

3.4 Web3.js & Ether.js

Web3.js
web3.js - Ethereum JavaScript API
web3.js is a collection of libraries that allow you to interact with a local or remote ethereum

node using HTTP, IPC or WebSocket. The web3.js library is a collection of modules that
contain functionality for the ethereum ecosystem. web3-eth is for the ethereum blockchain and
smart contracts. web3-shh is for the whisper protocol, to communicate p2p and broadcast.
web3-bzz is for the swarm protocol, the decentralized file storage.
web3-utils contains useful helper functions for Dapp developers. Adding web3.js First you need
to get web3.js into your project. This can be done using the following methods:
npm: npm install web3 yarn: yarn add web3
pure js: link the dist/web3.min.js
After that you need to create a web3 instance and set a provider.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


33

Most Ethereum-supported browsers like MetaMask have an EIP-1193 compliant provider


available at window.ethereum.

For web3.js, check Web3.givenProvider.

If this property is null you should connect to a remote/local node.

// In Node.js use: const Web3 = require('web3');

const web3 = new Web3(Web3.givenProvider || "ws://localhost:8545");


That’s it! now you can use the web3 object.

a) Ether.js

What is Ether.js?
The ethers.js library aims to be a complete and compact library for interacting with the
Ethereum Blockchain and its ecosystem. It was originally designed for use with ethers.io and
has since expanded into a more general-purpose library.

Features
Keep your private keys in your client, safe and sound
Import and export JSON wallets (Geth, Parity and crowdsale)
Import and export BIP 39 mnemonic phrases (12 word backup phrases) and HD Wallets
(English, Italian, Japanese, Korean, Simplified Chinese, Traditional Chinese; more coming
soon)

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


34

Meta-classes create JavaScript objects from any contract ABI, including ABIv2 and Human-
Readable ABI
Connect to Ethereum nodes over JSON-RPC, INFURA, Etherscan, Alchemy, Cloudflare or
MetaMask.
ENS names are first-class citizens; they can be used anywhere an Ethereum addresses can be
used
Tiny (~88kb compressed; 284kb uncompressed)
Complete functionality for all your Ethereum needs
Extensive documentation
Large collection of test cases which are maintained and added to
Fully TypeScript ready, with definition files and full TypeScript source
MIT License (including ALL dependencies); completely open source to do with as you please

3.5 Advanced Mathematical Gas Optimization Techniques

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


35

Fig. 3.8 : The update rewards method of the Base Reward Pool Smart Contract(the entire smart
contract is 500+ lines of code)

The rewardPerTokenPaid implementation is quite common in smart contract development


where the rewards, instead of being stored individual values for every user, are stored as a
whole and updated for the user at the time whenever the user submits a transaction for
execution.
This technique saves up a lot of gas fee in the blockchain that is used for further transactions
thereby optimizing the smart contract as a whole.

This particular technique requires a clear mathematical understanding of delayed rewards in


the blockchain.

Similarly, a Stream Rewarder can be implemented by going a level up

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


36

Fig. 3.9 : The update reward method of the Stream Rewarder( the entire smart contract is
500+ lines of code)

This is even more complex and requires a deeper understanding of the delayed rewards
concept.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


37

CHAPTER 4
MAGPIE ECOSYSTEM

The Magpie XYZ Ecosystem & Magpie


Magpie XYZ is an ecosystem of DeFi protocols that provide yield and veTokenomics
boosting services across multiple blockchain networks.

Magpie is the first protocol within Magpie XYZ, designed to provide yield and
veTokenomics boosting services for Wombat Exchange. Incubated by Wombat Exchange,
Magpie is focused on locking WOM tokens to own governance rights and boosted yield
benefits as liquidity provider on Wombat.
The platform offers users the opportunity to deposit their Stablecoins, BNB, Liquid BNB,
frxETH, ETH, WOM, mWOM tokens in single-sided boosted pools to earn high APR %
while it allows Wombat Exchange voters to cost-effectively acquire voting power and earn
passive income at the same time through the MGP token.
Magpie offers WOM holders the chance to earn high APR by converting their tokens into
mWOM. mWOM refers to "Magpie WOM". mWOM can be staked on Magpie to earn
boosted passive income.
When users convert their WOM tokens, they get mWOM that allows them to earn high
rewards while Magpie locks all the converted WOM as veWOM on Wombat Exchange.
That's how Magpie accumulates veWOM. veWOM entitles Magpie to boosted WOM
rewards and governance benefits on Wombat Exchange. That's why Magpie can offer users
sustainable boosted passive income.

4.1 The SubDAO Model


The Inception of SubDAO Model

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


38

Our SubDAO model signifies a groundbreaking initiative by to incubate new protocols that
fortify veTokenomics-based protocols within the sprawling DeFi ecosystem. This initiative
involves the birth of SubDAOs — sub-decentralized autonomous organizations — each
crafted with a bespoke purpose and function that harmonizes with the parent protocol. The
cornerstone of the SubDAO model is a symbiotic alliance between Magpie and the protocols
it supports, fostering an environment where both entities thrive and collectively contribute to
the larger growth of the DeFi landscape. The Magpie treasury is entitled to 20% of the total
token supply from each SubDAO following a 2-year vesting period; this approach provides
governance benefits and a new source of income for vlMGP holders.
Benefits of SubDAOs for vlMGP holders
Low FDV SubDAO : vlMGP holders can secure allocations for the Initial DEX Offerings
(IDO) of our SubDAOs tokens, thus facilitating easier access to these new tokens at a
competitive price.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


39

Revenue Sharing from SubDAOs: vlMGP holders are entitled to a share of the revenue
generated by the SubDAOs, providing them with a new stream of passive income.
SubDAOs Voting Power: vlMGP holders are granted voting rights within the SubDAOs,
empowering them to directly influence decisions and drive the direction of the SubDAOs.

4.2 Protocols over which Magpie SubDaos are built

Magpie has currently 6 SubDao’s all of which are built on different DEXes and

DAOs. The 6 protocols are viz.

1. Magpie - built over Wombat Exchange


2. Penpie - built over Pendle Finance
3. Radpie - built over Radiant Capital
4. Cakepie - Built over Pancake Swap
5. Campie - built over Camelot DEX
6. Eigenpie - Built over Eigen Layer

Magpie Ecosystem boasts a TVL of more than $700M making it among the top 20 players in
the deFI sector.

The TVL distribution for the SubDao’s is

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


40

Fig. 4.1: Magpie Ecosystem’s distribution of TVL from various SubDao’s

4.3 Achievements of Magpie xyz

7. Magpie XYZ crossed the $100M TVL mark this year.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


41

8. Magpie XYZ created its own IDO Launchpad platform and performed two
successful IDOs.

9. The RDP IDO accumulated a total of $1.5M(around 12 Crore INR) in


November 2023.

10. The CKP IDO accumulated a total of $2.6M(around 22 Crore INR) in January 2024.

11. Magpie XYZ received Arbitrum grant of more than $2.5M(around 21 crore INR)
in October 2023.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


42

Fig. 4.2: The CKP token IDO’s sale accumulation($2.6M)

Fig. 4.3 : Magpie Ecosystem’s ARB STIP distribution to various SubDao’s

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


43

CHAPTER 5
MY ROLE IN THE COMPANY

5.1 Concepts Learned

a. Understanding of blockchain concept, decentralization and its role in the


finance sector
b. Understanding the transactions and the execution of the submitted txns by various
nodes that operate on the open blockchain network that is accessible and open to
all.
c. Learned using block explorers for analyzing transactions
d. Used tenderly for checking gas fee for various operations on different networks
of blockchain
e. Forked blockchain networks using tenderly and connected blockchain sites with
my owned forked network to simulate various actions on the network
f. Learned about cryptocurrencies, their anonymous nature, pegged stable coins that
hold specific values and the market trends and supply demand economics for these
alt coins
g. Researched about Bitcoin, its origin, future and the Halving process that occurs
once every 4 years, its significance and impact on the networks.

5.2 Skills Acquired

a. Solidity - An Object Oriented Programming Language for implementing Smart


Contracts for various blockchain platforms.
b. Typescript - A high-level programming language developed by Microsoft that adds
static typing with optional type annotations to JavaScript.
c. Hardhat - A development environment for Ethereum software. It consists of different
components for editing, compiling, debugging and deploying of smart contracts and
dApps.
d. Web3Js - A collection of libraries that allow websites to interact with a local or
remote ethereum node using HTTP, IPC or WebSocket.
e. Mocha - A feature-rich JavaScript test framework running on Node.js making
asynchronous testing simple.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


44

f. AWS Cloud - Used by Magpie for managing various API services that are used for
off chain calculations.

5.3 Feature worked upon

In the last 2 months, in addition to learning about the various blockchain concepts, tools and
languages, I also had to work on solving a real world problem of the Magpie Ecosystem.

The Magpie Ecosystem received an ARB token STIP of around $2.5M(around 21 Crore INR)
in October 2023. The distribution of part of this STIP to magpie ecosystem stakeholders was
to be done using a ARB rewarder, the ARB rewarder was to be a secure and robust smart

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


45

contract that had to be funded by the $2.5M STIP and had to be deployed and configured
with extreme care by multisig owners to avoid any loss of funds.

The implementation of the ARB rewarder

Fig. 5.1 : The ARB rewarder contract’s last few lines of implementation

The final implementation was a 200+ lines Smart Contract that utilized various libraries and
security parameters to distribute ARB rewards among the stakeholders according to their
current positions and the time of their recent deposits including various other factors. The
immutable contract was deployed via the opnezeppelin’s upgradeable and ownable proxy
pattern so that vulnerabilities can be fixed to minimize the losses in case a vulnerability

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


46

occurs in the worst scenario after the Audit and security checks.

Also worked on the Stream rewarder and the vlStream rewarder for magpie to reduce the
user’s wait time for the distribution of rewards upon harvest, this saves gas for manual
harvest at smaller intervals but increases the gas that user had to pay by a tiny bit overall
improving the efficient and running cost of the Penpie.

CHAPTER 6
CONCLUSION

Training at Magpie xyz helped me grasp the knowledge of the blockchain world, diving into
the deFi protocols governance, elimination of the centralization and efficient usage of the
Proof of Work mechanism allows for transparent and trustworthy protocols.
I leant the usage of tools and technologies like Solidity, Hardhat, Block Explorers, was given
test funds to learn about the product of the Magpie Ecosystem by actually providing Liquidity
and getting governance power on the Magpie Ecosystem, it all helped me have a deeper
understanding of the decentralization mechanism the the blockchain aims to implement into
this world.
In addition to the usage of the blockchain I also had to deep dive into the blockchain’s internal
architecture for integrating with Babylon chain, I had to take a closer look into the Proof of
work mechanism of the EVM chains and replace with the Proof of Stake mechanism.
The overall experience at Magpie xyz has given me blockchain skillset that I can use to easily
secure a job into the deFi(decentralized finance) space.

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh


47

Bibliography /references

• https://www.w3schools.com/js/
• https://docs.magpiexyz.io/
• https://git-scm.com/
• https://docs.aws.amazon.com/
• https://hardhat.org/docs
• https://book.getfoundry.sh/
• https://ethereum.org/en/developers/docs/
• https://docs.soliditylang.org/en/v0.8.26/
• https://docs.soliditylang.org/en/v0.8.26/layout-of-source-files.html
• https://docs.radiant.capital/radiant
• https://www.typescriptlang.org/docs/
• https://docs.github.com/en
• https://www.blockchain.com/explorer/api
• https://docs.tenderly.co/
• https://docs.layerzero.network/v2
• https://docs.babylonchain.io/
• https://docs.arbitrum.foundation/gentle-intro-dao-governance
• https://docs.eigenlayer.xyz/eigenlayer/overview/whitepaper

Department of Electronics and Communication Eng. – UIET, Panjab University, Chandigarh

You might also like