Platypus AMA #2 — Technical Deep Dive with Mr.BeaverTail, Smart Contract Lead (Recap)

Published by AVAX on

Platypus AMA #2 — Technical Deep Dive with Mr.BeaverTail, Smart Contract Lead (Recap)

On 12/12/2021 at 12:00 p.m. (PST), an AMA session was held on Avalaunch with special guest Mr.BeaverTail ,Smart Contract Lead, at Platypus. Below we present to you an excerpt from AMA with questions and answers.

Dave Donnenfeld | Avalaunch

Hello and welcome honored viewers to our 2nd AMA with Platypus. Today we have Mr. BeaverTail with us to go into more detail on what is heralded to be a revolutionary project.

@MrBeaverTail is a visionary and we wanted to do something a little different today and ask some unpredictable questions. Sir, are you ready?

Mr. BeaverTail | Platypus

Hey guys ? glad to be here with you!

Yeah let’s do this

Dave Donnenfeld | Avalaunch

Let’s start off with a brief introduction about yourself. Can you tell us about your background, career path, and how you found yourself as the smart contract lead for Platypus?

Mr. BeaverTail | Platypus

I’m a software developer with a background in back-end applications, data and distributed systems.
I discovered cryptocurrencies back in 2014 when a professor at university told me he wanted me to find vulnerabilities in Bitcoin.

I really wanted to prove it was bullshit, so I started researching everything about it.

The more I started getting into it, the more I got sucked into the Matrix… it then became my passion

Back in 2019–2020 I started getting really interested in DeFi and its applications. Again, I am a very skeptical person. So I like to do my own research, read white papers, analyze the math… And really got interested in how we can disrupt the current financial system.

My opinion is that our current financial system only serves the purposes of a few people, and not the general population. So I really became a matter of purpose to me and I decided to leave everything behind and focus solely on DeFi

DeFi still has a long way to go to become “Open Finance” but it is the best we got as mortals.

Dave Donnenfeld | Avalaunch

This is some high minded thinking and the world appreciates it. Serves the greater good.

Outside of yourself, how many developers are working on Platypus? Who is responsible for front end and back end development, and how closely does that team need to work together?

Mr. BeaverTail | Platypus

We started out as a team of 4 people.

Currently, I think we have around 10 people helping with development

FrontEnd development is handled by Shinji, our FrontEnd Lead (kudos to his great job behind the scenes btw)

We work very closely and are in constant communication.

Dave Donnenfeld | Avalaunch

I think people are going to learn how important a project this can really be and the work you’re putting into truly making finance “open.”

for us mortals, can you simply describe your role as smart contract lead? And for anyone interested in pursuing a similar path, how do you suggest one get started?

Mr. BeaverTail | Platypus

As smart contract engineer, you need to have a broad knolwedge of computer science as a whole.

I got into it because I realized this was the missing piece of technology to get rid of all intermediaries.

With smart contracts, people can interact with financial systems without the need of an expensive broker or a lousy bank.

Dave Donnenfeld | Avalaunch

Disintermediation is a beautiful thing. Death to the fee taking middleman!

Mr. BeaverTail | Platypus

My role as a smart contract engineer is designing, implementing and maintaining our codebase to make sure it achieves its purpose: bring a financial service to our users

In our case, we want to provide the greatest stableswap experience to our users: lower slippage, greater capital efficiency and best UX

Security is one of the main aspects involved in smart contracts. I’d really suggest you to start there. It is what makes this job so special and so stressful at the same time.

Dave Donnenfeld | Avalaunch

The efficiency this could create is hard to overstate.

At a high-level, could you describe the Platypus smart contracts, what they do, and how they come together to create the smart contract architecture?

Mr. BeaverTail | Platypus

Platypus smart contracts are actually more complex than any other protocol I’ve seen from the mathematical standpoint.

If you’ve read our Yellow Paper, you can see that math is truly our foundation and our research team is damn good at it.

Dave Donnenfeld | Avalaunch

My color palette is limited to white but I may have to try now

Mr. BeaverTail | Platypus

So our architecture tries to keep things as simple as possible while keeping gas costs at a minimum, taking into account that several math operations are need to a user to perform a simple swap.

It is truly an accomplishment for us to provide a such simple service because it requires so many hours of research and development.

Dave Donnenfeld | Avalaunch

