21 min read

Technical AMA

Technical AMA

Eric| Saddle 0:49

Alrighty. Well, we can get started. Hi, everybody, I'm EMAC on the Saddle team. I’ll be your host for today's AMA. So we want to do a little technical deep dive with some friends. This is our first ever one, so feel free to drop questions as we go along in the Saddle event chat. I think first and foremost, I want to introduce that technical team here at Saddle. So David, I don’t know if you want to go first or hammeiam, and say hi. And tell us a little bit about yourself and your background. And then we can jump over to some of the other team members. Definitely.

David| Saddle 1:25

Hey, everyone, my name is hammeiam. But I'm doxxed. So David also works. So I'm the front end lead here at Saddle. I've been with the company for maybe a little over a year. I started contracting back in like September of 2019/2020. I don't know. Something before COVID. Yeah. And so my responsibility is like mostly owning the front end and sort of helping to like manage the engineering team as well. But before Saddle, I originally actually was a marketing major and then I attended a coding boot camp in San Francisco sort of after working at a web development firm as their sales and marketing guy and finding out that I sort of had more fun,  you know, coding around and doing everyone else's job except for my own. So coding boot camp, worked it into it for about a year. Then I was fortunate enough to work for Uber Eats for just under four years. And I helped to launch Uber eats.com if you've ever used that. And following that, I was at a freight forwarding company called Flexport sort of doing more full stack stuff for about a year. And then our founder, devops(199) fan…yeah, basically reached out to me, because we both live in the same city. And he's like, heyman, I'm starting this protocol. We have funding, we're looking for somebody who can help us (-)front end. And yeah, the rest is history I guess. So I currently live in San Francisco. And in my free time I'm into running and traveling and getting over COVID.

Eric| Saddle  3:03

Aren’t we all? That’s a good one. Cheers. Awesome. Now over to Weeb. Want to say hi?

Weeb| Saddle   3:11

Everyone, just Weeb. I do smart contracts for Saddle, usually Solidity stuff. I’ve been with Saddle from the start. I knew the founder from Twitter. So just like shitposting on Twitter, just in between farming and Solidity tips and then we connected and yeah…my background in math and philosophy, but picked up coding through hackathons and whatnot. Yeah, and love video games. I’ve been playing Elden Ring recently, if anyone has been trying it's a great game.

Eric| Saddle  3:56

Nice love that over to Devops199fan.

Sunil| Saddle  4:02

I figured it's about time to do that. Hey all, I am Sunil otherwise known as Devops199fan on Twitter. My background is kind of like studying computer science and finance in school, worked at Square for one year, worked at a failed startup for one year and then worked at Uber for about five years. I was working on real time data infrastructure, and the Advanced Technologies Group on some self driving car stuff and then infrastructure security. That's where I met David Hamme-actually through a mutual poker group that we played in. Yeah, I've been working on Saddle since about mid-2020. Yeah. Thanks for being here, everyone.

Eric| Saddle  4:52

Alright. Awesome. Thanks for that guys. So I guess we can keep this pretty open ended. Anyone have any questions they wanna chime in? We can go as deep as you want to go as high level. I don't know if any of you guys want to give a high-level overview. I know Sunil, you've given your high level overview of Saddle quite a few times, but maybe go like a little deeper this time, if you want to, like dive into some of like the specifics with the code.I don’t know, as well, Weeb  you guys want to do that now? And then maybe we'll feel some questions after the fact.

Sunil| Saddle  5:29

Sure, happy to kind of give a little bit of the background and then maybe Weeb if you want to take over since you're the person who shipped the vast majority of qualified code. So back in the middle of 2020, I was kind of getting started with exploring some of the various DeFi opportunities, and had ran into Keep network which was launching tBTC, which is their first product and is basically a tremendously tokenized version of Bitcoin on Ethereum. And so I'd gotten kind of active in that community from wanting to run nodes to help secure the network, and ended up meeting Matt Luongo, who's the CEO and founder of Thesis, the venture studio that we work with as well as Keep at the time. And so he had basically started to work on a POC, of what reimplementing the StableSwap algorithm would look like in Solidity vs.Curve had written their implementation in Viper and released it under a very restrictive license. So other projects couldn’t actually use it as a building block in their code/protocol. So we basically started from the ground up of rewriting the StableSwap algorithm. When I first met Matt, I think he had just started hammering out a POC, but it wasn't quite functional. So we were working on things like test coverage and a couple of other things to, you know, get it up to the standards that we wanted. And shortly after that, we met Weeb through Twitter and a couple of other DAOs and telegram chats. And then, John, yeah you want to take it from here?

