# NEAR | Leveraging MPC to securely transact on all chains - Owen | ETHDam 2024

- Channel: [CryptoCanal](https://streameth.org/cryptocanal)
- Date: 2024-10-07
- Duration: 20:48
- Watch: https://streameth.org/watch/yt-ZcG7yTSLQOo
- YouTube: https://www.youtube.com/watch?v=ZcG7yTSLQOo

## Description

Join Owen from NEAR for a talk on "Leveraging MPC to securely transact on all chains" at ETHDam 2024. See how chain signatures are creating a more universal Open Web. Learn the fundamentals of chain signatures that allow one to sign transactions on any chain from one NEAR account. Unlock many new possibilities, from Bitcoin ordinals marketplace to a unified multi-chain DEX.
https://twitter.com/ThePiVortex https://twitter.com/NEARProtocol https://near.org/ 

Sterling Schuyler - MC of ETHDam, copy and content writer for emerging fund managers & crypto enthusiasts.

ETHDam is powered by CryptoCanal, an education and events platform growing in Amsterdam, spreading its roots to Rotterdam and Zürich.
Keep up with us to see updates on future events: https://www.cryptocanal.org/ 
Follow CryptoCanal on X: https://twitter.com/CryptoCanal
Join CryptoCanal TG Community: https://t.me/CryptoCanalCommunity 
Join CryptoCanal Discord: https://discord.com/invite/XJVjpCqQBz

We would like to thank our partners that made this event possible. 🌷
Battleship Partner 
🛳Oasis Network https://oasisprotocol.org/

Jet Ski Partner
🛩⛷  NEAR https://near.org/

Canoe Partners
🛶WAKU https://waku.org/
🛶Trail of Bits https://www.trailofbits.com/
🛶Avalanche https://www.avax.network/
🛶Privacy + Scaling Explorations https://pse.dev/en
🛶Threshold https://threshold.network/

Our Canoe Partner & Official Node Provider
🛶dRPC https://drpc.org/

Sponsor
🤝EF Ecosystem Support Program https://esp.ethereum.foundation/

Paddle Partners
🚣ChainSecurity https://chainsecurity.com/
🚣Lido https://lido.fi/
🚣Cyber Capital https://www.cyber.capital/
🚣Diva https://www.divastaking.net/
🚣Firn Protocol https://firn.cash/
🚣Beefy https://beefy.com/
🚣0xbow https://www.0xbow.io/
🚣Obscura https://obscura.build/
🚣Panther https://www.pantherprotocol.io/
🚣Maven 11 https://www.maven11.com/
🚣Zama https://www.zama.ai/
🚣zkSync https://zksync.io/
🚣Secret Network https://scrt.network/

ETHDam AfterParty Fren
🥳Bitvavo https://bitvavo.com/en

## Transcript

[Music] okay yes so uh I'm from n developer relations engineer and we're doing a lot about chain abstraction here and part of this chain abstraction narrative is chain signatures how can one sign a transaction from one chain and pass it over to another well we're we're sort of enabling that over and here so myself as I said I'm developer relations engineer I'm also co-founder of Vex which is like an Esports um application building on top of n so I didn't just come to n because they paid me I was there before because sort of has the best tech sorry to let you guys know uh and yeah that's me and uh this is my online identity so if you see that in any group chat just just ping me and say hello so I'm going to have a bit of a complaint to be honest there's a lot of problems with blockchain at the mo moment and I think a lot of that is to do with interoperability so it's a very fragmented experience at the moment uh applications are normally accessible on on one chain except for like Unis swap or whatever uh they'll they'll have mul chains but most applications are siloed onto one chain the same with liquidity so if we want to use all these chains and all these applications then we're going to have to have quite a number of wallets like at least at least half a dozen like a metamask maybe a cosmos one a salana wallet whatever and this this these separate chains the the the way people have been solving it in the past is with Bridges but Bridges just have uh historically of being vulnerable to hacks and also the user experience is somewhat terrible a lot of the time but not just terrible it's different so you've got to learn uh the the complexities of each bridge and then like you've got to use all the gas tokens and and what it just hurts my brain in the end of the day and say I I'm quite active on near as I say and I get paid in Stables on near but I I like to I like to Da dabble into a bit of the D gen side so I go on arbitrum and swap tokens and whatever and my process at the moment is taking usdc from my near wallet pinging it over to binance swapping that for ethereum and then from ethereum to well yeah from binance to with uh arbitrum and then I swap it to the Token I want or to some some meme coin and it's a bit of a laborious process so I'm I'm just a bit annoyed with all of this and like n doesn't have the best liquidity at the moment but there's some really cool apps on there so it would be great if I could tap into all the liquidity on like ethereum main net but don't you worry there is a solution so with near what we're doing is you have one near account one wallet and you basically have access to any chain as long as it conforms to certain like elliptic curves more getting added soon so you can interact with uh Cosmos ecosystem uh polygon like any evm and salana is coming as well because it uses a it uses a different curve to like evm and you can even use Bitcoin which is pretty epic and basically you can you can sign transactions from your near account and uh you can you can hold any tokens that are available on this chain so I can have one near account that has access to uh Bitcoin like native Bitcoin access to link on arbitrum or or or polygon whatever or a a cash on on Cosmos which I saw on my coin market cap that that went down so yeah we know what it is now but how does it work so it works through programmable multi-party computation so basically you have these NPC nodes and there's like n NPC nodes right and then you have to have M of them so say there's five nodes you have three of them jointly sign a transaction uh this this is called threshold cryptography so they they jointly sign it without revealing the the private key so no one no one party can just sign the transaction by itself and how do we get these actual accounts from uh like a a Bitcoin account from an air account so it basically works the same as like you know you have a have a ledger and from that ledger you have like a seed phrase and you can derive multiple accounts from that well it works the exact same so you just have your near account which is a named account so I'm uh p vortex. n and I also I also own i spice. n and some some other crazy ones but you have this account and then you throw in some metadata so the metadata could just be like an empty string or it could be Owen or it could be 1 2 3 4 5 whatever you want it to be and it will change the derivation path and derive you a new address so you can have not an infinite amount but a near infinite amount so like millions of accounts tied to just one near account and yeah once you once you've signed the transaction then you it comes back to you from the NPC nodes and then you send it over to a relayer which sends it to the Target chain basically so what can we actually do this with this I think one of the coolest applications is defa on bitcoin so for example you can have an account that you have an ordinal buy an ordinal or whatever on and then from that you can transfer that account so you could give it to someone or you could decide to put that ordinal up as collateral on like RVE or or some other lending protocol also a big thing we're trying to do with near is uh n.org one of the gateways we're trying to create a unified open web experience and basically what that means is having one Gateway or or one website where one can just log in with one wallet and interact with all these applications from whatever chain without having to understand the complexities of each uh blockchain and each application so a big thing like um maybe a year ago was account abstraction well we've we've done that we've completed it now we're on to chain abstraction so you don't have to change wallet to interact with each of the applications and then you it also enables you to do actions that were previously not possible unless you had to burn a mint token so this this has no burning has no minting the assets still live on their native chain really but they're just tied to a near account so you can swap say native Bitcoin for uh link on arbitrium or some some other crazy swap that's never really been done before without Bridges at least and then we can take this like one step further you you would would usually have to pay for gas with the native token so if I'm signing my transaction from near uh to call the MPC nodes I would have to hold near and then I would also have to hold ethereum if that transaction is happening on ethereum but what we can do is use the what is it called the multi-chain gas free layer to pay for that gas in just near and it converts it from near uh to ethereum pays for that gas so I only have to just hold one token but maybe I don't want to hold n at all I can use meta transactions and uh when I when I'm setting up my application and my front end I as a uh an app developer can pay for the gas of my users so you can send transactions across any chains with without paying for gas at all um this basically just works by having your transaction and then wrapping it in a meta transaction and passing it to a relayer who signs it on your behalf and pays for the gas and pays for the storage cost or whatever so let's talk about an example here I talked about um using an ordinal as collateral so well this is the example of swapping an order so basically how one would do this in code is you set up this Marketplace contract which is a smart contract that lives on near and this this Marketplace contract will just have a map of addresses so or a map of derivation paths which link to addresses and the target blockchain so you would have say a Bitcoin address on one line and adjacent to that it would have a an an account name so it would have this ab125 whatever uh public key is associated with py vortex. n currently and then if I want to swap that there and and give it to someone else then I don't just swap the ordinal I swapped the whole uh I guess we can call it a sub account as a whole so we'll um just take that name my name out of the map and we'll replace it with someone else's name that will now link it to their near account so it'll go from from py vortex. n owns this Bitcoin account and it'll go to who knows jerry. n or or something else and I don't want to just give it for free so you could either buy it with usdc or or near on near or you could do a another swap in that so I could swap who knows what what coin do we want to think bonon salana I could swap that for the ordinal and I would just instead of changing one address I would change two addresses but in this example the the accounts are actually being derived from the marketplace contract so it somewhat has control over their account so what you have to do is make sure your contract is secure run through multiple Audits and then you can remove the access keys to that account and that contract and an account and a contract is the same thing on there and you just throw away that key and then no one will have access to it and it's not custodial but you still need to access your Bitcoin account so you'll have a method or a function in this Marketplace contract that says if this address links to uh the the person so if it's p vortex. n then I'm going to check that the person signing this method is who they say they are they are and when I'm signing this transaction I'm going to put some parameters in there uh which can be a transaction as itself or it can just be a pre pred decided transaction like I want to remove my ordinal or I want to swap I want to move all the tokens on that account to my own account and that could be to my own Bitcoin wallet that I fully control or to like a an offramp a centralized exchange and trade that for Stables but another way we could do this which is I suppose less custodial if you don't trust the contract is with near accounts you can actually convert them into nfts so you can have your access keys to your account you can have a million different like Bitcoin ethereum uh Solano whatever accounts attached to it you can have assets on that so you could have a thousand different assets on like a 100 different chains and then you can take away your access key turn the account into an nft send that to someone else and it sort of uploads a contract onto it and it says when you perform an action on this nft then it will supply you with a new full access key allowing you to do whatever you want with that near account and with that near account you have all these sub accounts attached to it as well and with with bridges in the past and like interoperability protocols you need to that you have big BD functions where they're going about at events and saying I want to integrate with your protocol so you can message from from near to ethereum or from whatever um small chain not well-known chain to some other not well-known chain and this can get expensive for the protocols but with this technology it's I suppose a chain agnostic to some extent it's well it's it's sort of like curve agnostic you need to abide by some set of rules and if you spin up a new chain or a new roll up or whatever then it will automatically be adopted you don't have to integrate at all and yeah I'm going to give a bit of a shill here so we've got some bounties we've got some money me so the first one is Implement chain signatures just what I've talked about in whatever capacity you want to do I want to see your craziest ideas and then if you don't want to do chain signatures that's fine I mean it's it's in JavaScript and I don't really like JavaScript I hate JavaScript in fact so I love chain signatures so you can you can do something else like you can make a rust smart contract whatever you want to do the near stack has a lot of different it's quite modular there's a lot of different layers to it so integrate whatever you want at least build something cool that's what I'm looking for and yeah that's that's a QR code give it a good old scan and we have access to uh resources and uh there's like a group chat in in there give me a DM all right that's that's all I've got thank you come ask me any questions whatever come for a chat have a coffee we got boo out there and thank you awesome thank you so much and uh I can't remember are you doing one of the bounties today or for the hackathon yeah we we got the bounties of the and that was that was the ones for today cool is there anything that you don't want to see from hackers I don't want to see um probably a submission when I try it out that it drains my wallet I would not be very happy with that but I don't know I I come to these hackathons and I just want to the the project doesn't have to be perfect it doesn't have to work the the user experience is going to be pretty dismal a lot of the times but I just want to see I I'm more crazy about the ideas and trying to implement these crazy ideas like build an MVP build something that's even smaller than an MVP as long as it's cool and it gets me hyped about the tech that's what I want to see cool cool what is probably the the craziest or most interesting project you've seen from hackathon so far so well I've heard some I crazy ideas about chain signatures recently some swapping of nfts over different um blockchains I'm really excited to see what happens with that and then there's there's there's some submissions that are coming from the the dgen community with just some crazy meme coins and some prediction Market stuff which we'll be interesting yeah see if you can beat these ideas yes cool and remember if you have any questions please submit them to slido and and we'll get them going um oh I had another question and I just lost it um uh and so can can we pull up the slide again with the bounties on them oh yeah for sure I will CU I don't know do we have any hackers in the room is anyone building on near or are you all oh I just close my SL that's I know I can tell you what the bounties are again but they chain signatures 3K and N that's not chain signatures for 3K as well 6K in total cool cuz I know it seems all the hackers are up either upstairs or downstairs probably building um and they can come to you come to your booth at any time to to ask questions yes that's what we're here for yeah awesome awesome all right cool well thank you so [Applause] [Music]