This is the big question from us lay people that have peeked under the hood — Uniswap, Curve, and other AMMs, rely on the use of invariant curves to establish the relationship between tokens in a liquidity pool. Platypus takes a different approach. Could you explain what an invariant curve is, what its shortcomings are, and how Platypus achieves an improvement over this design?

Mr. BeaverTail | Platypus

We need to explain first what an invariant is: a property of a mathematical function which remains unchanged after operations or certain transformation.

Dave Donnenfeld | Avalaunch

So it sounds like a catalyst

Mr. BeaverTail | Platypus

Yes, in a way it allows Uniswap/Curve pools to maintain a certain property.

So, no matter what happens, Uniswap invariant curve will always be : x * y = k

with k being the invariant of course

This was a big breakthrough at the time but nowadays we see its limitations: impermanent loss, the need to provide liquidity in pairs, fees, etc.

In the context of Stableswap, this will mean that the liquidity provider may get back asset as a combination of tokens that are different from what he / she has original provided.

An additional shortcoming for stableswap like Curve or Saddle is that their stableswap invariant requires all tokens within the same pool to have the same amount of liquidity to reach its equilibrium state, making the least popular token the bottleneck for the growth of the pool.

Moreover, it is impossible to add new tokens into existing pool (particularly if the new token’s liquidity is not comparable to other existing tokens in the pool), which hindering the scalability of the protocol.

Dave Donnenfeld | Avalaunch

Right. You’re there thinking “this isn’t what I signed up for.” So, Platypus offers DeFi users a stableswap with higher scalability and greater capital efficiency. Could you touch on what these concepts are and what the implications of progress forward in these areas means for both Platypus and DeFi as a whole?

Mr. BeaverTail | Platypus

Sure, to illustrate what capital efficiency is, we can head over to Uniswap analytics.

We can see that there are over +100 pools that contain ETH asset.

These pools do not communicate with each other

They do not make use of each other’s capital

There is a big percentage of the pool’s liquidity that is dormant

This is just a limitation of the invariant curve model. Curve tries to get around this limitation by increasing the amount of assets in the pool… But as I said earlier the bottleneck is always the least abundant token in the pool!

Dave Donnenfeld | Avalaunch

So…Defi is supposed to be inclusive, shared economy and resources but these pools are siloed.

So it defaults to the lowest common denominator

Mr. BeaverTail | Platypus

Exactly

In contrast, Platypus uses a single-variant slippage curve.

Dave Donnenfeld | Avalaunch

Right so instead of invariant curves, Platypus is the first to leverage a single-variant slippage function. In your opinion, why is this alternative viable now, and not before? Did we need to start one place to end in another, or is it simply a solution that wasn’t considered previously?

Mr. BeaverTail | Platypus

So a single-variant slippage curve is just just a normal function f(x) where x is coverage ratio.

It varies in function of x, the coverage ratio

I really think this alternative was viable before, just as bitcoin was viable since computers were invented.

Dave Donnenfeld | Avalaunch

Understood. So to you it’s a self-evident evolution of where this should be going.

Mr. BeaverTail | Platypus

Banks and other financial institutions have used coverage ratio in risk management for years

why shouldn’t we use this for DeFi?

Dave Donnenfeld | Avalaunch

Right. So you define the range and cover it accordingly.

Mr. BeaverTail | Platypus

The missing link was using coverage ratio alongside single-variant curve to determine slippage

This allows the protocol to handle risk autonomously

But designing these types of protocols is not an easy task… It requires years of research to make sure the protocol is viable

Mr.Duckbill is truly a visionary I must say

Dave Donnenfeld | Avalaunch

Right. The defined function and range is intuitive enough but building it is another story haha. Yeah, Duckbill and Co are on point.

Could you introduce us to the concept of “asset liability management” and its place in Platypus?

Mr. BeaverTail | Platypus

Asset Liability Management is defined as the process of managing the use of assets and cash flows to reduce the firm’s risk of loss from not paying a liability

So as I said earlier this concept has been used for years in TradFi

Coverage Ratio is just one key indicator of risk of a certain firm

The higher, the better!

Coverage Ratio = Assets / Liabilities

Platypus leverages these concepts for the first time in DeFi

Dave Donnenfeld | Avalaunch

Let’s get into the token and pools for a minute — since you’re redefining DeFi and making it, well, smarter, I’m sure our users want to understand utility