Weeb| Saddle 7:04

Yeah, as Sunil mentioned, one of the problems that we were trying to solve is delivering the StableSwap algorithm to kind of any chain we want to or any chain that people want to. One of the problems with Curve’s  licenses, you know, as(-), it's not very open. And as like a new- especially like new protocol or a rising protocol without big funding, it's really hard to kind of get their permission to launch their code. So want to get around that. We create the system. And we have Low-Poly Duck from Mune Finance here as well, he’s been one of our partners who helped fork Saddle on different chains and launch on them. If you want to  chime in Low-Poly Duck, I think it's a good time as well.

Low-Poly Duck| Mune Finance  7:53

Yeah, heya. I'm currently working on Polygon, one of the better supported chains, I'd say. And it's been a lot of fun, honestly. The open license is exactly what you need. For a system like this. You well-really, for any revolutionary system, you want it to be in as many hands as possible, if you really want it to come about and realize its true self.

Weeb| Saddle  8:29

I’m a believer in open sourceness in a long term eyes, in order to kind of change the scope of the landscape of kind of the development culture, I think we really need to embrace open source culture and define web3.  Men, there's a great interview by (-). What;s his name? One second, I can once again get back on.

Sunil| Saddle  8:56

But to add to what John said, this is definitely a trend we're starting to see with some other projects as well. So I think Curve was a first project that really used a restrictive license. And there were a couple of like, so called forks. But these were really people who figured out there's a clever way you could use this like delegate call Opcode to basically use all the existing Curve contracts, but with your own storage. So you guys remember Swerve back in the day. That was, I think, the most popular example of this. But outside of that, you don't really see very many projects that are able to basically use that StableSwap (-). And then more recently, we've seen Uniswap v3 release under a business source license, where I believe it's like for the first two years, it's two or three years, it's closed source, so people can't use it, and then it opens up. And even more recently, I think we've seen Aave put their open source license to a governance vote, which I thought was like super duper cool. So hopefully, we're gonna see more stuff like that rather than teams/projects, deciding to just go with a restrictive license out of the gate.

Low-Poly Duck| Mune Finance  10:03

As a huge open source and Aave fan. Well, that was a really cool vote. It was also a little frightening at the time. Speaking of Aave, I don't know if we're ready to field any technical questions, but I noticed that Curve does some fancy a parameter management for their interest bearing stable coin pools. I was wondering if you had any insight on that. I'm a huge fan of stables, and I noticed that pool is particularly high volume.

David| Saddle  10:40

Yeah, I would be happy to tackle this one. So, in protocol management, I think there's like a lot of different layers to it, obviously. And so sort of at the foundational level is like going into contracts, right. The next level is, you know, having some sort of interface that people are able to use, you can actually build your community. You know, the community management and governance is like its own set of challenges. And then once you actually have everything else running, then actually competing in the marketplace, and sort of like managing your protocol, through these tools that you've set up is sort of like something towards the top of the pyramid, right? And so Curve uses this great tool written by one of their community members, Nagakingg , called CurveSim and essentially what it does is it looks at historic volume, and then simulates those transactions under like with different parameter pairs, right? So it's like fees was this much if the a parameter was this? What would like-how would the health of the pool change? How would the fees or LPs change etc. So, yeah, that simulation code CurveSim is actually open source. And (-) just publish an update, where now you can fetch prices directly from CoinGecko, rather than using some sort of like proprietary provider. So one of our next projects is actually looking into seeing if we can adapt that. While also, you know, we would like to reward Nagakingg for making this like really great software. But adapting this and then using that basically to power any future governance proposals for parameter changes, right, because now that we sort of have the mechanics in motion, we need to make sure that our pools are sort of competing in the way that we want them to. And we've done some sort of preliminary analysis in that regard. But I think this will be sort of a nice extra. I don't know, some extra confidence on top of the work we're already doing.

Low-Poly Duck| Mune Finance   12:39

