Matheus' Website

My name is Matheus Degiovani and this is my personal website/blog/web presence.

I'm a lifelong technologist currently performing freelance work for Decred and other clients.

If you want to get in touch with me, drop me a line at

In this website you can read an informal introduction about myself, check out my CV (here's some cool stuff I've worked on) or read a few blog posts I eventually manage to write.

Latest Posts

OP_PEEL: Unilaterally exitable coin pools

27 October 2022

An idea for an opcode that improves upon MRTTREE fund pools.

OP_PEEL Unilaterally exitable coin pools. Introduction OP_PEEL allows building a pool of coins, rendered on-chain as a single UTXO, where each user can unilaterally withdraw funds by “peeling” the UTXO of some of its funds. The main motivation for this mechanism is improving upon some of the drawbacks of MRTTREE-backed pools, in the following ways: Removes the need to keep track of and pre-sign a large number of transactions Removes the need to have timelocks and spending deadlines of the pool Fixes possible griefing attacks for the on-chain liquidity provider Reduces transaction fees paid for on-chain redeeming Reduces on-chain footprint of on-chain redeeming OP_PEEL works by ensuring that a given UTXO being spent in a transaction is split such that some amount is freely spendable by the holder of a private key while the rest of output amount is enforced to go back to a group key. ... Read More

Split Tickets & LN Part 4 - Summary

11 November 2019

Fourth and last post with an overview of the proposed solution for multi-owner tickets over LN in Decred.

In this post I’ll summarize the proposed changes to be able to integrate split ticket purchasing ability to LN, which has several benefits such as decreasing the on-chain footprint and possibly providing improving privacy to purchasers. I’ll also outline a general strategy for implementing those over the course of the next months. Changes and Rationale To enable construction of the MRTTREE Smart Contract which allows non-custodial control of group funds (part 1 - MRTTREE construction): ... Read More

Split Tickets & LN Part 3 - Changes to the Layout of Ticket Transactions

11 November 2019

Third post on building multi-owner tickets in LN. This talks about possible future changes of the staking system.

Moving the creation of split tickets from on-chain to off-chain has the benefit of decreasing the footprint of these tickets in the blockchain, with all the associated benefits this brings. Assuming the previous changes to allow the safe creation and redeeming of such tickets are accepted, we can consider other changes to the layout of ticket transactions to simplify it further and fix the problem of Politeia voting rights being dependent on a regular P2PKH address being stored in the largest commitment address. ... Read More

Split Tickets & LN Part 2 - Handling Stake Transactions

11 November 2019

Second part of a series detailing the plan for LN-based multi-owner tickets in Decred. This shows how to use the MRTTREE to generate split tickets and talks about other stake-related issues.

After presenting the construction of the MRTTREE smart contract in part 1 we can now proceed to show how to use it to build split tickets. Funding and Purchasing the Ticket A Loop Out MRTTREE construction is used to perform the funding for the ticket. In the first coordination step, users and provider build the utxo that will be used as input to the ticket being purchased. Given this is a Loop Out, the provider requires both the off-chain inbound bandwidth (to receive the off-chain contributions) and on-chain coins under its control (that it will grant to the group of users). ... Read More

Split Tickets & LN Part 1 - MRTTREE

11 November 2019

The first part on how to provide split ticket services via LN by defining a new smart contract structure called MRTTREE (Multi-Redeemer Transactions Tree).

TL;DR This proposes a Smart Contract construct tailored to the use case of a group of users which wish to collectively pool their funds into a single utxo and then be able to redeem these funds either cooperatively off-chain via LN or uncooperatively on-chain safely, in a non-custodial way and with the smallest possible impact to the blockchain. We can achieve this by creating a new opcode, using a series of transactions with scripts inspired by LN Submarine Swaps[3] [4] , Channel Factories[5] [6] and HTLCs[1] and a special service offered by an entity willing to swap funds between the two layers. ... Read More

This website was built with Hugo and the layout was inspired by Hugo Geo.