The PLP token is staked to generate vePTP, an “asset” which is not transferable or tradable. Once generated, vePTP is used to boost a stakers APR on the provided liquidity. Could you help us to understand the necessity of this design, and what improvements it offers over simply staking vanilla PTP?

Mr. BeaverTail | Platypus

Stableswap tokenomics require special design.

We want to incentivize users to become long term supporters of the protocol

To understand this design, I need to explain what dialuting and non-dialuting emissions are

Dialuting emissions are token emissions that dialute the value of the token on the market. This is what most projects use to incentivize users to provide liquidity.

Dialuting emissions can make any token become a farm and dump token, because value is not being captured for the token holders

If I provide liquidity on sushiswap to farm Sushi, I don’t really need to hold the Sushi token

Non-dialuting emissions are emissions that do not dialute the value of the token in the eyes of the market.

We want to make 50% of emissions non dialuting

Dave Donnenfeld | Avalaunch

How does this happen? A token being put on the market is an inflationary event.

Mr. BeaverTail | Platypus

That is indeed true. But what about a token that is given only to those who ready to stake this token in the long term ?

Since the token is being held in a smart contract, it cannot be sold and therefore sell pressure is reduced

So by incentivizing users to stake $PTP for vePTP, we make sure that inflation is controlled

Dave Donnenfeld | Avalaunch

Apart from generating vePTP, how would you describe the utility of the PTP token?

Mr. BeaverTail | Platypus

PTP token is the gateway to all things platypus.

Initially, Platypus was going to be launched as a multi-vertical protocol. But we realized that the right path was to launch 1 vertical first, then expand to other verticals.

If you want to support the project, stake $PTP to obtain vePTP.

We’re going to make sure vePTP holders get well taken care of.

vePTP is the governance token of the protocol (ve stands for voting escrow)

Dave Donnenfeld | Avalaunch

Always nice to hear this

changing gears — Very simply, what is “withdrawal arbitrage” and how does the Platypus withdrawal fee mechanism combat this behavior?

Mr. BeaverTail | Platypus

In TradFi, Arbitrage describes the act of buying a security in one market and simultaneously selling it in another market at a higher price

In DeFi, it also means that, but the definition is widely extended to all operations that generate profit for the arbitrer

So withdrawal arbitrage in our protocol is basically a set of operations [deposit (given coverage is under 100%), swap then withdraw] taking advantage of the protocol’s design to generate profits for the arbitrer

This extracts economic value from the system

Many protocols have suffered from exploits like this

If you add flash loan to the equation, then you can really drain a pool

Dave Donnenfeld | Avalaunch

I’m not sure there’s been a flash loan protocol that hasn’t been exploited.

Mr. BeaverTail | Platypus

When designing platypus, we wanted to make sure that economic value is retained in the system and redistributed to liquidity providers.

That is why we have implemented a withdrawal fee, making withdrawal arbitrage unfeasible.

We even found a way of performing a deposit arbitrage ! So we had to implement a deposit fee

Rest assured, these fees are very very very low and will not affect the use of the protocol

You probably won’t even notice

Dave Donnenfeld | Avalaunch

The proverbial staking/unstaking fee for arbitrageurs. Very smart.

Mr. BeaverTail | Platypus

In my opinion any new protocol implementation needs a competent research team running mathematical analysis and simulations. It is not enough to have good devs. We have the chance to count with some really smart researchers

Dave Donnenfeld | Avalaunch

Moving onto security for a moment as you mentioned exploits before — we all know that everything is going to be audited by a proven 3rd party but….Seeing as how audits aren’t a “silver bullet,” how do you see them and their place in the development process? 2021 has been littered with high-profile DeFi exploits and hacks. As a smart contract developer, have there been any key takeaways for you with respect to your own process or code?

Mr. BeaverTail | Platypus

Security is indeed our biggest concern in Platypus

Dave Donnenfeld | Avalaunch

R&D is showing up more and more in the budgets of DeFi projects. it is just prudent and needs to be ongoing. I think too often people think of these contracts as “set it and forget it.” But please proceed re: security. Just couldn’t help myself here.

Mr. BeaverTail | Platypus

I think security should be any DeFi protocol biggest concern.

As DeFi gets more and more sophisticated, hackers get better at exploiting protocols

Coding smart contracts is nothing like coding a JavaScript/web application. Anyone who has worked in my development team knows I can be quite unfriendly if my directives are not respected.

Dave Donnenfeld | Avalaunch