And one more time that was CurveSim, and where can I find that in their repo?

David|Saddle  12:44

I can share that with you. I think it's actually in his own repo. Yeah, we'll share that in the chat. Actually, where's the best place to share that I'm sort of-I'm a Discord noob.

Low-Poly Duck| Mune Finance  13:00

So was I up until not too long ago.

Sunil| Saddle  13:05

And just like David said, this is definitely an area where if you're a community member that's interested in helping out with the protocol, if you're like, interested in exploring this, this is definitely work that we would support through our bounties4bandits program. So if you're interested, please reach out and we're happy to help, you know, get you started.

David| Saddle  13:37

Okay, I just shared that out in the Saddle event chat room.

Weeb| Saddle  13:43

Yeah, we've been seeing some growth in D4 pool. And other stable coins are less kind of extreme. So I think a parameter management becomes really important, as kind of these tokens get more mainstream, and we should provide a host for other…tokens.

Low-Poly Duck| Mune Finance   14:06

Yeah, I definitely agree. It's a super big market. And I feel that tokens like stETH, which use similar mechanisms, but not exactly should also be looked at, at a super high volume pool.

David| Saddle  14:31

I mean, in the same way that Yearn has, you know, a bunch of different sub DAOs that sort of manage various aspects of their protocol. It could even be something interesting to pursue, eventually if the community is into it. Something like a parameter DAO who's just responsible for adjusting like, mostly a parameter, but maybe like fees, if necessary, right. So we have sort of looked through our pool volume historically. And you can see there's a few like spikes which are just like sort of anomalous volume in certain pools. And that usually correlates with like wider volatility in the market. So what if there was some way where we could sort of like, benefit disproportionately from that volatility? Or, for example, if we have a token that everyone is trying to get to, like, you know, secure their leveraged loans, right, then if we know that that's in super high demand on like one day or for a few hours, then we should try and capture more fees on that day. As an idea.

Sunil| Saddle  15:29

An example of when that would have happened would be LUSD in the D4 pool during some of the recent volatility spikes where we basically saw like a lot LUSD volume as people rush to basically get that to help collateralize their volts.

Weeb| Saddle  15:46

Yeah, tokens like MIM, LUSD, the stable coins that kind of get minted against collaterals. I think those usually should be targeted, kind of specifically for this too, because they volatility (-) is crazy. I don't know if you guys have been following the MIM USD pool on Curve like the volatility there was even great, greater than I think most people expected. And having high IA definitely helped kind of increase the volume there. Could you go all the way down to like 5% of MIM all the way back to 50% of MIM. So having IA is really beneficial in those cases. Of course, given the tokens are safe.

David| Saddle   16:27

Right. Yeah, it's like a little bit of a tightrope at super IAs. Infinite leverage can definitely be dangerous.

Eric| Saddle 16:48

Alright, awesome. Define I saw you join, do you want to talk a little bit about your project, the capsules money being a part of the b4b program as well. Feel free to drop in the chat. And once I saw you go off mute.

George| Capsules 17:18

Can you hear me? Yes. Yes, sorry. It was in in me that I had the hex personality on another app, and I couldn't open the microphone. So, yes. Thank you so much. For this thing, I may also have some questions. First of all, let me tell you a little bit about my project. So my project is at its base, finance marketplace. And it's rolling out in five phases. And I don't want to explain whatever phase will bring because it will take one hour, but I have to upload the tokenomics paper on the channel. For anyone who is interested, I will just say that on phase one about the Avalanche Saddle fork, and it will bring the liquid loan. So liquid loans are basically loans that you can get against your liquidity. And the edits for that happen mainly happened on a swap-utils to solve them. The accounting for the liquid loans also happened there with the contributions on (-_that they made so far. And this total compile so far, so everything's good. But yeah, the question that I have is because this phase one is accompanied with the multi core economy. So basically, the project has many separated economies that they're designed to work together and synergize together. So when you join one economy, for example, on phase two, we love the traders economy, so the traders economy will work like the eToro. But yeah, but basically the users will be able to pick only from the top five winners and there's only profit and it will basically utilize the external parts and factions from other like from their smart contracts and account their profit, like at a specific time. So I basically want the users to use this economy and tools to use their money capsicum that will basically encapsulate different tokens in ERC 11155 tokens and the users will be able So this how this start is the Capsules project before I think like two months, I joined the hackathon and gold. And they did the NFT wallet; it's called NFT field. It's on Zuko right now. So basically, it allowed the users to log in values inside Ethereum values inside there, and do only unlock it if they have a specific kind of theme. So it was based on an ERC 721 contract. And if you sold that NFT, you were also able to get access to the token. And so this is why it was named Capsules- to make the users be able to trade these tokens and to store values, values of different wrapped tokens. So wrapped Ethereum, wrapped (-), anything else? And when they want to actually send these tokens, right now they need to pay multiple phases. Okay, so, but if you use that NFT functionality, and you just sell your ERC token, your NFT, then basically it's not gas less, but the gas uses this much, much less. So basically, the protocols (-) for existing knowledge for that. But yes, phase one, it will break the Avalanche for the liquid loans and with the liquid loans 99% (-) is the problem they have and maybe someone can question that.. is I finished the functionality on the swab you don't solve? How should the calculation happen on the receiver contract? So this is another contract. It's completely new code access and IERC one on five receiver. And basically the architecture on the product is that you premium the tokens and you premium the tokens’ own intervals. So the token pilot, for example, has 50 million cap, you can make more. But to avoid the possibility of an attacker just going into the smart code, or for whatever reason getting anything,  I personally put like an extra limit to premium tokens and send them on the IRC contract in intervals. So you pre-mint 1 million every month and you sell them on the smart code to avoid big(-) if an unexpected, let's say vulnerability happens. So my question is how I can make the swap … communicate with that IRC receiver contract to actually get the values to actually communicate and enable the users to claim their stake we've gone from there?

Weeb| Saddle   23:43

I haven't taken a look at the (-) receiver ABI. But I assumed as long as you have the ABI, you should be able to modify the lines, it’s five utils to interact with a contract. Sorry, if I missed a question, I missed the early parts of the context.

George| Capsules  24:04

So all you have to do is basically import the interface. And that's it?

Weeb| Saddle   24:13

Yeah, yeah, as long as the functions you're calling are defined in ABI's, you can just extrapolate the interface and then import it on the sub-utils. But just notice when utils is kind of reaching its max and the code size. So you might have to extrapolate that into under library or reduce some of the lines in the swag utils to sacrifice some of the extra functions there.

George| Capsules  24:37

Maybe creating, moving the functionality that they put on swaputils.sol and creating an entirely new library that interacts with it is the way to go? In your opinion.

Weeb| Saddle 24:49

Yes, yeah, I think so. 100%.

George| Capsules  24:52

Thank you so much.

Eric| Saddle  24:59

Great, thanks. DeFine (George) really appreciate you joining and being part of the b4b and finding us through Encode. So really appreciate that. Awesome. Anyone have any other questions, thoughts for the team here? Let's see who else I'm going to pick on somebody. Duy, I like your cat? Hopefully that's your cat and not just like a random cat. Any questions? Thoughts for the team here?

Jamie| Mune 25:31

Yeah, when can I buy a cowboy hat with a fancy seahorse on it?

Eric| Saddle  25:37

Soon enough, Jamie. Soon enough.

Duy| Saddle 25:40

Oh, yeah. And that is my cat.

Eric| Saddle  25:43

Oh, nice. Do you wanna introduce yourself and say hi.

Duy| Saddle  25:46

Oh, hello, everyone. I am Duy. I'll be joining the Saddle team pretty soon here. I just left my job not too long ago. And just here to check out the AMA.

Eric| Saddle  25:58

Welcome, welcome. Awesome, very cool. And Hermania28. You just joined. Welcome, welcome. Say hi, introduce yourself. Do you have any questions for the team here? Let's see a big Hermione Granger fan. So am I. Awesome. Alright. Well, no other questions. Any thoughts from the team here? Weeb, Hammeiam (David)? Time to wrap things up?

David| Saddle  26:35

Yeah. I have a question for John. So John, have you seen any instances of like community based gas golfing for a contract code?

Weeb| Saddle  26:46

That's a great question. And I think we should explore that. Because I know the swap-utils code can still be optimized. And in terms of contract size, and the things we just just discussed with DeFine as well. So yeah, I would love to see gas, golfing from community, or if we could establish kind of a code review session with the community members as well, because I know there's a lot of potentials to build on top of this code. So yeah, that says something I really want to explore as well.