Are they in fact getting better? I just thought there’s more money locked ergo more people chasing it. So the research of security is a discipline unto itself. Yesterday’s attack vector doesn’t equal what’s coming tomorrow. Hadn’t considered the evolution of hackers.

Mr. BeaverTail | Platypus

Hackers are getting better.

But so are we (DeFi builders and audit firms in preventing attacks)

For platypus we have very strict directives when it comes to our smart contracts.

We aim for 100% test coverage in our core smart contracts.
We use state-of-the-art security tools.
We don’t let our ego get in the way. I personally ask every new collaborator to go and tell me how code can be improved.

Dave Donnenfeld | Avalaunch

That’s good stuff. Seems like a layered approach and of course the absence of ego goes a long way

So let us have a final question before we can move on to the Twitter portion of the program — on a higher level — What lies ahead for Platypus? Where do you see your efforts being focused in the next 3–6 months?

Mr. BeaverTail | Platypus

We have a lot on our plate.

We want to expand to other DeFi verticals, provide a fun and gamified experience for our users, develop partnerships with other teams in the ecosystem….

Things move fast in the cryptosphere, so I don’t really want to be too precise about these things, we want to maintain some flexibility as well

Dave Donnenfeld | Avalaunch

This is the evolution of the AMM. I hope it gets implemented everywhere but it’s forever a moving target. I think roadmaps are overrated in crypto; should be renamed “guidelines.”

Mr. BeaverTail | Platypus

Yeah, guidelines are better

I expect the smart contract team to deploy many contracts in the following months

I expect to serve users and our community

Twitter Questions

@totominhchi How can developers & technical people contribute to Platypus and how do you make plan to get them involved?

Mr. BeaverTail | Platypus

I’m looking for talent on the smart contract side.
If you’re a smart contract developer with experience in DeFi, please get in touch with me.

We will be open sourcing our code in the following weeks

Whitehat hackers are very welcome to make suggestions on our code (up to 100k$ rewards). As I said before, ego is a killer.

@AkihisaMori45 asks — What achievements of Platypus do you feel are most important for your long-term plans?

Mr. BeaverTail | Platypus

We’re very pleased we got huge support from big names like Three Arrow Capital and Defiance in our private round, in a total of $3.3M.

The high interest exhibited by these strong names of the crypto industry speaks volumes on the relevance of Platypus for the crypto space and DeFi.

It’s also worth mentioning that the $10M LP pool cap of our alpha mainnet was filled within 15 mins, that was totally out of our expectations and I’d like to thank everyone who supported us all along.

@AndyToshi_cryp — How do you view other projects in the Avalanche ecosystem, is there a project that you see as a competitor or that you respect?

Mr. BeaverTail | Platypus

I honestly respect every DeFi builder our there.
It’s a very stressful job that requires a broad set of skills. While we make investors and supporters rich, we’re doing the hard stuff.

But honestly, I think that there are great native projects on Avalanche

They have great teams and I can say working with some of them has been a pleasure so far

I can name a few: Benqi, Colony, Traderjoe, Pangolin, Yield Yak

@IvaniWu01— what is the single biggest factor Platypus in removing impermanent loss risk for liquidity providers?

Mr. BeaverTail | Platypus

Impermanent loss is the result of using invariant curve’s (Uniswap, Curve). In these systems, you need to provide liquidity in pairs…. When you provide liquidity, you’re basically guaranteed that the product of the amount of 2 assets you provided will stay the same.

Liquidity provision in Platypus is single-sided, removing impermanent loss risk. Of course there are others risks that come with this paradigm shift, but impermanent loss is not one of them.

@Nirund14— Does Platypus platform have future plans to go crosschain or do you think there is enough activity on Avalanche to sustain?

Mr. BeaverTail | Platypus

Our objective is to become the dominant stableswap on Avalanche.

We don’t have plans to go cross-chain for the moment. We actually believe this is not the right strategy!

And… we really think Avalanche is superior to other blockchains out there and we are quite happy to be an Avalanche native project.

Special thanks to the Avalanche foundation and Avalabs, you guys are the real Rockstar’s here.

Usually AMA’s are well prepared in advance. This one was quite improvised so I hope it wasn’t too hard to follow for everyone.

Dave Donnenfeld | Avalaunch