David| Saddle  27:17

Nice. Are the swap-utils upgradeable?

Weeb| Saddle  27:21

No, it's not. Personally, I don't, I think upgradability is a huge, huge security risk. That that does is my personal opinion. I think there's kind of a boot camps in Solidity, whether it's upgradable contracts, or immutable contracts. I tend to sign on the immutable contracts, just because I trust the devs who wrote the code, but I wouldn't trust any other future devs, who will be managing the code later? Just because like I wouldn't know the devs who will come in later. So yeah. Going off of that, I think, yeah, there's a lot of improvements to be made, and lots of new integrations to be had.

George| Capsules  28:08

Now speaking about demising, the existing swap-utils  or contract and both upgradability, I think there are major gas savings that can be done. I am attending right now, like an expert for the book and will basically explain all the new ways. So will be glad to contribute there in the future about upgradeability, I think. Basically, I'm pretty sure that they're much better upgradability patterns right now from … I think this is the simple proxy, it's not the UPPS, right? The one that is used?

Weeb| Saddle 29:05

Yeah, even when you turn into a proxy there, that's still an external call. So something that I've been trying to look into, it's just getting rid of utils and merging swap, just having one contract with the library baked in. Because the current problem is with every external library call that's extra gas to kind of send that call to an external contract. So if you're able to like manage everything internally in one contract, that'd be a huge savings in terms of like five utils and a swap. I think similar things can be said about MetaSwap as well. There's a lot of duplicate code there. So reducing that down and being able to share a lot of code base with the swap utils and MetaSwap utils. There will be a huge win in terms of deployment, saving gas and also the execution. Yeah.

David| Saddle  29:52

Yeah, definitely. This is also one of those things where now that we, you know, sort of like what I was talking about before with like the hierarchy of needs for a certain protocol. Having like really gas efficient and more competitive contracts is sort of like the pinnacle of a protocol. Right? Like, once we are, you know, less gas for all of our functions than Curve, then there's like no reason why we shouldn't be getting all the volume.

Weeb| Saddle  30:17

Yeah. And then one thing that we've also been trying and trying to look into is integrating like 12 particles into swap-utils. But currently I believe Curve doesn't have any Oracles built into their contract. Although like: Uniswap, v2,v3 and Solidly-they all have some form of top Oracle's whether it be limited history dimensions or full dimensions. But like replicating some sort of that would be really great, because other protocols like Futureswap, they can use our price feed and Oracle's to kind of base up their options protocol. And that would allow other protocols are using like status code to kind of get benefits from that as well.

Eric|S addle 31:08

Perfect. Thanks, Weeb. Nikita had a question. Can you tell me the next roadmap and what are the plans for the year?

David| Saddle  31:22

Yeah, I can take it on. So purely from a technical perspective, John and I can tag team this one. But the next thing we have opened our plate is deploying a registry. And then that sort of like filters out into a lot of different upgrades as well. So basically, right now we have a bunch of discrete deployed contracts. But there's no central repository that tells you on chain sort of like what those contracts are. And so having a registry basically allows us to really tightly integrate with aggregators, as well as to be more easily used by arbitrageurs, which again, are sort of like the foundation of, you know, any marketplace. So having a registry will not only give us sort of more visibility in the space, but we'll also sort of benefit as technically as well. So we are working on upgrading the front end to incorporate the registry that will like really increase readability and like reduce code bloat. And that will also end up powering our new subgraph, which will be super cool. The subgraph only supports a certain number of chains. And so we might need to expand into creating an API basically, to get sort of the same information. But yeah, I think the registry is like the main thing that I'm excited about, but I know that Weeb was also working on a few other things.

Weeb| Saddle  32:40

Yeah, with the registry being shipped, it should also unblock us creating permissionless deployment stuff. So right now, the process for listing polls is a little cumbersome, you have to go through the governance process and get through the voting phase, get on their Snapshot. But with the registry and permissionless full deployment. People will be able to deploy any pools they want, just through the UI without asking for permission on the governance side. And the pool should automatically be registered into the register system. So other aggregators can take advantage of the new pools.

Eric| Saddle 33:19

Amazing. Yeah, a lot on the docket for the coming year. And…I know, you saw the roadmap as well. So amazing stuff. Well, great guys, I think we're a bit over time. So please feel free to drop any other questions in the chat. And if this was helpful, we'll continue to do these on an ongoing basis. So feel free to give us feedback. I know this is our first one, but I really appreciate the Saddle technical team for joining all of you guys as well and adding to this community. So I really appreciate that. And hope everyone has a great day.

David| Saddle  33:51

Actually, really quickly. Sunil, would you mind giving a quick update on tokenomics stuff? If he's online? If not, I can just do it.

Sunil|Saddle  34:00

Yeah, absolutely. So we are currently hashing out you know, what Saddle token economics as well as liquidity will look like for SDL. So we've got, I think, a pretty good plan. At this point, our partnership’s lead/protocol evangelist, Christian, is currently working on like a short brief that we expect to be pushed out by the end of the week to give a high-level overview of what we're thinking. And then we're hoping to have a poll, start with that and then get an actual SIP out with all of the details sometime next week.

George| Capsules  34:40

Can I do a last less technical question? Sure. What do you believe about gamification? Especially in my projects, I implement gamification elements but I believe that outside of the economical spectrum of who having the lesser gas fees is the best product because the best (-)using gamification to explore the dopamine inside their brains, like it's the best way to get more users. Like, what's the plan on that? Like, if you want to add, like some levels of gamification…do the gamified process get more SDL or something like that?

David| Saddle  35:43

Yeah, so I don't know if we've like specifically looked at gamification as a concept, but, you know, if you if you sort of zoom out a little bit, basically, everything sort of isn't is not gamification, right? Like any form of incentives, like everyone who's yield farming is just looking for the highest incentives for like the lowest effort. And so if you sort of count financial incentives as gamification, then like, yeah, definitely, we are going to try and structure our tokenomics in a way that like makes sense for people to LP, and like incentivizes them to perceive Saddle as like the best place to LP. But in terms of exchanges, I think, you know, most of our like the vast majority of our exchange volume is done like via contracts right to either arbitrage or aggregators. And so I don't think there's much of like a gamification mechanism there besides just having like the best fees and trusting the market to discover, like the best fees that are available to them.

George| Capsules   36:43

Thanks so much.

Jamie| Mune  36:45

I don't know if it's my place to speak on this or not, but I know that at Delos HQ, we're looking into some NFT utilities, which may or may not put some gamification in your plate there. This sort of I don't know if you're familiar with the Zapper verse, DeFine. The user wrote off.Zapper. Zapper.fi

George| Capsules  37:17

Oh, no. Never even heard of it.

Jamie| Mune  37:21

Great. Yeah, you should definitely check that out. 100%, for sure. But they have something in place called the Zapperverse, which is sort of their gamified community, which I feel Saddlecould really benefit from in a more with a slightly more educational focus, right, a slightly more development focused step to it. I do think, like was mentioned with a platform like Saddle where it's primarily contracts and arbitrages interacting with the pools, gamification will have to come from deeper within the community and via things like NFTs.

David| Saddle  38:05

Yeah, definitely. Yeah, that's a great distinction to draw, I think. I think in terms of like, the economics of the protocol. Yeah, gamification takes sort of like a more like serious financial perspective, but in terms of like, building and educating community. Yeah, we should definitely, you know, have like, I know, Eric is already working on sort of like the different leveling on the discourse, Rachel's working on sort of like a knowledge quiz. And yeah, I think like getting users leveled up to the point where, you know, maybe if they're going from not being familiar with DeFi to being comfortable LPing or swapping for protocol, that's definitely a place for gamification to have an effect.

Jamie| Mune  38:44

Yeah, definitely endgame. And as you said, game theory really, you can find it everywhere, right? It'll, it'll be it'll be poking its head into probably every decision made in every DeFi protocol for the rest of time. They’ll be finding  some ways to implement gamification in one way or another.

Eric| Saddle  39:11

Awesome, well, thanks, everyone for joining. Any other last comments? Thoughts? Great conversation today. Great. Well, thanks for joining everybody. And feel free to continue the conversation in the chat and we'll see you all soon.

Saddle Finance: https://saddle.exchange/

Saddle Twitter: https://twitter.com/saddlefinance

Saddle Discord: discord.gg/saddle