At this juncture, I’d like to pass the mic to @shahi297 and he’ll take over from here. This has been an enlightening experience and super informative. Our community, understandably, likes unlocked tokens and I can’t blame them but I think they will be very happy there is vesting for this project. It’s a game changer. Very much look forward to it and being a part of your journey.

Lovish Shahi | Avalaunch

Thanks Dave.

Mr. BeaverTail | Platypus

Thanks to Dave and Lovish for handling the AMA as well!

Lovish Shahi | Avalaunch

This was so far one of the best n most interesting AMAs we had so far.

This was really something Deep Dive.

Hope we can have some nice questions from community to add to this.

Telegram Questions

Hai Trieu | HUNTER GEM?️

Currently, NFT is very hot, do you think you will apply NFT technology to your products in the future?

Mr. BeaverTail | Platypus

Yes, we’re currently working with a very special team on the Avalanche ecosystem to bring a very special experience on Platypus. Don’t want to spoil too much though.

Blog Tran Thanh

How did you come up with the idea to create the “PLATYPUS” platform? Why did you choose the name? Does it have a special meaning and is there a story behind this name?

Mr. BeaverTail | Platypus

The original idea comes from research done by Mr.DuckBill where he envisions a paradigm shift for several DeFi verticals.

Platypus is a very special kind of animal, it lays eggs although it is a mammal, it is semi-aquatic.

We though it was the perfect animal to name a special (and a bit weird) protocol.

MoonGems

What are the steps to become a part of your community, and start getting revenues? Where do we buy, where do we sign up? This looks like an amazing project!

Mr. BeaverTail | Platypus

Thanks!
Well, first of all I’d recommend following our social networks (in particular twitter where we are the most active)

@Platypusdefi @MrDuckbill @MrBeaverTail

To become a supporter of the project, you can:
– Deposit your stables into Platypus pool’s to farm $PTP token
– Stake your PTP to generate vePTP and participate in governance (while boosting your yield!).

Also, keep in mind that stableswap is only the beginning. We want to expand to other verticals and add new features so make sure to stay tuned to our socials.

Lotenna

For Platypus being the first Stable Swap on Avalanche Network

Is your token swap program based on any existing platforms out there or did you have to build from scratch since you’re the first stablecoin swap on Avalanche Network?

Mr. BeaverTail | Platypus

We built Platypus from scratch, but we learned from the mistakes of other protocols and we’re are quite aware of the current innovations happening in DeFi till today.

We decided to build Platypus on Avalanche because we think it is truly the next generation blockchain the world needs: instant finality, decentralization, low fees, superior consensus mechanism…

We hope that more and more innovative and novel protocols will decide to build on Avalanche!

Marjerlin Buitrago

How does the community intervene in the construction of PLATYPUS? In other words, do you take into account the “feedbacks and demands” of the community as you continue to innovate your project?

Mr. BeaverTail | Platypus

We want to have a “Community first” approach. Open Finance (or DeFi) is all about that.

We did a testnet campaign with 1500 people testing and giving feedback. Also, we encourage everyone from the community to give feedback.

Our backlog is huge so please be patient as we are working long hours to improve our solution!

So far, we’re quite happy with the response from the community.

We hope to grow Platypus into a self-governing community of well educated participants.

Again, if you want to stay in touch and participate in our community, join our TG channel and follow us on social media:

@MrBeaverTail @MrDuckbill @Platypusdefi

Lovish Shahi | Avalaunch

I guess we are done with the community questions here

Thanks @MrBeaverTail for sharing such insightful tech deep dive with our wonderful community. Really appreciate you being here.

Mr. BeaverTail | Platypus

Allright guys, that is all for me.

Thank you for being here. Hope to see you soon on the cryptosphere.

About Avalaunch

Avalaunch is a launchpad powered by the Avalanche platform, allowing new and innovative projects to seamlessly prepare for launch with an emphasis on fair and broad distribution. With its values deeply rooted in the early Avalanche community, we are able to offer projects confident, informed users who are aligned with the long-term goals of the rapidly expanding application ecosystem.

Leveraging Avalanche’s scalable, high-throughput, and low-latency platform, Avalaunch is built by users, for teams, to help grow strong communities.

Website | TwitterTelegram


Platypus AMA #2 — Technical Deep Dive with Mr.BeaverTail, Smart Contract Lead (Recap) was originally published in Avalaunch on Medium, where people are continuing the conversation by highlighting and responding to this story.

Source

Categories: XAVA